Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f (#7282)

* Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f

* fix various icon issues

* fix preview features
This commit is contained in:
Anthony Dresser
2019-09-19 21:50:52 -07:00
committed by GitHub
parent 9d3d64eef3
commit db498db0a8
459 changed files with 10195 additions and 7528 deletions

View File

@@ -34,7 +34,7 @@ export class Driver implements IDriver, IWindowDriverRegistry {
constructor(
private windowServer: IPCServer,
private options: IDriverOptions,
@IWindowsMainService private readonly windowsService: IWindowsMainService
@IWindowsMainService private readonly windowsMainService: IWindowsMainService
) { }
async registerWindowDriver(windowId: number): Promise<IDriverOptions> {
@@ -49,7 +49,7 @@ export class Driver implements IDriver, IWindowDriverRegistry {
}
async getWindowIds(): Promise<number[]> {
return this.windowsService.getWindows()
return this.windowsMainService.getWindows()
.map(w => w.id)
.filter(id => this.registeredWindowIds.has(id) && !this.reloadingWindowIds.has(id));
}
@@ -57,7 +57,7 @@ export class Driver implements IDriver, IWindowDriverRegistry {
async capturePage(windowId: number): Promise<string> {
await this.whenUnfrozen(windowId);
const window = this.windowsService.getWindowById(windowId);
const window = this.windowsMainService.getWindowById(windowId);
if (!window) {
throw new Error('Invalid window');
}
@@ -69,16 +69,16 @@ export class Driver implements IDriver, IWindowDriverRegistry {
async reloadWindow(windowId: number): Promise<void> {
await this.whenUnfrozen(windowId);
const window = this.windowsService.getWindowById(windowId);
const window = this.windowsMainService.getWindowById(windowId);
if (!window) {
throw new Error('Invalid window');
}
this.reloadingWindowIds.add(windowId);
this.windowsService.reload(window);
this.windowsMainService.reload(window);
}
async exitApplication(): Promise<void> {
return this.windowsService.quit();
return this.windowsMainService.quit();
}
async dispatchKeybinding(windowId: number, keybinding: string): Promise<void> {
@@ -96,7 +96,7 @@ export class Driver implements IDriver, IWindowDriverRegistry {
throw new Error('ScanCodeBindings not supported');
}
const window = this.windowsService.getWindowById(windowId);
const window = this.windowsMainService.getWindowById(windowId);
if (!window) {
throw new Error('Invalid window');
}