Investigate using Electron's resolveProxy API (#60773)

This commit is contained in:
Christof Marti
2018-10-22 20:00:47 +02:00
parent 53d48f4c2c
commit 4e436d128c
15 changed files with 298 additions and 24 deletions

View File

@@ -487,6 +487,7 @@ export interface MainThreadWorkspaceShape extends IDisposable {
$checkExists(includes: string[], token: CancellationToken): Thenable<boolean>;
$saveAll(includeUntitled?: boolean): Thenable<boolean>;
$updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, workspaceFoldersToAdd: { uri: UriComponents, name?: string }[]): Thenable<void>;
$resolveProxy(url: string): Thenable<string>;
}
export interface IFileChangeDto {

View File

@@ -147,12 +147,13 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
extHostContext: IMainContext,
extHostWorkspace: ExtHostWorkspace,
extHostConfiguration: ExtHostConfiguration,
extHostLogService: ExtHostLogService
extHostLogService: ExtHostLogService,
mainThreadTelemetry: MainThreadTelemetryShape
) {
this._barrier = new Barrier();
this._registry = new ExtensionDescriptionRegistry(initData.extensions);
this._extHostLogService = extHostLogService;
this._mainThreadTelemetry = extHostContext.getProxy(MainContext.MainThreadTelemetry);
this._mainThreadTelemetry = mainThreadTelemetry;
this._storage = new ExtHostStorage(extHostContext);
this._storagePath = new ExtensionStoragePath(initData.workspace, initData.environment);
this._proxy = extHostContext.getProxy(MainContext.MainThreadExtensionService);

View File

@@ -454,4 +454,8 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape {
saveAll(includeUntitled?: boolean): Thenable<boolean> {
return this._proxy.$saveAll(includeUntitled);
}
resolveProxy(url: string): Thenable<string> {
return this._proxy.$resolveProxy(url);
}
}