nsIRemoteTab.idl (3413B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 6 #include "domstubs.idl" 7 8 interface nsIPrincipal; 9 webidl Element; 10 webidl WindowGlobalParent; 11 webidl BrowsingContext; 12 13 [builtinclass, scriptable, uuid(8e49f7b0-1f98-4939-bf91-e9c39cd56434)] 14 interface nsIRemoteTab : nsISupports 15 { 16 /** 17 * When set to true, this tells the child to paint and upload layers to 18 * the compositor. When set to false, previous layers are cleared from 19 * the compositor, but only if preserveLayers is also set to false. 20 */ 21 attribute boolean renderLayers; 22 23 /** 24 * True if layers are being rendered and the compositor has reported 25 * receiving them. 26 */ 27 readonly attribute boolean hasLayers; 28 29 /** 30 * When set to true, this priority hint indicates that the content 31 * processes of this tab should be set to a higher process priority. 32 */ 33 attribute boolean priorityHint; 34 35 /** 36 * Adjusts the tab's active state in the process priority manager, 37 * allowing its process to be given a lower priority. 38 */ 39 void deprioritize(); 40 41 /** 42 * As an optimisation, setting the docshell's active state to 43 * inactive also triggers a layer invalidation to free up some 44 * potentially unhelpful memory usage. Calling preserveLayers 45 * will cause the layers to be preserved even for inactive 46 * docshells. 47 */ 48 void preserveLayers(in boolean aPreserveLayers); 49 50 readonly attribute uint64_t tabId; 51 52 readonly attribute uint64_t contentProcessId; 53 54 /** 55 * The OS level process Id of the related child process. 56 */ 57 readonly attribute int32_t osPid; 58 59 /** 60 * The toplevel BrowsingContext loaded in this remote tab. 61 */ 62 readonly attribute BrowsingContext browsingContext; 63 64 /** 65 * True if we've previously received layers for this tab when switching to 66 * it. 67 */ 68 readonly attribute boolean hasPresented; 69 70 /** 71 * Ensures that the content process which has this remote tab has all of the 72 * permissions required to load a document with the given principal. 73 */ 74 void transmitPermissionsForPrincipal(in nsIPrincipal aPrincipal); 75 76 /** 77 * Similar to `nsIDocShell.createAboutBlankDocumentViewer` but on a remote 78 * frame. The docShell must not yet have navigated away from the initial 79 * about:blank document when this method is called. 80 * 81 * @param aPrincipal the principal to use for the new document. 82 * @param aPartitionedPrincipal the partitioned principal to use for the new 83 * document. 84 */ 85 void createAboutBlankDocumentViewer(in nsIPrincipal aPrincipal, 86 in nsIPrincipal aPartitionedPrincipal); 87 88 cenum NavigationType : 8 { 89 NAVIGATE_BACK = 0, 90 NAVIGATE_FORWARD = 1, 91 NAVIGATE_INDEX = 2, 92 NAVIGATE_URL = 3 93 }; 94 95 /** 96 * Interrupt content scripts if possible/needed to allow chrome scripts in the 97 * content process to run (in particular, to allow navigating through browser 98 * history. 99 */ 100 [implicit_jscontext, binaryname(MaybeCancelContentJSExecutionFromScript)] 101 void maybeCancelContentJSExecution( 102 in nsIRemoteTab_NavigationType aNavigationType, 103 [optional] in jsval aCancelContentJSOptions); 104 105 /** 106 * Notify the remote tab that the resolution has changed. 107 */ 108 [noscript] void notifyResolutionChanged(); 109 };