delete unused code

This commit is contained in:
Benjamin Pasero 2017-06-08 12:28:22 +02:00
parent 129ba23f70
commit c2cb4fc173
2 changed files with 23 additions and 38 deletions

View file

@ -1,37 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import Event from 'vs/base/common/event';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { IWindowsService } from 'vs/platform/windows/common/windows';
export interface IWindowEventService {
_serviceBrand: any;
onNewWindowOpen: Event<number>;
onWindowFocus: Event<number>;
}
export class ActiveWindowManager implements IDisposable {
private disposables: IDisposable[] = [];
private _activeWindowId: number;
constructor( @IWindowsService windowsService: IWindowsService) {
windowsService.onWindowOpen(this.setActiveWindow, this, this.disposables);
windowsService.onWindowFocus(this.setActiveWindow, this, this.disposables);
}
private setActiveWindow(windowId: number) {
this._activeWindowId = windowId;
}
public get activeClientId(): string {
return `window:${this._activeWindowId}`;
}
public dispose() {
this.disposables = dispose(this.disposables);
}
}

View file

@ -32,14 +32,36 @@ import { IChoiceService } from 'vs/platform/message/common/message';
import { ChoiceChannelClient } from 'vs/platform/message/common/messageIpc';
import { IWindowsService } from 'vs/platform/windows/common/windows';
import { WindowsChannelClient } from 'vs/platform/windows/common/windowsIpc';
import { ActiveWindowManager } from 'vs/code/common/windows';
import { ipcRenderer } from 'electron';
import { IDisposable, dispose } from "vs/base/common/lifecycle";
interface ISharedProcessInitData {
sharedIPCHandle: string;
args: ParsedArgs;
}
class ActiveWindowManager implements IDisposable {
private disposables: IDisposable[] = [];
private _activeWindowId: number;
constructor( @IWindowsService windowsService: IWindowsService) {
windowsService.onWindowOpen(this.setActiveWindow, this, this.disposables);
windowsService.onWindowFocus(this.setActiveWindow, this, this.disposables);
}
private setActiveWindow(windowId: number) {
this._activeWindowId = windowId;
}
public get activeClientId(): string {
return `window:${this._activeWindowId}`;
}
public dispose() {
this.disposables = dispose(this.disposables);
}
}
const eventPrefix = 'monacoworkbench';
function main(server: Server, initData: ISharedProcessInitData): void {