diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /dom/interfaces/base/nsIRemoteTab.idl | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/interfaces/base/nsIRemoteTab.idl')
-rw-r--r-- | dom/interfaces/base/nsIRemoteTab.idl | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/dom/interfaces/base/nsIRemoteTab.idl b/dom/interfaces/base/nsIRemoteTab.idl new file mode 100644 index 0000000000..4d1d851c2e --- /dev/null +++ b/dom/interfaces/base/nsIRemoteTab.idl @@ -0,0 +1,109 @@ +/* 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/. */ + + +#include "domstubs.idl" + +interface nsIPrincipal; +webidl Element; +webidl WindowGlobalParent; +webidl BrowsingContext; + +[builtinclass, scriptable, uuid(8e49f7b0-1f98-4939-bf91-e9c39cd56434)] +interface nsIRemoteTab : nsISupports +{ + /** + * When set to true, this tells the child to paint and upload layers to + * the compositor. When set to false, previous layers are cleared from + * the compositor, but only if preserveLayers is also set to false. + */ + attribute boolean renderLayers; + + /** + * True if layers are being rendered and the compositor has reported + * receiving them. + */ + readonly attribute boolean hasLayers; + + /** + * When set to true, this priority hint indicates that the content + * processes of this tab should be set to a higher process priority. + */ + attribute boolean priorityHint; + + /** + * Adjusts the tab's active state in the process priority manager, + * allowing its process to be given a lower priority. + */ + void deprioritize(); + + /** + * As an optimisation, setting the docshell's active state to + * inactive also triggers a layer invalidation to free up some + * potentially unhelpful memory usage. Calling preserveLayers + * will cause the layers to be preserved even for inactive + * docshells. + */ + void preserveLayers(in boolean aPreserveLayers); + + readonly attribute uint64_t tabId; + + readonly attribute uint64_t contentProcessId; + + /** + * The OS level process Id of the related child process. + */ + readonly attribute int32_t osPid; + + /** + * The toplevel BrowsingContext loaded in this remote tab. + */ + readonly attribute BrowsingContext browsingContext; + + /** + * True if we've previously received layers for this tab when switching to + * it. + */ + readonly attribute boolean hasPresented; + + /** + * Ensures that the content process which has this remote tab has all of the + * permissions required to load a document with the given principal. + */ + void transmitPermissionsForPrincipal(in nsIPrincipal aPrincipal); + + /** + * Similar to `nsIDocShell.createAboutBlankDocumentViewer` but on a remote + * frame. The docShell must not yet have navigated away from the initial + * about:blank document when this method is called. + * + * @param aPrincipal the principal to use for the new document. + * @param aPartitionedPrincipal the partitioned principal to use for the new + * document. + */ + void createAboutBlankDocumentViewer(in nsIPrincipal aPrincipal, + in nsIPrincipal aPartitionedPrincipal); + + cenum NavigationType : 8 { + NAVIGATE_BACK = 0, + NAVIGATE_FORWARD = 1, + NAVIGATE_INDEX = 2, + NAVIGATE_URL = 3 + }; + + /** + * Interrupt content scripts if possible/needed to allow chrome scripts in the + * content process to run (in particular, to allow navigating through browser + * history. + */ + [implicit_jscontext, binaryname(MaybeCancelContentJSExecutionFromScript)] + void maybeCancelContentJSExecution( + in nsIRemoteTab_NavigationType aNavigationType, + [optional] in jsval aCancelContentJSOptions); + + /** + * Notify the remote tab that the resolution has changed. + */ + [noscript] void notifyResolutionChanged(); +}; |