Create WebviewExtensionDescription in extHostProtocol

This commit is contained in:
Matt Bierner
2019-10-16 11:56:58 -07:00
parent 721886ce10
commit d6ab43118d
3 changed files with 37 additions and 33 deletions

View File

@@ -540,8 +540,13 @@ export interface WebviewPanelShowOptions {
readonly preserveFocus?: boolean;
}
export interface WebviewExtensionDescription {
readonly id: ExtensionIdentifier;
readonly location: UriComponents;
}
export interface MainThreadWebviewsShape extends IDisposable {
$createWebviewPanel(handle: WebviewPanelHandle, viewType: string, title: string, showOptions: WebviewPanelShowOptions, options: modes.IWebviewPanelOptions & modes.IWebviewOptions, extensionId: ExtensionIdentifier, extensionLocation: UriComponents): void;
$createWebviewPanel(extension: WebviewExtensionDescription, handle: WebviewPanelHandle, viewType: string, title: string, showOptions: WebviewPanelShowOptions, options: modes.IWebviewPanelOptions & modes.IWebviewOptions): void;
$disposeWebview(handle: WebviewPanelHandle): void;
$reveal(handle: WebviewPanelHandle, showOptions: WebviewPanelShowOptions): void;
$setTitle(handle: WebviewPanelHandle, value: string): void;
@@ -556,7 +561,7 @@ export interface MainThreadWebviewsShape extends IDisposable {
$registerSerializer(viewType: string): void;
$unregisterSerializer(viewType: string): void;
$registerEditorProvider(viewType: string, extensionId: ExtensionIdentifier, extensionLocation: UriComponents, options: modes.IWebviewPanelOptions): void;
$registerEditorProvider(extension: WebviewExtensionDescription, viewType: string, options: modes.IWebviewPanelOptions): void;
$unregisterEditorProvider(viewType: string): void;
}