Finalize asWebviewUri api

Fixes #79242

As discussed, renames `toWebviewResource` to `asWebviewUri` to be consistent with the `asAbsolutePath` api naming
This commit is contained in:
Matt Bierner
2019-08-19 20:18:26 -07:00
parent 7af2ebb9fc
commit c5dc9d16be
10 changed files with 59 additions and 66 deletions

View File

@@ -12,7 +12,7 @@ import { ExtHostWebviewsShape, IMainContext, MainContext, MainThreadWebviewsShap
import { Disposable } from './extHostTypes';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import * as modes from 'vs/editor/common/modes';
import { WebviewInitData, toWebviewResource } from 'vs/workbench/api/common/shared/webview';
import { WebviewInitData, asWebviewUri } from 'vs/workbench/api/common/shared/webview';
import { generateUuid } from 'vs/base/common/uuid';
type IconPath = URI | { light: URI, dark: URI };
@@ -35,8 +35,8 @@ export class ExtHostWebview implements vscode.Webview {
this._onMessageEmitter.dispose();
}
public toWebviewResource(resource: vscode.Uri): vscode.Uri {
return toWebviewResource(this._initData, this._handle, resource);
public asWebviewUri(resource: vscode.Uri): vscode.Uri {
return asWebviewUri(this._initData, this._handle, resource);
}
public get cspSource(): string {