Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "domstubs.idl" |
michael@0 | 6 | |
michael@0 | 7 | interface nsIURI; |
michael@0 | 8 | interface nsIDOMWindow; |
michael@0 | 9 | |
michael@0 | 10 | // Implemented by the contract id @mozilla.org/system-message-internal;1 |
michael@0 | 11 | |
michael@0 | 12 | [scriptable, uuid(6296a314-2abf-4cd0-9097-5e81ee6832e2)] |
michael@0 | 13 | interface nsISystemMessagesInternal : nsISupports |
michael@0 | 14 | { |
michael@0 | 15 | /* |
michael@0 | 16 | * Allow any internal user to broadcast a message of a given type. |
michael@0 | 17 | * @param type The type of the message to be sent. |
michael@0 | 18 | * @param message The message payload. |
michael@0 | 19 | * @param pageURI The URI of the page that will be opened. |
michael@0 | 20 | * @param manifestURI The webapp's manifest URI. |
michael@0 | 21 | * @param extra Extra opaque information that will be passed around in the observer |
michael@0 | 22 | * notification to open the page. |
michael@0 | 23 | */ |
michael@0 | 24 | void sendMessage(in DOMString type, in jsval message, in nsIURI pageURI, in nsIURI manifestURI, [optional] in jsval extra); |
michael@0 | 25 | |
michael@0 | 26 | /* |
michael@0 | 27 | * Allow any internal user to broadcast a message of a given type. |
michael@0 | 28 | * The application that registers the message will be launched. |
michael@0 | 29 | * @param type The type of the message to be sent. |
michael@0 | 30 | * @param message The message payload. |
michael@0 | 31 | * @param extra Extra opaque information that will be passed around in the observer |
michael@0 | 32 | * notification to open the page. |
michael@0 | 33 | */ |
michael@0 | 34 | void broadcastMessage(in DOMString type, in jsval message, [optional] in jsval extra); |
michael@0 | 35 | |
michael@0 | 36 | /* |
michael@0 | 37 | * Registration of a page that wants to be notified of a message type. |
michael@0 | 38 | * @param type The message type. |
michael@0 | 39 | * @param pageURI The URI of the page that will be opened. |
michael@0 | 40 | * @param manifestURI The webapp's manifest URI. |
michael@0 | 41 | */ |
michael@0 | 42 | void registerPage(in DOMString type, in nsIURI pageURI, in nsIURI manifestURI); |
michael@0 | 43 | }; |
michael@0 | 44 | |
michael@0 | 45 | [scriptable, uuid(002f0e82-91f0-41de-ad43-569a2b9d12df)] |
michael@0 | 46 | interface nsISystemMessagesWrapper: nsISupports |
michael@0 | 47 | { |
michael@0 | 48 | /* |
michael@0 | 49 | * Wrap a message and gives back any kind of object. |
michael@0 | 50 | * @param message The json blob to wrap. |
michael@0 | 51 | */ |
michael@0 | 52 | jsval wrapMessage(in jsval message, in nsIDOMWindow window); |
michael@0 | 53 | }; |
michael@0 | 54 | |
michael@0 | 55 | /* |
michael@0 | 56 | * Implements an interface to allow specific message types to |
michael@0 | 57 | * configure some behaviors |
michael@0 | 58 | */ |
michael@0 | 59 | [scriptable, uuid(a0e970f6-faa9-4605-89d6-fafae8b10a80)] |
michael@0 | 60 | interface nsISystemMessagesConfigurator: nsISupports |
michael@0 | 61 | { |
michael@0 | 62 | /* |
michael@0 | 63 | * Will be true if this type of system messages assumes/requires |
michael@0 | 64 | * that the app will be brought to the front always. |
michael@0 | 65 | */ |
michael@0 | 66 | readonly attribute boolean mustShowRunningApp; |
michael@0 | 67 | }; |