Skip to content

Commit

Permalink
Web API change (microsoft#147392)
Browse files Browse the repository at this point in the history
* for microsoft#147368

* preserve API
  • Loading branch information
bpasero authored Apr 14, 2022
1 parent 5575923 commit e34318c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/web.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface IWorkbench {
* @returns the scheme to use for opening the associated desktop
* experience via protocol handler.
*/
readonly uriScheme: string;
getUriScheme(): Promise<string>;

/**
* Retrieve performance marks that have been collected during startup. This function
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/web.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export namespace env {
export async function getUriScheme(): Promise<string> {
const workbench = await workbenchPromise.p;

return workbench.env.uriScheme;
return workbench.env.getUriScheme();
}

/**
Expand Down
8 changes: 5 additions & 3 deletions src/vs/workbench/browser/web.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,18 @@ export class BrowserMain extends Disposable {
executeCommand: (command, ...args) => commandService.executeCommand(command, ...args)
},
env: {
uriScheme: productService.urlProtocol,
telemetryLevel: telemetryService.telemetryLevel,
async getUriScheme(): Promise<string> {
return productService.urlProtocol;
},
async retrievePerformanceMarks() {
await timerService.whenReady();

return timerService.getPerformanceMarks();
},
async openUri(uri: URI): Promise<boolean> {
return openerService.open(uri, {});
},
telemetryLevel: telemetryService.telemetryLevel,
}
},
window: {
withProgress: (options, task) => progessService.withProgress(options, task)
Expand Down
1 change: 0 additions & 1 deletion src/vs/workbench/workbench.web.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ import type { IUpdateProvider, IUpdate } from 'vs/workbench/services/update/brow
// eslint-disable-next-line no-duplicate-imports
import type { IWorkspace, IWorkspaceProvider } from 'vs/workbench/services/host/browser/browserHostService';


export {

// Factory
Expand Down

0 comments on commit e34318c

Please sign in to comment.