Allow globalState to be synchronized across multiple windows (#61024)

* Allow globalState to be synchronized across multiple windows (fixes #55834)

* address some feedback
This commit is contained in:
Benjamin Pasero
2018-10-16 18:52:50 +02:00
committed by GitHub
parent c8e7e58cd0
commit 2ce9665b30
5 changed files with 74 additions and 20 deletions

View File

@@ -430,7 +430,7 @@ export interface MainThreadStatusBarShape extends IDisposable {
export interface MainThreadStorageShape extends IDisposable {
$getValue<T>(shared: boolean, key: string): Thenable<T>;
$setValue(shared: boolean, key: string, value: any): Thenable<void>;
$setValue(shared: boolean, key: string, value: object): Thenable<void>;
}
export interface MainThreadTelemetryShape extends IDisposable {
@@ -1016,6 +1016,10 @@ export interface ExtHostCommentsShape {
$provideWorkspaceComments(handle: number): Thenable<modes.CommentThread[]>;
}
export interface ExtHostStorageShape {
$acceptValue(shared: boolean, key: string, value: object): void;
}
// --- proxy identifiers
export const MainContext = {
@@ -1081,6 +1085,7 @@ export const ExtHostContext = {
ExtHostWebviews: createExtId<ExtHostWebviewsShape>('ExtHostWebviews'),
ExtHostProgress: createMainId<ExtHostProgressShape>('ExtHostProgress'),
ExtHostComments: createMainId<ExtHostCommentsShape>('ExtHostComments'),
ExtHostStorage: createMainId<ExtHostStorageShape>('ExtHostStorage'),
ExtHostUrls: createExtId<ExtHostUrlsShape>('ExtHostUrls'),
ExtHostOutputService: createMainId<ExtHostOutputServiceShape>('ExtHostOutputService'),
};