Bug 1857632 [wpt PR 42241] - Start dbus for Chrome, a=testonly
[gecko.git] / widget / nsITouchBarHelper.idl
blob62d2e8593bb9ec7aebff57c1c0b94b2b896a0af1
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 * Toggles Urlbar focus.
35 void toggleFocusUrlbar();
37 /**
38 * Unfocuses the Urlbar.
40 void unfocusUrlbar();
42 /**
43 * Returns all available Touch Bar Inputs in an nsIArray
44 * of nsITouchBarInput objects.
46 attribute nsIArray allItems;
48 /**
49 * The context in which this nsITouchBarHelper exists. Required to create
50 * an imgLoader to load our SVG icons.
52 readonly attribute Document document;
54 /**
55 * Returns the requested TouchBarInput.
56 * Exposed for testing.
58 nsITouchBarInput getTouchBarInput(in string aInputName);
60 /**
61 * Inserts a search restriction string in the Urlbar.
62 * Exposed for testing.
64 void insertRestrictionInUrlbar(in string aToken);