Make the external opener a two phase process

This changes makes a few changes to the openers:

- Move the opener prompting from the extension host into the main thread
- Make the external opener process two phases: get openers and then open. This would let us skip the trusted domain validation for extension handled links if we want to in the future
- Add lifecycle to commands used by the uri opener

For #109277
This commit is contained in:
Matt Bierner
2021-01-07 15:07:40 -08:00
parent aa73c2d435
commit acda4aed82
8 changed files with 103 additions and 70 deletions

View File

@@ -806,7 +806,9 @@ export interface MainThreadUriOpenersShape extends IDisposable {
}
export interface ExtHostUriOpenersShape {
$openUri(uri: UriComponents, ctx: { originalUri: UriComponents }, token: CancellationToken): Promise<boolean>;
$getOpenersForUri(uri: UriComponents, token: CancellationToken): Promise<{ cacheId: number, openers: ReadonlyArray<{ id: number, title: string }> }>;
$openUri(id: ChainedCacheId, uri: UriComponents): Promise<void>;
$releaseOpener(cacheId: number): void;
}
export interface ITextSearchComplete {