mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
@@ -372,7 +372,6 @@ export interface ExtHostWebviewsShape {
|
||||
$onDidChangeWebviewPanelViewState(handle: WebviewPanelHandle, active: boolean, position: EditorPosition): void;
|
||||
$onDidDisposeWebviewPanel(handle: WebviewPanelHandle): Thenable<void>;
|
||||
$deserializeWebviewPanel(newWebviewHandle: WebviewPanelHandle, viewType: string, title: string, state: any, position: EditorPosition, options: vscode.WebviewOptions): Thenable<void>;
|
||||
$serializeWebviewPanel(webviewHandle: WebviewPanelHandle): Thenable<any>;
|
||||
}
|
||||
|
||||
export interface MainThreadUrlsShape extends IDisposable {
|
||||
|
||||
@@ -288,22 +288,6 @@ export class ExtHostWebviews implements ExtHostWebviewsShape {
|
||||
return serializer.deserializeWebviewPanel(revivedPanel, state);
|
||||
}
|
||||
|
||||
$serializeWebviewPanel(
|
||||
webviewHandle: WebviewPanelHandle
|
||||
): Thenable<any> {
|
||||
const panel = this.getWebviewPanel(webviewHandle);
|
||||
if (!panel) {
|
||||
return TPromise.as(undefined);
|
||||
}
|
||||
|
||||
const serialzer = this._serializers.get(panel.viewType);
|
||||
if (!serialzer) {
|
||||
return TPromise.as(undefined);
|
||||
}
|
||||
|
||||
return serialzer.serializeWebviewPanel(panel);
|
||||
}
|
||||
|
||||
private getWebviewPanel(handle: WebviewPanelHandle): ExtHostWebviewPanel | undefined {
|
||||
return this._webviewPanels.get(handle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user