UNPKG

1.69 kBTypeScriptView Raw
1import { NewWindowOptions } from '../../common/window';
2import { DefaultWindowService } from '../../browser/window/default-window-service';
3import { ElectronMainWindowService } from '../../electron-common/electron-main-window-service';
4import { ElectronWindowPreferences } from './electron-window-preferences';
5import { CloseRequestArguments } from '../../electron-common/messaging/electron-messages';
6export declare class ElectronWindowService extends DefaultWindowService {
7 /**
8 * Lock to prevent multiple parallel executions of the `beforeunload` listener.
9 */
10 protected isUnloading: boolean;
11 /**
12 * Close the window right away when `true`, else check if we can unload.
13 */
14 protected closeOnUnload: boolean;
15 protected readonly delegate: ElectronMainWindowService;
16 protected readonly electronWindowPreferences: ElectronWindowPreferences;
17 openNewWindow(url: string, { external }?: NewWindowOptions): undefined;
18 openNewDefaultWindow(): void;
19 protected init(): void;
20 protected registerUnloadListeners(): void;
21 /**
22 * Run when ElectronMain detects a `close` event and emits a `close-requested` event.
23 * Should send an event to `electron.ipcRenderer` on the event's `confirmChannel` if it is safe to exit
24 * after running FrontendApplication `onWillStop` handlers or on the `cancelChannel` if it is not safe to exit.
25 */
26 protected handleCloseRequestedEvent(event: CloseRequestArguments): Promise<void>;
27 /**
28 * Updates the window zoom level based on the preference value.
29 */
30 protected updateWindowZoomLevel(): void;
31 reload(): void;
32}
33//# sourceMappingURL=electron-window-service.d.ts.map
\No newline at end of file