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 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | [scriptable, uuid(D5B61B82-1DA4-11d3-BF87-00105A1B0627)] |
michael@0 | 9 | interface nsIController : nsISupports { |
michael@0 | 10 | boolean isCommandEnabled(in string command); |
michael@0 | 11 | boolean supportsCommand(in string command); |
michael@0 | 12 | |
michael@0 | 13 | void doCommand(in string command); |
michael@0 | 14 | |
michael@0 | 15 | void onEvent(in string eventName); |
michael@0 | 16 | }; |
michael@0 | 17 | |
michael@0 | 18 | |
michael@0 | 19 | /* |
michael@0 | 20 | |
michael@0 | 21 | Enhanced controller interface that allows for passing of parameters |
michael@0 | 22 | to commands. |
michael@0 | 23 | |
michael@0 | 24 | */ |
michael@0 | 25 | |
michael@0 | 26 | interface nsICommandParams; |
michael@0 | 27 | |
michael@0 | 28 | [scriptable, uuid(EBE55080-C8A9-11D5-A73C-DD620D6E04BC)] |
michael@0 | 29 | interface nsICommandController : nsISupports |
michael@0 | 30 | { |
michael@0 | 31 | |
michael@0 | 32 | void getCommandStateWithParams( in string command, in nsICommandParams aCommandParams); |
michael@0 | 33 | |
michael@0 | 34 | void doCommandWithParams(in string command, in nsICommandParams aCommandParams); |
michael@0 | 35 | |
michael@0 | 36 | }; |
michael@0 | 37 | |
michael@0 | 38 | |
michael@0 | 39 | /* |
michael@0 | 40 | An API for registering commands in groups, to allow for |
michael@0 | 41 | updating via nsIDOMWindow::UpdateCommands. |
michael@0 | 42 | */ |
michael@0 | 43 | interface nsISimpleEnumerator; |
michael@0 | 44 | |
michael@0 | 45 | [scriptable, uuid(9F82C404-1C7B-11D5-A73C-ECA43CA836FC)] |
michael@0 | 46 | interface nsIControllerCommandGroup : nsISupports |
michael@0 | 47 | { |
michael@0 | 48 | |
michael@0 | 49 | void addCommandToGroup(in string aCommand, in string aGroup); |
michael@0 | 50 | void removeCommandFromGroup(in string aCommand, in string aGroup); |
michael@0 | 51 | |
michael@0 | 52 | boolean isCommandInGroup(in string aCommand, in string aGroup); |
michael@0 | 53 | |
michael@0 | 54 | /* |
michael@0 | 55 | We should expose some methods that allow for enumeration. |
michael@0 | 56 | */ |
michael@0 | 57 | nsISimpleEnumerator getGroupsEnumerator(); |
michael@0 | 58 | |
michael@0 | 59 | nsISimpleEnumerator getEnumeratorForGroup(in string aGroup); |
michael@0 | 60 | |
michael@0 | 61 | }; |
michael@0 | 62 |