mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 23:06:49 +01:00
Remove ILifecycleMainService's dependency on electron
This commit is contained in:
38
src/vs/code/test/electron-main/servicesTestUtils.ts
Normal file
38
src/vs/code/test/electron-main/servicesTestUtils.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ILifecycleMainService } from 'vs/platform/lifecycle/common/mainLifecycle';
|
||||
import { IVSCodeWindow } from 'vs/code/common/window';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
|
||||
export class TestLifecycleService implements ILifecycleMainService {
|
||||
public _serviceBrand: any;
|
||||
|
||||
public get wasUpdated(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
public onBeforeQuit(clb: () => void): () => void {
|
||||
return () => { };
|
||||
}
|
||||
|
||||
public onAfterUnload(clb: (vscodeWindow: IVSCodeWindow) => void): () => void {
|
||||
return () => { };
|
||||
}
|
||||
|
||||
public ready(): void {
|
||||
}
|
||||
|
||||
public registerWindow(vscodeWindow: IVSCodeWindow): void {
|
||||
}
|
||||
|
||||
public unload(vscodeWindow: IVSCodeWindow): TPromise<boolean /* veto */> {
|
||||
return TPromise.as(false);
|
||||
}
|
||||
|
||||
public quit(fromUpdate?: boolean): TPromise<boolean /* veto */> {
|
||||
return TPromise.as(false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user