ipc events should not use TPromise

This commit is contained in:
Joao Moreno
2018-07-04 08:47:53 +02:00
parent dedf22a55c
commit 0f851d0fd5
23 changed files with 343 additions and 175 deletions

View File

@@ -66,7 +66,7 @@ function main(server: Server, initData: ISharedProcessInitData, configuration: I
process.once('exit', () => dispose(disposables));
const environmentService = new EnvironmentService(initData.args, process.execPath);
const logLevelClient = new LogLevelSetterChannelClient(server.getChannel('loglevel', { route: () => 'main' }));
const logLevelClient = new LogLevelSetterChannelClient(server.getChannel('loglevel', { routeCall: () => 'main', routeEvent: () => 'main' }));
const logService = new FollowerLogService(logLevelClient, createSpdLogService('sharedprocess', initData.logLevel, environmentService.logsPath));
disposables.push(logService);
@@ -77,14 +77,18 @@ function main(server: Server, initData: ISharedProcessInitData, configuration: I
services.set(IConfigurationService, new SyncDescriptor(ConfigurationService));
services.set(IRequestService, new SyncDescriptor(RequestService));
const windowsChannel = server.getChannel('windows', { route: () => 'main' });
const windowsChannel = server.getChannel('windows', { routeCall: () => 'main', routeEvent: () => 'main' });
const windowsService = new WindowsChannelClient(windowsChannel);
services.set(IWindowsService, windowsService);
const activeWindowManager = new ActiveWindowManager(windowsService);
const dialogChannel = server.getChannel('dialog', {
route: () => {
logService.info('Routing dialog request to the client', activeWindowManager.activeClientId);
routeCall: () => {
logService.info('Routing dialog call request to the client', activeWindowManager.activeClientId);
return activeWindowManager.activeClientId;
},
routeEvent: () => {
logService.info('Routing dialog listen request to the client', activeWindowManager.activeClientId);
return activeWindowManager.activeClientId;
}
});