@@ -31,7 +31,6 @@ import { ElectronWindow } from 'vs/workbench/electron-browser/window';
3131import { resolveWorkbenchCommonProperties , getOrCreateMachineId } from 'vs/platform/telemetry/node/workbenchCommonProperties' ;
3232import { machineIdIpcChannel } from 'vs/platform/telemetry/node/commonProperties' ;
3333import { WorkspaceStats } from 'vs/workbench/services/telemetry/common/workspaceStats' ;
34- import { IWindowIPCService , WindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService' ;
3534import { IWindowsService , IWindowService , IWindowConfiguration } from 'vs/platform/windows/common/windows' ;
3635import { WindowsChannelClient } from 'vs/platform/windows/common/windowsIpc' ;
3736import { WindowService } from 'vs/platform/windows/electron-browser/windowService' ;
@@ -100,6 +99,7 @@ import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platf
10099import { foreground , selectionBackground , focusBorder , scrollbarShadow , scrollbarSliderActiveBackground , scrollbarSliderBackground , scrollbarSliderHoverBackground , listHighlightForeground , inputPlaceholderForeground } from 'vs/platform/theme/common/colorRegistry' ;
101100import { TextMateService } from 'vs/workbench/services/textMate/electron-browser/TMSyntax' ;
102101import { ITextMateService } from 'vs/workbench/services/textMate/electron-browser/textMateService' ;
102+ import { IBroadcastService , BroadcastService } from "vs/platform/broadcast/electron-browser/broadcastService" ;
103103
104104/**
105105 * Services that we require for the Shell
@@ -129,7 +129,7 @@ export class WorkbenchShell {
129129 private telemetryService : ITelemetryService ;
130130 private extensionService : MainProcessExtensionService ;
131131 private windowsService : IWindowsService ;
132- private windowIPCService : IWindowIPCService ;
132+ private broadcastService : IBroadcastService ;
133133 private timerService : ITimerService ;
134134 private themeService : WorkbenchThemeService ;
135135 private lifecycleService : LifecycleService ;
@@ -190,8 +190,7 @@ export class WorkbenchShell {
190190 } ) ;
191191
192192 // Window
193- const activeWindow = this . workbench . getInstantiationService ( ) . createInstance ( ElectronWindow , currentWindow , this . container ) ;
194- this . windowIPCService . registerWindow ( activeWindow ) ;
193+ this . workbench . getInstantiationService ( ) . createInstance ( ElectronWindow , currentWindow , this . container ) ;
195194
196195 // Handle case where workbench is not starting up properly
197196 const timeoutHandle = setTimeout ( ( ) => {
@@ -256,9 +255,8 @@ export class WorkbenchShell {
256255
257256 const instantiationService : IInstantiationService = new InstantiationService ( serviceCollection , true ) ;
258257
259- // TODO@joao remove this
260- this . windowIPCService = instantiationService . createInstance < IWindowIPCService > ( WindowIPCService ) ;
261- serviceCollection . set ( IWindowIPCService , this . windowIPCService ) ;
258+ this . broadcastService = new BroadcastService ( currentWindow . id ) ;
259+ serviceCollection . set ( IBroadcastService , this . broadcastService ) ;
262260
263261 const mainProcessClient = new ElectronIPCClient ( String ( `window${ currentWindow . id } ` ) ) ;
264262 disposables . push ( mainProcessClient ) ;
@@ -267,10 +265,10 @@ export class WorkbenchShell {
267265 this . windowsService = new WindowsChannelClient ( windowsChannel ) ;
268266 serviceCollection . set ( IWindowsService , this . windowsService ) ;
269267
270- serviceCollection . set ( IWindowService , new SyncDescriptor ( WindowService , this . windowIPCService . getWindowId ( ) ) ) ;
268+ serviceCollection . set ( IWindowService , new SyncDescriptor ( WindowService , currentWindow . id ) ) ;
271269
272270 const sharedProcess = this . windowsService . whenSharedProcessReady ( )
273- . then ( ( ) => connectNet ( this . environmentService . sharedIPCHandle , `window:${ this . windowIPCService . getWindowId ( ) } ` ) ) ;
271+ . then ( ( ) => connectNet ( this . environmentService . sharedIPCHandle , `window:${ currentWindow . id } ` ) ) ;
274272
275273 sharedProcess
276274 . done ( client => client . registerChannel ( 'choice' , instantiationService . createInstance ( ChoiceChannel ) ) ) ;
@@ -385,7 +383,7 @@ export class WorkbenchShell {
385383 serviceCollection . set ( IUpdateService , new SyncDescriptor ( UpdateChannelClient , updateChannel ) ) ;
386384
387385 const urlChannel = mainProcessClient . getChannel ( 'url' ) ;
388- serviceCollection . set ( IURLService , new SyncDescriptor ( URLChannelClient , urlChannel , this . windowIPCService . getWindowId ( ) ) ) ;
386+ serviceCollection . set ( IURLService , new SyncDescriptor ( URLChannelClient , urlChannel , currentWindow . id ) ) ;
389387
390388 return [ instantiationService , serviceCollection ] ;
391389 }
0 commit comments