Move the webviewResourceRoot property to be set on each webview instead of as a global property

For #72155

This allows  us to potentially change the resource root per webview
This commit is contained in:
Matt Bierner
2019-06-24 15:42:14 -07:00
parent 1083123758
commit 8119b4aee7
14 changed files with 57 additions and 38 deletions

View File

@@ -59,7 +59,6 @@ export interface IEnvironment {
extensionTestsLocationURI?: URI;
globalStorageHome: URI;
userHome: URI;
webviewResourceRoot: string;
}
export interface IStaticWorkspaceData {
@@ -519,6 +518,7 @@ export interface MainThreadEditorInsetsShape extends IDisposable {
$setHtml(handle: number, value: string): void;
$setOptions(handle: number, options: modes.IWebviewOptions): void;
$postMessage(handle: number, value: any): Promise<boolean>;
$getResourceRoot(handle: number): Promise<string>;
}
export interface ExtHostEditorInsetsShape {
@@ -543,6 +543,7 @@ export interface MainThreadWebviewsShape extends IDisposable {
$setHtml(handle: WebviewPanelHandle, value: string): void;
$setOptions(handle: WebviewPanelHandle, options: modes.IWebviewOptions): void;
$postMessage(handle: WebviewPanelHandle, value: any): Promise<boolean>;
$getResourceRoot(handle: WebviewPanelHandle): Promise<string>;
$registerSerializer(viewType: string): void;
$unregisterSerializer(viewType: string): void;