Working on progress indicator when loading webview

This commit is contained in:
Matt Bierner
2018-04-04 16:07:31 -07:00
parent 8b501bc0f4
commit caee7a5789
6 changed files with 43 additions and 35 deletions

View File

@@ -366,7 +366,7 @@ export interface ExtHostWebviewsShape {
$onDidChangeActiveWeview(handle: WebviewHandle | undefined): void;
$onDidDisposeWeview(handle: WebviewHandle): Thenable<void>;
$onDidChangePosition(handle: WebviewHandle, newPosition: EditorPosition): void;
$deserializeWebview(newWebviewHandle: WebviewHandle, viewType: string, state: any, position: EditorPosition, options: vscode.WebviewOptions): void;
$deserializeWebview(newWebviewHandle: WebviewHandle, viewType: string, state: any, position: EditorPosition, options: vscode.WebviewOptions): Thenable<boolean>;
$serializeWebview(webviewHandle: WebviewHandle): Thenable<any>;
}

View File

@@ -237,15 +237,15 @@ export class ExtHostWebviews implements ExtHostWebviewsShape {
state: any,
position: Position,
options: vscode.WebviewOptions
): void {
): TPromise<boolean> {
const serializer = this._serializers.get(viewType);
if (!serializer) {
return;
return TPromise.as(false);
}
const revivedWebview = new ExtHostWebview(webviewHandle, this._proxy, viewType, typeConverters.toViewColumn(position), options);
this._webviews.set(webviewHandle, revivedWebview);
serializer.deserializeWebview(revivedWebview, state);
return serializer.deserializeWebview(revivedWebview, state);
}
$serializeWebview(