sharedProcessManagementMainService.ts 1.2 KB
Newer Older
1 2 3 4 5 6
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
7 8
import { ISharedProcess } from 'vs/platform/sharedProcess/node/sharedProcess';
import { ISharedProcessManagementService } from 'vs/platform/sharedProcess/common/sharedProcessManagement';
9

10
export const ISharedProcessManagementMainService = createDecorator<ISharedProcessManagementMainService>('sharedProcessManagementMainService');
11

12
export interface ISharedProcessManagementMainService extends ISharedProcessManagementService { }
13

14
export class SharedProcessManagementMainService implements ISharedProcessManagementMainService {
15

16
	declare readonly _serviceBrand: undefined;
17 18 19

	constructor(private sharedProcess: ISharedProcess) { }

B
Benjamin Pasero 已提交
20
	whenReady(): Promise<void> {
21 22 23
		return this.sharedProcess.whenReady();
	}

B
Benjamin Pasero 已提交
24
	async toggleWindow(): Promise<void> {
25 26 27
		return this.sharedProcess.toggle();
	}
}