|
1 | | -import { ConnectionHandler } from '@theia/core/lib/common/messaging/handler'; |
2 | | -import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory'; |
| 1 | +import { ElectronConnectionHandler } from '@theia/core/lib/electron-main/messaging/electron-connection-handler'; |
| 2 | +import { RpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory'; |
3 | 3 | import { ElectronMainWindowService } from '@theia/core/lib/electron-common/electron-main-window-service';
|
4 | 4 | import { TheiaMainApi } from '@theia/core/lib/electron-main/electron-api-main';
|
5 | 5 | import {
|
@@ -33,18 +33,15 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
33 | 33 | bind(IDEUpdaterImpl).toSelf().inSingletonScope();
|
34 | 34 | bind(IDEUpdater).toService(IDEUpdaterImpl);
|
35 | 35 | bind(ElectronMainApplicationContribution).toService(IDEUpdater);
|
36 | | - bind(ConnectionHandler) |
| 36 | + bind(ElectronConnectionHandler) |
37 | 37 | .toDynamicValue(
|
38 | 38 | (context) =>
|
39 | | - new JsonRpcConnectionHandler<IDEUpdaterClient>( |
40 | | - IDEUpdaterPath, |
41 | | - (client) => { |
42 | | - const server = context.container.get<IDEUpdater>(IDEUpdater); |
43 | | - server.setClient(client); |
44 | | - client.onDidCloseConnection(() => server.disconnectClient(client)); |
45 | | - return server; |
46 | | - } |
47 | | - ) |
| 39 | + new RpcConnectionHandler<IDEUpdaterClient>(IDEUpdaterPath, (client) => { |
| 40 | + const server = context.container.get<IDEUpdater>(IDEUpdater); |
| 41 | + server.setClient(client); |
| 42 | + client.onDidCloseConnection(() => server.disconnectClient(client)); |
| 43 | + return server; |
| 44 | + }) |
48 | 45 | )
|
49 | 46 | .inSingletonScope();
|
50 | 47 |
|
|
0 commit comments