Skip to content

Commit 313ede6

Browse files
committed
Also remove extHostWebview side of the api proposal for webview editor state/save
1 parent f75285a commit 313ede6

2 files changed

Lines changed: 1 addition & 23 deletions

File tree

src/vs/workbench/api/common/extHostTypeConverters.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,13 +1163,3 @@ export namespace LogLevel {
11631163
return types.LogLevel.Info;
11641164
}
11651165
}
1166-
export namespace WebviewContentState {
1167-
export function from(state: vscode.WebviewContentState): modes.WebviewContentState {
1168-
switch (state) {
1169-
case types.WebviewContentState.Readonly: return modes.WebviewContentState.Readonly;
1170-
case types.WebviewContentState.Unchanged: return modes.WebviewContentState.Unchanged;
1171-
case types.WebviewContentState.Dirty: return modes.WebviewContentState.Dirty;
1172-
default: throw new Error('Unknown vscode.WebviewContentState');
1173-
}
1174-
}
1175-
}

src/vs/workbench/api/common/extHostWebview.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { EditorViewColumn } from 'vs/workbench/api/common/shared/editor';
1313
import { asWebviewUri, WebviewInitData } from 'vs/workbench/api/common/shared/webview';
1414
import * as vscode from 'vscode';
1515
import { ExtHostWebviewsShape, IMainContext, MainContext, MainThreadWebviewsShape, WebviewPanelHandle, WebviewPanelViewStateData } from './extHost.protocol';
16-
import { Disposable, WebviewContentState } from './extHostTypes';
16+
import { Disposable } from './extHostTypes';
1717

1818
type IconPath = URI | { light: URI, dark: URI };
1919

@@ -102,9 +102,6 @@ export class ExtHostWebviewEditor implements vscode.WebviewEditor {
102102
private _viewColumn: vscode.ViewColumn | undefined;
103103
private _visible: boolean = true;
104104
private _active: boolean = true;
105-
private _state: vscode.WebviewEditorState = {
106-
contentState: WebviewContentState.Readonly,
107-
};
108105

109106
_isDisposed: boolean = false;
110107

@@ -224,15 +221,6 @@ export class ExtHostWebviewEditor implements vscode.WebviewEditor {
224221
this._visible = value;
225222
}
226223

227-
public get editorState(): vscode.WebviewEditorState {
228-
return this._state;
229-
}
230-
231-
public set editorState(newState: vscode.WebviewEditorState) {
232-
this._state = newState;
233-
this._proxy.$setState(this._handle, typeConverters.WebviewContentState.from(newState.contentState));
234-
}
235-
236224
private readonly _onWillSave = new Emitter<{ waitUntil: (thenable: Thenable<boolean>) => void }>();
237225
public readonly onWillSave = this._onWillSave.event;
238226

0 commit comments

Comments
 (0)