/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows'; export class WindowService implements IWindowService { _serviceBrand: any; constructor( private windowId: number, @IWindowsService private windowsService: IWindowsService ) { } getCurrentWindowId(): number { return this.windowId; } openFileFolderPicker(forceNewWindow?: boolean): TPromise { return this.windowsService.openFileFolderPicker(this.windowId, forceNewWindow); } openFilePicker(forceNewWindow?: boolean, path?: string): TPromise { return this.windowsService.openFilePicker(this.windowId, forceNewWindow, path); } openFolderPicker(forceNewWindow?: boolean): TPromise { return this.windowsService.openFolderPicker(this.windowId, forceNewWindow); } reloadWindow(): TPromise { return this.windowsService.reloadWindow(this.windowId); } openDevTools(): TPromise { return this.windowsService.openDevTools(this.windowId); } toggleDevTools(): TPromise { return this.windowsService.toggleDevTools(this.windowId); } closeFolder(): TPromise { return this.windowsService.closeFolder(this.windowId); } toggleFullScreen(): TPromise { return this.windowsService.toggleFullScreen(this.windowId); } setRepresentedFilename(fileName: string): TPromise { return this.windowsService.setRepresentedFilename(this.windowId, fileName); } getRecentlyOpen(): TPromise<{ files: string[]; folders: string[]; }> { return this.windowsService.getRecentlyOpen(this.windowId); } focusWindow(): TPromise { return this.windowsService.focusWindow(this.windowId); } setDocumentEdited(flag: boolean): TPromise { return this.windowsService.setDocumentEdited(this.windowId, flag); } }