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/. */
5 #include
"nsIArray.idl"
6 #include
"nsISupports.idl"
7 #include
"nsITouchBarInput.idl"
12 * Back-to-frontend communication for the Touch Bar
14 [scriptable
, uuid(ea109912
-3acc
-48de
-b679
-c23b6a122da5
)]
15 interface nsITouchBarHelper
: nsISupports
18 * Returns the active browser's URL.
20 readonly attribute AString activeUrl
;
23 * Return the active browser's page title.
25 readonly attribute AString activeTitle
;
28 * Return true if the Urlbar has focus.
30 readonly attribute
boolean isUrlbarFocused
;
33 * Returns all available Touch Bar Inputs in an nsIArray
34 * of nsITouchBarInput objects.
36 attribute nsIArray allItems
;
39 * The context in which this nsITouchBarHelper exists. Required to create
40 * an imgLoader to load our SVG icons.
42 readonly attribute Document document
;
45 * Returns the requested TouchBarInput.
46 * Exposed for testing.
48 nsITouchBarInput getTouchBarInput
(in string aInputName
);
51 * Inserts a search restriction string in the Urlbar.
52 * Exposed for testing.
54 void insertRestrictionInUrlbar
(in string aToken
);