import { Event, Emitter } from '../../common'; import { CorePreferences } from '../core-preferences'; import { ContributionProvider } from '../../common/contribution-provider'; import { FrontendApplicationContribution, FrontendApplication, OnWillStopAction } from '../frontend-application'; import { WindowService } from './window-service'; import { StopReason } from '../../common/frontend-application-state'; export declare class DefaultWindowService implements WindowService, FrontendApplicationContribution { protected frontendApplication: FrontendApplication; protected allowVetoes: boolean; protected onUnloadEmitter: Emitter; get onUnload(): Event; protected readonly corePreferences: CorePreferences; protected readonly contributions: ContributionProvider; onStart(app: FrontendApplication): void; openNewWindow(url: string): undefined; openNewDefaultWindow(): void; /** * Returns a list of actions that {@link FrontendApplicationContribution}s would like to take before shutdown * It is expected that this will succeed - i.e. return an empty array - at most once per session. If no vetoes are received * during any cycle, no further checks will be made. In that case, shutdown should proceed unconditionally. */ protected collectContributionUnloadVetoes(): OnWillStopAction[]; /** * Implement the mechanism to detect unloading of the page. */ protected registerUnloadListeners(): void; isSafeToShutDown(stopReason: StopReason): Promise; setSafeToShutDown(): void; /** * Called when the `window` is about to `unload` its resources. * At this point, the `document` is still visible and the [`BeforeUnloadEvent`](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event) * event will be canceled if the return value of this method is `false`. * * In Electron, handleCloseRequestEvent is is run instead. */ protected handleBeforeUnloadEvent(event: BeforeUnloadEvent): string | void; /** * Notify the browser that we do not want to unload. * * Notes: * - Shows a confirmation popup in browsers. * - Prevents the window from closing without confirmation in electron. * * @param event The beforeunload event */ protected preventUnload(event: BeforeUnloadEvent): string | void; reload(): void; } //# sourceMappingURL=default-window-service.d.ts.map