add ExtHostStorage to injector, rename 'createApiFactory' to 'createApiFactoryAndRegisterActors'

This commit is contained in:
Johannes Rieken
2019-08-08 15:08:10 +02:00
parent 419dc83a5d
commit 42b5eb3bf3
5 changed files with 25 additions and 12 deletions

View File

@@ -6,6 +6,7 @@
import { MainContext, MainThreadStorageShape, ExtHostStorageShape } from './extHost.protocol';
import { Emitter } from 'vs/base/common/event';
import { IExtHostRpcService } from 'vs/workbench/api/common/rpcService';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
export interface IStorageChangeEvent {
shared: boolean;
@@ -15,6 +16,8 @@ export interface IStorageChangeEvent {
export class ExtHostStorage implements ExtHostStorageShape {
readonly _serviceBrand: any;
private _proxy: MainThreadStorageShape;
private _onDidChangeStorage = new Emitter<IStorageChangeEvent>();
@@ -36,3 +39,6 @@ export class ExtHostStorage implements ExtHostStorageShape {
this._onDidChangeStorage.fire({ shared, key, value });
}
}
export interface IExtHostStorage extends ExtHostStorage { }
export const IExtHostStorage = createDecorator<IExtHostStorage>('IExtHostStorage');