mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
add ExtHostStorage to injector, rename 'createApiFactory' to 'createApiFactoryAndRegisterActors'
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user