mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 09:35:39 -05:00
Merge from vscode 817eb6b0c720a4ecbc13c020afbbebfed667aa09 (#7356)
This commit is contained in:
@@ -18,7 +18,7 @@ export class ExtHostWindow implements ExtHostWindowShape {
|
||||
|
||||
private _proxy: MainThreadWindowShape;
|
||||
|
||||
private _onDidChangeWindowState = new Emitter<WindowState>();
|
||||
private readonly _onDidChangeWindowState = new Emitter<WindowState>();
|
||||
readonly onDidChangeWindowState: Event<WindowState> = this._onDidChangeWindowState.event;
|
||||
|
||||
private _state = ExtHostWindow.InitialState;
|
||||
@@ -53,4 +53,15 @@ export class ExtHostWindow implements ExtHostWindowShape {
|
||||
}
|
||||
return this._proxy.$openUri(stringOrUri, options);
|
||||
}
|
||||
|
||||
async resolveExternalUri(uri: URI, options: IOpenUriOptions): Promise<URI> {
|
||||
if (isFalsyOrWhitespace(uri.scheme)) {
|
||||
return Promise.reject('Invalid scheme - cannot be empty');
|
||||
} else if (!new Set([Schemas.http, Schemas.https]).has(uri.scheme)) {
|
||||
return Promise.reject(`Invalid scheme '${uri.scheme}'`);
|
||||
}
|
||||
|
||||
const result = await this._proxy.$resolveExternalUri(uri, options);
|
||||
return URI.from(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user