diff -r 000000000000 -r 6474c204b198 dom/base/nsPIWindowRoot.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dom/base/nsPIWindowRoot.h Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef nsPIWindowRoot_h__ +#define nsPIWindowRoot_h__ + +#include "nsISupports.h" +#include "mozilla/dom/EventTarget.h" + +class nsPIDOMWindow; +class nsIControllers; +class nsIController; + +#define NS_IWINDOWROOT_IID \ +{ 0x3f71f50c, 0xa7e0, 0x43bc, \ + { 0xac, 0x25, 0x4d, 0xbb, 0x88, 0x7b, 0x21, 0x09 } } + +class nsPIWindowRoot : public mozilla::dom::EventTarget +{ +public: + NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWINDOWROOT_IID) + + virtual nsPIDOMWindow* GetWindow()=0; + + // get and set the node that is the context of a popup menu + virtual nsIDOMNode* GetPopupNode() = 0; + virtual void SetPopupNode(nsIDOMNode* aNode) = 0; + + virtual nsresult GetControllerForCommand(const char *aCommand, + nsIController** aResult) = 0; + virtual nsresult GetControllers(nsIControllers** aResult) = 0; + + virtual void SetParentTarget(mozilla::dom::EventTarget* aTarget) = 0; + virtual mozilla::dom::EventTarget* GetParentTarget() = 0; + virtual nsIDOMWindow* GetOwnerGlobal() MOZ_OVERRIDE = 0; +}; + +NS_DEFINE_STATIC_IID_ACCESSOR(nsPIWindowRoot, NS_IWINDOWROOT_IID) + +#endif // nsPIWindowRoot_h__