From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- dom/chrome-webidl/FrameLoader.webidl | 243 +++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 dom/chrome-webidl/FrameLoader.webidl (limited to 'dom/chrome-webidl/FrameLoader.webidl') diff --git a/dom/chrome-webidl/FrameLoader.webidl b/dom/chrome-webidl/FrameLoader.webidl new file mode 100644 index 0000000000..df3d03f2b7 --- /dev/null +++ b/dom/chrome-webidl/FrameLoader.webidl @@ -0,0 +1,243 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +interface LoadContext; +interface RemoteTab; +interface URI; +interface nsIDocShell; +interface nsIPrintSettings; +interface nsIWebBrowserPersistDocumentReceiver; +interface nsIWebProgressListener; + +[ChromeOnly, + Exposed=Window] +interface FrameLoader { + /** + * Get the docshell from the frame loader. + */ + [GetterThrows] + readonly attribute nsIDocShell? docShell; + + /** + * Get this frame loader's RemoteTab, if it has a remote frame. Otherwise, + * returns null. + */ + readonly attribute RemoteTab? remoteTab; + + /** + * Get an nsILoadContext for the top-level docshell. For remote + * frames, a shim is returned that contains private browsing and app + * information. + */ + readonly attribute LoadContext? loadContext; + + /** + * Get the root BrowsingContext within the frame. + * This may be null immediately after creating a remote frame. + */ + readonly attribute BrowsingContext? browsingContext; + + /** + * Find out whether the loader's frame is at too great a depth in + * the frame tree. This can be used to decide what operations may + * or may not be allowed on the loader's docshell. + */ + [Pure] + readonly attribute boolean depthTooGreat; + + /** + * Find out whether the loader's frame is a remote frame. + */ + readonly attribute boolean isRemoteFrame; + + // Note, when frameloaders are swapped, also messageManagers are swapped. + readonly attribute MessageSender? messageManager; + + /** + * Force a remote browser to recompute its dimension and screen position. + */ + [Throws] + undefined requestUpdatePosition(); + + /** + * Force a TabStateFlush from native sessionStoreListeners. + * Returns a promise that resolves when all session store data has been + * flushed. + */ + [NewObject] + Promise requestTabStateFlush(); + + /** + * Force Epoch update in native sessionStoreListeners. + */ + undefined requestEpochUpdate(unsigned long aEpoch); + + /** + * Request a session history update in native sessionStoreListeners. + */ + undefined requestSHistoryUpdate(); + + /** + * Creates a print preview document in this frame, or updates the existing + * print preview document with new print settings. + * + * @param aPrintSettings The print settings to use to layout the print + * preview document. + * @param aSourceBrowsingContext Optionally, the browsing context that + * contains the document from which the print preview is to be generated, + * which must be in the same process as the browsing context of the frame + * loader itself. + * + * This should only be passed on the first call. It should not be passed + * for any subsequent calls that are made to update the existing print + * preview document with a new print settings object. + * @return A Promise that resolves with a PrintPreviewSuccessInfo on success. + */ + [NewObject] + Promise printPreview(nsIPrintSettings aPrintSettings, + BrowsingContext? aSourceBrowsingContext); + + /** + * Inform the print preview document that we're done with it. + */ + undefined exitPrintPreview(); + + /** + * The element which owns this frame loader. + * + * For example, if this is a frame loader for an