Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3

This commit is contained in:
ADS Merger
2020-03-11 04:19:23 +00:00
parent 16fab722d5
commit 4c3e48773d
880 changed files with 20441 additions and 11232 deletions

View File

@@ -6,9 +6,10 @@
import * as fs from 'fs';
import * as gracefulFs from 'graceful-fs';
import { createHash } from 'crypto';
import { webFrame } from 'electron';
import { importEntries, mark } from 'vs/base/common/performance';
import { Workbench } from 'vs/workbench/browser/workbench';
import { ElectronWindow } from 'vs/workbench/electron-browser/window';
import { NativeWindow } from 'vs/workbench/electron-browser/window';
import { setZoomLevel, setZoomFactor, setFullscreen } from 'vs/base/browser/browser';
import { domContentLoaded, addDisposableListener, EventType, scheduleAtNextAnimationFrame } from 'vs/base/browser/dom';
import { onUnexpectedError } from 'vs/base/common/errors';
@@ -20,8 +21,7 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { stat } from 'vs/base/node/pfs';
import { KeyboardMapperFactory } from 'vs/workbench/services/keybinding/electron-browser/nativeKeymapService';
import { IWindowConfiguration } from 'vs/platform/windows/common/windows';
import { webFrame } from 'electron';
import { INativeWindowConfiguration } from 'vs/platform/windows/node/window';
import { ISingleFolderWorkspaceIdentifier, IWorkspaceInitializationPayload, ISingleFolderWorkspaceInitializationPayload, reviveWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
import { ConsoleLogService, MultiplexLogService, ILogService, ConsoleLogInMainService } from 'vs/platform/log/common/log';
import { NativeStorageService } from 'vs/platform/storage/node/storageService';
@@ -51,16 +51,15 @@ import { FileUserDataProvider } from 'vs/workbench/services/userData/common/file
import { basename } from 'vs/base/common/resources';
import { IProductService } from 'vs/platform/product/common/productService';
import product from 'vs/platform/product/common/product';
import { ElectronEnvironmentService, IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService';
class DesktopMain extends Disposable {
private readonly environmentService: NativeWorkbenchEnvironmentService;
constructor(private configuration: IWindowConfiguration) {
constructor(private configuration: INativeWindowConfiguration) {
super();
this.environmentService = new NativeWorkbenchEnvironmentService(configuration, configuration.execPath, configuration.windowId);
this.environmentService = new NativeWorkbenchEnvironmentService(configuration, configuration.execPath);
this.init();
}
@@ -127,7 +126,7 @@ class DesktopMain extends Disposable {
const instantiationService = workbench.startup();
// Window
this._register(instantiationService.createInstance(ElectronWindow));
this._register(instantiationService.createInstance(NativeWindow));
// Driver
if (this.environmentService.configuration.driver) {
@@ -180,11 +179,6 @@ class DesktopMain extends Disposable {
// Environment
serviceCollection.set(IWorkbenchEnvironmentService, this.environmentService);
serviceCollection.set(IElectronEnvironmentService, new ElectronEnvironmentService(
this.configuration.windowId,
this.environmentService.sharedIPCHandle,
this.environmentService
));
// Product
serviceCollection.set(IProductService, { _serviceBrand: undefined, ...product });
@@ -373,7 +367,7 @@ class DesktopMain extends Disposable {
}
}
export function main(configuration: IWindowConfiguration): Promise<void> {
export function main(configuration: INativeWindowConfiguration): Promise<void> {
const renderer = new DesktopMain(configuration);
return renderer.open();