mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
debt - fold electron environment and native environment into one
This commit is contained in:
@@ -11,9 +11,10 @@ import { URLService } from 'vs/platform/url/node/urlService';
|
||||
import { IOpenerService, IOpener, matchesScheme } from 'vs/platform/opener/common/opener';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService';
|
||||
import { createChannelSender } from 'vs/base/parts/ipc/node/ipc';
|
||||
import { IElectronService } from 'vs/platform/electron/node/electron';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
|
||||
|
||||
export interface IRelayOpenURLOptions extends IOpenURLOptions {
|
||||
openToSide?: boolean;
|
||||
@@ -27,7 +28,7 @@ export class RelayURLService extends URLService implements IURLHandler, IOpener
|
||||
constructor(
|
||||
@IMainProcessService mainProcessService: IMainProcessService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@IElectronEnvironmentService private electronEnvironmentService: IElectronEnvironmentService,
|
||||
@IWorkbenchEnvironmentService private readonly environmentService: INativeWorkbenchEnvironmentService,
|
||||
@IElectronService private electronService: IElectronService
|
||||
) {
|
||||
super();
|
||||
@@ -43,9 +44,9 @@ export class RelayURLService extends URLService implements IURLHandler, IOpener
|
||||
|
||||
let query = uri.query;
|
||||
if (!query) {
|
||||
query = `windowId=${encodeURIComponent(this.electronEnvironmentService.windowId)}`;
|
||||
query = `windowId=${encodeURIComponent(this.environmentService.configuration.windowId)}`;
|
||||
} else {
|
||||
query += `&windowId=${encodeURIComponent(this.electronEnvironmentService.windowId)}`;
|
||||
query += `&windowId=${encodeURIComponent(this.environmentService.configuration.windowId)}`;
|
||||
}
|
||||
|
||||
return uri.with({ query });
|
||||
|
||||
Reference in New Issue
Block a user