Files
palemoon27/dom/base/nsIMessageManager.idl
T
roytam1 493f6ccfe1 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1131350 - Move update() to ServiceWorkerRegistration. r=baku (05a1a2455)
- Bug 1131327 - Patch 1 - Introduce ServiceWorkerRegistration{Base,MainThread,WorkerThread} r=baku (6d06516fb)
- Bug 1131327 - Patch 2 - Expose to workers. r=baku (bcc78d2dc)
- Bug 1131327 - Patch 3 - move event listeners to main thread class. r=baku (71d13a32e)
- Bug 1131327 - Patch 4 - Implement ServiceWorkerRegistration.update() on worker. r=baku (96fc35b67)
- Bug 1131327 - Patch 5 - Implement ServiceWorkerRegistration.unregister() on worker. r=baku (830bb8621)
- Bug 1131327 - Patch 6 - SWM holds ServiceWorkerRegistrationListener for updatefound and invalidation notifications. r=baku (52510f4f7)
- Bug 1131327 - Patch 7 - Fire updatefound on worker registration. r=baku (a3df7a2c5)
- Bug 1131327 - Patch 8 - Return null on worker attribute access. r=baku (e14624ed0)
- Bug 1131327 - Patch 9 - Fix windows compiler macro error. r=baku (9729d9603)
- Bug 1131327 - Patch 10 - Remember to remove the feature. r=baku (10842d560)
- Bug 1131327 followup: Add 'override' annotation to WorkerListener refcounting functions. rs=ehsan (0f623d0ce)
- Bug 1156397 - some fix for webpush PushServer. r=dougt r=nsm (351b7e56d)
- adjust to be able to apply patches (99479d8c1)
- Bug 1158218 Improve ServiceWorkerManager NS_WARNINGS on failure. r=nsm (7c51f3ad4)
- Bug 1038238 - Part 0: Make js/src/vm/SavedStacks.h use 1-based column numbers, (d0584178f)
- Bug 1145294. Remove the obj argument from JS::CloneAndExecuteScript. r=luke (a799d46f2)
- Bug 1038238 - Part 1: Make Error instances use SavedFrame objects for their stacks; r=jorendorff (bca4901a6)
- Bug 1038238 - Part 2: Add module level documentation for js/src/vm/SavedStacks.h; r=jorendorf (fa039731c)
- Bug 1038238 - Part 3: js::ComputeStackString should use SavedFrame; r=jorendorff (08b76514e)
- Bug 1140435 - Part 1 - Add the asyncCause and asyncCaller properties to nsIStackFrame. r=bz (e984c7c78)
- Bug 1140435 - Part 2 - Allow JS code to provide an async stack when calling a function. r=bz (8fca947d4)
- Bug 1147193. Go back to having our accessors on JSStackFrame infallible. r=bholley (ca4738861)
- Bug 1038238 - Part 4: Rename JS::StringifySavedFrameStack to JS::BuildStackString; r=jorendorff (30b7dd914)
- Bug 1148854 - Part 1: Relax the assertion in ServiceWorkerManager::DispatchFetchEvent; r=nsm,jdm (be0c8b711)
- Bug 1148854 - Part 2: Resume the intercepted network reuest if the interception fails for some reason; r=jdm (5242ce66a)
- Bug 1152473 - Remove InstallEvent. r=nsm,ehsan (774c4dfd8)
- Bug 1158218 Follow-up to fix mis-indentation. DONTBUILD, whitespace-only r=me (9164bd5d5)
- Bug 1157627 - about:serviceworkers should show new registered ServiceWorkers. r=nsm (e74322897)
- Bug 1134841 Hold ServiceWorker alive during install event's waitUntil(). r=bz (06587b935)
- Bug 1134325 - Part 1: Add an API for cloning a channel's upload stream; r=mcmanus (48c393420)
- Bug 1127552 - Add Telemetry to Fetch. r=nsm (2e091cc82)
- Bug 1134325 - Part 2: Correctly reflect the Request's body to the service worker's fetch event; r=jdm (359b2ba88)
- Bug 1154494 - Hit network only once. r=baku,bkelly (053dcaab9)
- part of Bug 1133805 - Enable all serviceworker tests (0f7113f81)
- Bug 1159378 - Part 1: Enable nsIStreamLoader to optionally notify an nsIRequestObserver; r=mcmanus (689925442)
- Bug 1159378 - Part 2: When storing the service worker downloaded after a failed network compare into the cache, store its security info in the cache as well; r=nsm (c09d17439)
- Bug 1152602 - dom/workers/test/serviceworkers/importscript.sjs should return an error at the second request, r=ehsan (1b0615460)
- Bug 1155989 - Dump the rejection of the promise returned by ServiceWorkerRegistration.unregister() in our tests; r=nsm (b6530f536)
- Bug 1159813 - Make sure service worker tests clean up after themselves; r=baku (584fadbd9)
- Bug 1140658 - Part 8: Disable the service worker part of these tests on b2g while bug 1137683 gets fixed; r=bkelly (8be7d310f)
- Bug 1141256 - Stop randomizing the URL for the service worker now that bug 931249 has been fixed (9b2ed03c4)
- Bug 1155988 - Use the ready promise more often in service worker tests; r=nsm (f7dc83d17)
- Bug 1159378 - Part 3: Refactor the logic of test_periodic_update.html into a helper script; r=nsm (daf047eda)
- Bug 1159378 - Part 4: Add a unit test for periodic updates of service workers on HTTPS origins; r=nsm (c3835fc1e)
- Bug 1080109 - Clear ServiceWorkers when clearing history or forgetting about site. r=baku,ehsan (207e84372)
- Bug 1155789 - Fail if sending a CPOW in parent when no CPOW manager exists (r=dvander) (6969640f0)
- Bug 1140284 - start the resolver even when offline; r=ehsan (673dab867)
- Bug 1149228, cache data: and https: handlers, r=honzab.moz (9735704f1)
- Bug 1140597 - Don't try and process device storage notifications if the process isn't using device storage. r=alchen (7112bbfd6)
- Bug 1035748 - WebIDL for DeviceStorageAreaChangedEvent. r=bz (7f59ebc63)
- Bug 1160190. Remove most of the pref annotations in test_interfaces and test_worker_interfaces. r=jst (e56728895)
- Bug 1126694 - IDL changes for DeviceStorageAreaListener. r=bz (47859f88a)
- Bug 1126694 - Impl of DeviceStorageAreaListener. r=bz, dhylands (f2ac42d54)
- Bug 1071562, check type now that CString is supported, r=smaug (284a5d81e)
- Bug 1160279: Recreate nsIFiles in the content process for dragged files. r=smaug (36fe16053)
- Bug 1134596 - SetOffline(false) in nsIOService::Init r=honzab (2660ea3d8)
- Bug 1134596 - Separate nsIOService's network detection from offlineMode r=honzab (8f5f02733)
- Bug 1134596 - Add network.offline-mirrors-connectivity pref to preserve previous behaviour r=honzab (ad4512be7)
- Bug 1179779 - Neither XRE_START_OFFLINE nor -offline work any more. r=mayhemer (218cbf4f4)
- Bug 1139628 - Test (r=billm) (787a5b937)
- Bug 1153023 - Extract an AddWindowListeners function. r=billm (380833b02)
- Bug 1153023 - Send the child process a dimensions update when the offset changes. r=roc (ad2306bd8)
- Bug 1153023 - Fix check to see if the TabParent::mRect needs updating. r=billm (aaa2ac2f1)
- Bug 1096093 - Send ThemeRefresh message from parent down to content process. r=smaug. (2049f1d97)
- Bug 1138793 - Add a sync IPC to get BrowserConfiguration. r=baku (41ec33eb6)
- Bug 803783 - Send message manager results via structured clone (r=bent) (0ea5d1ec6)
- Bug 1162838 - Allow sending initial process data to content processes (r=smaug) (a4bfdcc35)
- Bug 1143938 - Add listener argument to Components.utils.forceCC. r=smaug (f7ec5bd82)
- Bug 1137536, part 1 - Move DeferredFinalize out of the cyclecollector namespace. r=smaug (a3aab49c8)
- fix include order (196862592)
- Bug 1137536, part 2 - Make sure every file that uses an nsCycleCollector_ function includes nsCycleCollector.h. r=smaug (87e21ac93)
- Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan (8b3c092f1)
- Bug 1096494: Followup to use @binpath@ in package manifest for uninstall helper.exe. r=rstrong (8f240d126)
- Bug 1147839 - Fixed building installer on mingw. r=glandium (6b3081f87)
- Bug 1151005 - Refactor terminal notification stuff from 'mach build' into MozbuildObject r=gps (e556c0833)
- fix Install (f29193421)
- Bug 1151005 - Show notifications when the 'install' and 'package' mach commands complete r=gps (23b706bb6)
- mark done (91a6e3c2f)
- Bug 1154877 - Content process shouldn't use the Places Database. r=billm (aca46ccea)
- Bug 1170011 - Disable infinite recursion on the View Source command; r=jaws (9919916e9)
- Bug 1109875 - Fix test failures by making <xul:iframe> and <xul:editor> elements query the frameLoader for the docShell instead of the boxObject r=smaug (4a31ef82d)
- Bug 1109875 - Fix various other tests to properly wait for data from closed tabs r=billm (c7fbb0e08)
- Bug 1109875 - Add tests for async tab removal r=billm (0b02701ff)
2020-07-18 10:42:45 +08:00

541 lines
20 KiB
Plaintext

/* -*- 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/. */
#include "nsISupports.idl"
interface nsIDOMWindow;
interface nsIDocShell;
interface nsIContent;
interface nsIFrameLoader;
interface nsIPrincipal;
/**
* Message managers provide a way for chrome-privileged JS code to
* communicate with each other, even across process boundaries.
*
* Message managers are separated into "parent side" and "child side".
* These don't always correspond to process boundaries, but can. For
* each child-side message manager, there is always exactly one
* corresponding parent-side message manager that it sends messages
* to. However, for each parent-side message manager, there may be
* either one or many child-side managers it can message.
*
* Message managers that always have exactly one "other side" are of
* type nsIMessageSender. Parent-side message managers that have many
* "other sides" are of type nsIMessageBroadcaster.
*
* Child-side message managers can send synchronous messages to their
* parent side, but not the other way around.
*
* There are two realms of message manager hierarchies. One realm
* approximately corresponds to DOM elements, the other corresponds to
* process boundaries.
*
* Message managers corresponding to DOM elements
* ==============================================
*
* In this realm of message managers, there are
* - "frame message managers" which correspond to frame elements
* - "window message managers" which correspond to top-level chrome
* windows
* - "group message managers" which correspond to named message
* managers with a specific window MM as the parent
* - the "global message manager", on the parent side. See below.
*
* The DOM-realm message managers can communicate in the ways shown by
* the following diagram. The parent side and child side can
* correspond to process boundaries, but don't always.
*
* Parent side Child side
* ------------- ------------
* global MMg
* |
* +-->window MMw1
* | |
* | +-->frame MMp1_1<------------>frame MMc1_1
* | |
* | +-->frame MMp1_2<------------>frame MMc1_2
* | |
* | +-->group MMgr1
* | | |
* | | +-->frame MMp2_1<------->frame MMc2_1
* | | |
* | | +-->frame MMp2_2<------->frame MMc2_2
* | |
* | +-->group MMgr2
* | | ...
* | |
* | ...
* |
* +-->window MMw2
* ...
*
* For example: a message sent from MMc1_1, from the child side, is
* sent only to MMp1_1 on the parent side. However, note that all
* message managers in the hierarchy above MMp1_1, in this diagram
* MMw1 and MMg, will also notify their message listeners when the
* message arrives.
*
* A message sent from MMc2_1 will be sent to MMp2_1 and also notify
* all message managers in the hierarchy above that, including the
* group message manager MMgr1.
* For example: a message broadcast through the global MMg on the
* parent side would be broadcast to MMw1, which would transitively
* broadcast it to MMp1_1, MM1p_2. The message would next be
* broadcast to MMgr1, which would broadcast it to MMp2_1 and MMp2_2.
* After that it would broadcast to MMgr2 and then to MMw2, and so
* on down the hierarchy.
*
* ***** PERFORMANCE AND SECURITY WARNING *****
* Messages broadcast through the global MM and window or group MMs
* can result in messages being dispatched across many OS processes,
* and to many processes with different permissions. Great care
* should be taken when broadcasting.
*
* Interfaces
* ----------
*
* The global MMg and window MMw's are message broadcasters implementing
* nsIMessageBroadcaster while the frame MMp's are simple message senders
* (nsIMessageSender). Their counterparts in the content processes are
* message senders implementing nsIContentFrameMessageManager.
*
* nsIMessageListenerManager
* / \
* nsIMessageSender nsIMessageBroadcaster
* |
* nsISyncMessageSender (content process/in-process only)
* |
* nsIContentFrameMessageManager (content process/in-process only)
* |
* nsIInProcessContentFrameMessageManager (in-process only)
*
*
* Message managers in the chrome process can also be QI'ed to nsIFrameScriptLoader.
*
*
* Message managers corresponding to process boundaries
* ====================================================
*
* The second realm of message managers is the "process message
* managers". With one exception, these always correspond to process
* boundaries. The picture looks like
*
* Parent process Child processes
* ---------------- -----------------
* global (GPPMM)
* |
* +-->parent in-process PIPMM<-->child in-process CIPPMM
* |
* +-->parent (PPMM1)<------------------>child (CPMM1)
* |
* +-->parent (PPMM2)<------------------>child (CPMM2)
* ...
*
* Note, PIPMM and CIPPMM both run in the parent process.
*
* For example: the parent-process PPMM1 sends messages to the
* child-process CPMM1.
*
* For example: CPMM1 sends messages directly to PPMM1. The global GPPMM
* will also notify their message listeners when the message arrives.
*
* For example: messages sent through the global GPPMM will be
* dispatched to the listeners of the same-process, CIPPMM, CPMM1,
* CPMM2, etc.
*
* ***** PERFORMANCE AND SECURITY WARNING *****
* Messages broadcast through the GPPMM can result in messages
* being dispatched across many OS processes, and to many processes
* with different permissions. Great care should be taken when
* broadcasting.
*
* Requests sent to parent-process message listeners should usually
* have replies scoped to the requesting CPMM. The following pattern
* is common
*
* const ParentProcessListener = {
* receiveMessage: function(aMessage) {
* let childMM = aMessage.target.QueryInterface(Ci.nsIMessageSender);
* switch (aMessage.name) {
* case "Foo:Request":
* // service request
* childMM.sendAsyncMessage("Foo:Response", { data });
* }
* }
* };
*/
[scriptable, function, uuid(2b44eb57-a9c6-4773-9a1e-fe0818739a4c)]
interface nsIMessageListener : nsISupports
{
/**
* This is for JS only.
* receiveMessage is called with one parameter, which has the following
* properties:
* {
* target: %the target of the message. Either an element owning
* the message manager, or message manager itself if no
* element owns it%
* name: %message name%,
* sync: %true or false%.
* data: %structured clone of the sent message data%,
* json: %same as .data, deprecated%,
* objects: %named table of jsvals/objects, or null%
* principal: %principal for the window app
* }
*
* Each listener is invoked with its own copy of the message
* parameter.
*
* When the listener is called, 'this' value is the target of the message.
*
* If the message is synchronous, the possible return value is
* returned as JSON (will be changed to use structured clones).
* When there are multiple listeners to sync messages, each
* listener's return value is sent back as an array. |undefined|
* return values show up as undefined values in the array.
*/
void receiveMessage();
};
[scriptable, builtinclass, uuid(b949bfec-bb7d-47bc-b387-ac6a9b655072)]
interface nsIMessageListenerManager : nsISupports
{
/**
* Register |listener| to receive |messageName|. All listener
* callbacks for a particular message are invoked when that message
* is received.
*
* The message manager holds a strong ref to |listener|.
*
* If the same listener registers twice for the same message, the
* second registration is ignored.
*
* Pass true for listenWhenClosed if you want to receive messages
* during the short period after a frame has been removed from the
* DOM and before its frame script has finished unloading. This
* parameter only has an effect for frame message managers in
* the main process. Default is false.
*/
void addMessageListener(in AString messageName,
in nsIMessageListener listener,
[optional] in boolean listenWhenClosed);
/**
* Undo an |addMessageListener| call -- that is, calling this causes us to no
* longer invoke |listener| when |messageName| is received.
*
* removeMessageListener does not remove a message listener added via
* addWeakMessageListener; use removeWeakMessageListener for that.
*/
void removeMessageListener(in AString messageName,
in nsIMessageListener listener);
/**
* This is just like addMessageListener, except the message manager holds a
* weak ref to |listener|.
*
* If you have two weak message listeners for the same message, they may be
* called in any order.
*/
void addWeakMessageListener(in AString messageName,
in nsIMessageListener listener);
/**
* This undoes an |addWeakMessageListener| call.
*/
void removeWeakMessageListener(in AString messageName,
in nsIMessageListener listener);
[notxpcom] boolean markForCC();
};
/**
* Message "senders" have a single "other side" to which messages are
* sent. For example, a child-process message manager will send
* messages that are only delivered to its one parent-process message
* manager.
*/
[scriptable, builtinclass, uuid(bb5d79e4-e73c-45e7-9651-4d718f4b994c)]
interface nsIMessageSender : nsIMessageListenerManager
{
/**
* Send |messageName| and |obj| to the "other side" of this message
* manager. This invokes listeners who registered for
* |messageName|.
*
* See nsIMessageListener::receiveMessage() for the format of the
* data delivered to listeners.
* @throws NS_ERROR_NOT_INITIALIZED if the sender is not initialized. For
* example, we will throw NS_ERROR_NOT_INITIALIZED if we try to send
* a message to a cross-process frame but the other process has not
* yet been set up.
* @throws NS_ERROR_FAILURE when the message receiver cannot be found. For
* example, we will throw NS_ERROR_FAILURE if we try to send a message
* to a cross-process frame whose process has crashed.
*/
[implicit_jscontext, optional_argc]
void sendAsyncMessage([optional] in AString messageName,
[optional] in jsval obj,
[optional] in jsval objects,
[optional] in nsIPrincipal principal);
};
/**
* Message "broadcasters" don't have a single "other side" that they
* send messages to, but rather a set of subordinate message managers.
* For example, broadcasting a message through a window message
* manager will broadcast the message to all frame message managers
* within its window.
*/
[scriptable, builtinclass, uuid(4d7d62ad-4725-4f39-86cf-8fb22bf9c1d8)]
interface nsIMessageBroadcaster : nsIMessageListenerManager
{
/**
* Like |sendAsyncMessage()|, but also broadcasts this message to
* all "child" message managers of this message manager. See long
* comment above for details.
*
* WARNING: broadcasting messages can be very expensive and leak
* sensitive data. Use with extreme caution.
*/
[implicit_jscontext, optional_argc]
void broadcastAsyncMessage([optional] in AString messageName,
[optional] in jsval obj,
[optional] in jsval objects);
/**
* Number of subordinate message managers.
*/
readonly attribute unsigned long childCount;
/**
* Return a single subordinate message manager.
*/
nsIMessageListenerManager getChildAt(in unsigned long aIndex);
};
[scriptable, builtinclass, uuid(0e602c9e-1977-422a-a8e4-fe0d4a4f78d0)]
interface nsISyncMessageSender : nsIMessageSender
{
/**
* Like |sendAsyncMessage()|, except blocks the sender until all
* listeners of the message have been invoked. Returns an array
* containing return values from each listener invoked.
*/
[implicit_jscontext, optional_argc]
jsval sendSyncMessage([optional] in AString messageName,
[optional] in jsval obj,
[optional] in jsval objects,
[optional] in nsIPrincipal principal);
/**
* Like |sendSyncMessage()|, except re-entrant. New RPC messages may be
* issued even if, earlier on the call stack, we are waiting for a reply
* to an earlier sendRpcMessage() call.
*
* Both sendSyncMessage and sendRpcMessage will block until a reply is
* received, but they may be temporarily interrupted to process an urgent
* incoming message (such as a CPOW request).
*/
[implicit_jscontext, optional_argc]
jsval sendRpcMessage([optional] in AString messageName,
[optional] in jsval obj,
[optional] in jsval objects,
[optional] in nsIPrincipal principal);
};
[scriptable, builtinclass, uuid(13f3555f-769e-44ea-b607-5239230c3162)]
interface nsIMessageManagerGlobal : nsISyncMessageSender
{
/**
* Print a string to stdout.
*/
void dump(in DOMString aStr);
/**
* If leak detection is enabled, print a note to the leak log that this
* process will intentionally crash.
*/
void privateNoteIntentionalCrash();
/**
* Ascii base64 data to binary data and vice versa
*/
DOMString atob(in DOMString aAsciiString);
DOMString btoa(in DOMString aBase64Data);
};
[scriptable, builtinclass, uuid(fff36099-9f84-4c7c-b69a-1cbf103d1708)]
interface nsIContentFrameMessageManager : nsIMessageManagerGlobal
{
/**
* The current top level window in the frame or null.
*/
readonly attribute nsIDOMWindow content;
/**
* The top level docshell or null.
*/
readonly attribute nsIDocShell docShell;
};
[uuid(9c6bd4d7-88d2-46d6-8606-f2d57d46f051)]
interface nsIInProcessContentFrameMessageManager : nsIContentFrameMessageManager
{
[notxpcom] nsIContent getOwnerContent();
[notxpcom] void cacheFrameLoader(in nsIFrameLoader aFrameLoader);
};
[scriptable, builtinclass, uuid(6d12e467-2446-46db-9965-e4e93cb87ca5)]
interface nsIContentProcessMessageManager : nsIMessageManagerGlobal
{
/**
* Read out a copy of the object that was initialized in the parent
* process via nsIProcessScriptLoader.initialProcessData.
*/
[implicit_jscontext]
readonly attribute jsval initialProcessData;
};
[scriptable, builtinclass, uuid(bf61446b-ba24-4b1d-88c7-4f94724b9ce1)]
interface nsIFrameScriptLoader : nsISupports
{
/**
* Load a script in the (remote) frame. aURL must be the absolute URL.
* data: URLs are also supported. For example data:,dump("foo\n");
* If aAllowDelayedLoad is true, script will be loaded when the
* remote frame becomes available. Otherwise the script will be loaded
* only if the frame is already available.
*/
void loadFrameScript(in AString aURL, in boolean aAllowDelayedLoad,
[optional] in boolean aRunInGlobalScope);
/**
* Removes aURL from the list of scripts which support delayed load.
*/
void removeDelayedFrameScript(in AString aURL);
/**
* Returns all delayed scripts that will be loaded once a (remote)
* frame becomes available. The return value is a list of pairs
* [<URL>, <WasLoadedInGlobalScope>].
*/
[implicit_jscontext]
jsval getDelayedFrameScripts();
};
[scriptable, builtinclass, uuid(7e1e1a20-b24f-11e4-ab27-0800200c9a66)]
interface nsIProcessScriptLoader : nsISupports
{
/**
* Load a script in the (possibly remote) process. aURL must be the absolute URL.
* data: URLs are also supported. For example data:,dump("foo\n");
* If aAllowDelayedLoad is true, script will be loaded when the
* remote frame becomes available. Otherwise the script will be loaded
* only if the frame is already available.
*/
void loadProcessScript(in AString aURL, in boolean aAllowDelayedLoad);
/**
* Removes aURL from the list of scripts which support delayed load.
*/
void removeDelayedProcessScript(in AString aURL);
/**
* Returns all delayed scripts that will be loaded once a (remote)
* frame becomes available. The return value is a list of URLs.
*/
[implicit_jscontext]
jsval getDelayedProcessScripts();
};
[scriptable, builtinclass, uuid(5b390753-abb3-49b0-ae3b-b803dab58144)]
interface nsIGlobalProcessScriptLoader : nsIProcessScriptLoader
{
/**
* Allows the parent process to set the initial process data for
* new, not-yet-created child processes. This attribute should only
* be used by the global parent process message manager. When a new
* process is created, it gets a copy of this data (via structured
* cloning). It can access the data via the initialProcessData
* attribute of its childprocessmessagemanager.
*
* This value will always be a JS object. Different users are
* expected to set properties on this object. The property name
* should be unique enough that other Gecko consumers won't
* accidentally choose it.
*/
[implicit_jscontext]
readonly attribute jsval initialProcessData;
};
[scriptable, builtinclass, uuid(637e8538-4f8f-4a3d-8510-e74386233e19)]
interface nsIProcessChecker : nsISupports
{
bool killChild();
/**
* Return true if the "remote" process has |aPermission|. This is
* intended to be used by JS implementations of cross-process DOM
* APIs, like so
*
* recvFooRequest: function(message) {
* if (!message.target.assertPermission("foo")) {
* return false;
* }
* // service foo request
*
* This interface only returns meaningful data when our content is
* in a separate process. If it shares the same OS process as us,
* then applying this permission check doesn't add any security,
* though it doesn't hurt anything either.
*
* Note: If the remote content process does *not* have |aPermission|,
* it will be killed as a precaution.
*/
boolean assertPermission(in DOMString aPermission);
/**
* Return true if the "remote" process has |aManifestURL|. This is
* intended to be used by JS implementations of cross-process DOM
* APIs, like so
*
* recvFooRequest: function(message) {
* if (!message.target.assertContainApp("foo")) {
* return false;
* }
* // service foo request
*
* This interface only returns meaningful data when our content is
* in a separate process. If it shares the same OS process as us,
* then applying this manifest URL check doesn't add any security,
* though it doesn't hurt anything either.
*
* Note: If the remote content process does *not* contain |aManifestURL|,
* it will be killed as a precaution.
*/
boolean assertContainApp(in DOMString aManifestURL);
boolean assertAppHasPermission(in DOMString aPermission);
/**
* Return true if the "remote" process' principal has an appStatus equal to
* |aStatus|.
*
* This interface only returns meaningful data when our content is
* in a separate process. If it shares the same OS process as us,
* then applying this permission check doesn't add any security,
* though it doesn't hurt anything either.
*
* Note: If the remote content process does *not* has the |aStatus|,
* it will be killed as a precaution.
*/
boolean assertAppHasStatus(in unsigned short aStatus);
};