Bug 1550519 - Show a translucent parent highlight when a subgrid is highlighted....
[gecko.git] / dom / base / nsPIWindowRoot.h
blobb258452a619199db41192ec7c660ddea1ee9a80d
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsPIWindowRoot_h__
8 #define nsPIWindowRoot_h__
10 #include "nsISupports.h"
11 #include "mozilla/dom/EventTarget.h"
13 class nsPIDOMWindowOuter;
14 class nsIControllers;
15 class nsIController;
16 class nsINode;
18 namespace mozilla {
19 namespace dom {
20 class BrowserParent;
21 } // namespace dom
22 } // namespace mozilla
24 #define NS_IWINDOWROOT_IID \
25 { \
26 0xb8724c49, 0xc398, 0x4f9b, { \
27 0x82, 0x59, 0x87, 0x27, 0xa6, 0x47, 0xdd, 0x0f \
28 } \
31 class nsPIWindowRoot : public mozilla::dom::EventTarget {
32 public:
33 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWINDOWROOT_IID)
35 virtual nsPIDOMWindowOuter* GetWindow() = 0;
37 // get and set the node that is the context of a popup menu
38 virtual already_AddRefed<nsINode> GetPopupNode() = 0;
39 virtual void SetPopupNode(nsINode* aNode) = 0;
41 /**
42 * @param aForVisibleWindow true if caller needs controller which is
43 * associated with visible window.
45 virtual nsresult GetControllerForCommand(const char* aCommand,
46 bool aForVisibleWindow,
47 nsIController** aResult) = 0;
49 /**
50 * @param aForVisibleWindow true if caller needs controllers which are
51 * associated with visible window.
53 virtual nsresult GetControllers(bool aForVisibleWindow,
54 nsIControllers** aResult) = 0;
56 virtual void GetEnabledDisabledCommands(
57 nsTArray<nsCString>& aEnabledCommands,
58 nsTArray<nsCString>& aDisabledCommands) = 0;
60 virtual void SetParentTarget(mozilla::dom::EventTarget* aTarget) = 0;
61 virtual mozilla::dom::EventTarget* GetParentTarget() = 0;
63 // Stores a weak reference to the browser.
64 virtual void AddBrowser(nsIRemoteTab* aBrowser) = 0;
65 virtual void RemoveBrowser(nsIRemoteTab* aBrowser) = 0;
67 typedef void (*BrowserEnumerator)(nsIRemoteTab* aTab, void* aArg);
69 // Enumerate all stored browsers that for which the weak reference is valid.
70 virtual void EnumerateBrowsers(BrowserEnumerator aEnumFunc, void* aArg) = 0;
72 virtual bool ShowFocusRings() = 0;
73 virtual void SetShowFocusRings(bool aEnable) = 0;
76 NS_DEFINE_STATIC_IID_ACCESSOR(nsPIWindowRoot, NS_IWINDOWROOT_IID)
78 #endif // nsPIWindowRoot_h__