Bug 1715716 [wpt PR 29323] - Use unittest.mock instead of the mock package, a=testonly
[gecko.git] / widget / nsITouchBarHelper.idl
blob13f3d6a02e905650bf2616c5baf2220eeee13468
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"
9 webidl Document;
11 /**
12 * Back-to-frontend communication for the Touch Bar
14 [scriptable, uuid(ea109912-3acc-48de-b679-c23b6a122da5)]
15 interface nsITouchBarHelper : nsISupports
17 /**
18 * Returns the active browser's URL.
20 readonly attribute AString activeUrl;
22 /**
23 * Return the active browser's page title.
25 readonly attribute AString activeTitle;
27 /**
28 * Return true if the Urlbar has focus.
30 readonly attribute boolean isUrlbarFocused;
32 /**
33 * Returns all available Touch Bar Inputs in an nsIArray
34 * of nsITouchBarInput objects.
36 attribute nsIArray allItems;
38 /**
39 * The context in which this nsITouchBarHelper exists. Required to create
40 * an imgLoader to load our SVG icons.
42 readonly attribute Document document;
44 /**
45 * Returns the requested TouchBarInput.
46 * Exposed for testing.
48 nsITouchBarInput getTouchBarInput(in string aInputName);
50 /**
51 * Inserts a search restriction string in the Urlbar.
52 * Exposed for testing.
54 void insertRestrictionInUrlbar(in string aToken);