mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Add new external uri opener service
This workbench service handles opening external uris. Unlike the core OpenerService, it also has logic for configuring a default opener and prompting if multiple openers are availble for a given uri
This commit is contained in:
@@ -801,12 +801,18 @@ export interface ExtHostUrlsShape {
|
||||
}
|
||||
|
||||
export interface MainThreadUriOpenersShape extends IDisposable {
|
||||
$registerUriOpener(handle: number, schemes: readonly string[]): Promise<void>;
|
||||
$registerUriOpener(handle: number, schemes: readonly string[], extensionId: ExtensionIdentifier): Promise<void>;
|
||||
$unregisterUriOpener(handle: number): Promise<void>;
|
||||
}
|
||||
|
||||
export interface ExtHostUriOpener {
|
||||
readonly extensionId: ExtensionIdentifier;
|
||||
readonly commandId: number;
|
||||
readonly title: string;
|
||||
}
|
||||
|
||||
export interface ExtHostUriOpenersShape {
|
||||
$getOpenersForUri(uri: UriComponents, token: CancellationToken): Promise<{ cacheId: number, openers: ReadonlyArray<{ id: number, title: string }> }>;
|
||||
$getOpenersForUri(uri: UriComponents, token: CancellationToken): Promise<{ cacheId: number, openers: ReadonlyArray<ExtHostUriOpener> }>;
|
||||
$openUri(id: ChainedCacheId, uri: UriComponents): Promise<void>;
|
||||
$releaseOpener(cacheId: number): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user