Adding proposed external uri opener API

For #109277
This commit is contained in:
Matt Bierner
2020-12-15 16:15:15 -08:00
parent 542670762f
commit 6d3c2e6835
7 changed files with 228 additions and 3 deletions

View File

@@ -788,6 +788,15 @@ export interface ExtHostUrlsShape {
$handleExternalUri(handle: number, uri: UriComponents): Promise<void>;
}
export interface MainThreadUriOpenersShape extends IDisposable {
$registerUriOpener(handle: number): Promise<void>;
$unregisterUriOpener(handle: number): Promise<void>;
}
export interface ExtHostUriOpenersShape {
$openUri(uri: UriComponents, token: CancellationToken): Promise<boolean>;
}
export interface ITextSearchComplete {
limitHit?: boolean;
}
@@ -1821,6 +1830,7 @@ export const MainContext = {
MainThreadWebviewViews: createMainId<MainThreadWebviewViewsShape>('MainThreadWebviewViews'),
MainThreadCustomEditors: createMainId<MainThreadCustomEditorsShape>('MainThreadCustomEditors'),
MainThreadUrls: createMainId<MainThreadUrlsShape>('MainThreadUrls'),
MainThreadUriOpeners: createMainId<MainThreadUriOpenersShape>('MainThreadUriOpeners'),
MainThreadWorkspace: createMainId<MainThreadWorkspaceShape>('MainThreadWorkspace'),
MainThreadFileSystem: createMainId<MainThreadFileSystemShape>('MainThreadFileSystem'),
MainThreadExtensionService: createMainId<MainThreadExtensionServiceShape>('MainThreadExtensionService'),
@@ -1870,6 +1880,7 @@ export const ExtHostContext = {
ExtHostComments: createMainId<ExtHostCommentsShape>('ExtHostComments'),
ExtHostStorage: createMainId<ExtHostStorageShape>('ExtHostStorage'),
ExtHostUrls: createExtId<ExtHostUrlsShape>('ExtHostUrls'),
ExtHostUriOpeners: createExtId<ExtHostUriOpenersShape>('ExtHostUriOpeners'),
ExtHostOutputService: createMainId<ExtHostOutputServiceShape>('ExtHostOutputService'),
ExtHosLabelService: createMainId<ExtHostLabelServiceShape>('ExtHostLabelService'),
ExtHostNotebook: createMainId<ExtHostNotebookShape>('ExtHostNotebook'),