LCOV - code coverage report
Current view: top level - dom/base - nsPIWindowRoot.h (source / functions) Hit Total Coverage
Test: output.info Lines: 1 1 100.0 %
Date: 2017-07-14 16:53:18 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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/. */
       6             : 
       7             : #ifndef nsPIWindowRoot_h__
       8             : #define nsPIWindowRoot_h__
       9             : 
      10             : #include "nsISupports.h"
      11             : #include "mozilla/dom/EventTarget.h"
      12             : #include "nsWeakReference.h"
      13             : 
      14             : class nsPIDOMWindowOuter;
      15             : class nsIControllers;
      16             : class nsIController;
      17             : 
      18             : namespace mozilla {
      19             : namespace dom {
      20             : class TabParent;
      21             : } // namespace dom
      22             : } // namespace mozilla
      23             : 
      24             : #define NS_IWINDOWROOT_IID \
      25             : { 0xb8724c49, 0xc398, 0x4f9b, \
      26             :   { 0x82, 0x59, 0x87, 0x27, 0xa6, 0x47, 0xdd, 0x0f } }
      27             : 
      28           3 : class nsPIWindowRoot : public mozilla::dom::EventTarget
      29             : {
      30             : public:
      31             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWINDOWROOT_IID)
      32             : 
      33             :   virtual nsPIDOMWindowOuter* GetWindow()=0;
      34             : 
      35             :   // get and set the node that is the context of a popup menu
      36             :   virtual nsIDOMNode* GetPopupNode() = 0;
      37             :   virtual void SetPopupNode(nsIDOMNode* aNode) = 0;
      38             : 
      39             :   virtual nsresult GetControllerForCommand(const char *aCommand,
      40             :                                            nsIController** aResult) = 0;
      41             :   virtual nsresult GetControllers(nsIControllers** aResult) = 0;
      42             : 
      43             :   virtual void GetEnabledDisabledCommands(nsTArray<nsCString>& aEnabledCommands,
      44             :                                           nsTArray<nsCString>& aDisabledCommands) = 0;
      45             : 
      46             :   virtual void SetParentTarget(mozilla::dom::EventTarget* aTarget) = 0;
      47             :   virtual mozilla::dom::EventTarget* GetParentTarget() = 0;
      48             : 
      49             :   // Stores a weak reference to the browser.
      50             :   virtual void AddBrowser(mozilla::dom::TabParent* aBrowser) = 0;
      51             :   virtual void RemoveBrowser(mozilla::dom::TabParent* aBrowser) = 0;
      52             : 
      53             :   typedef void (*BrowserEnumerator)(mozilla::dom::TabParent* aTab, void* aArg);
      54             : 
      55             :   // Enumerate all stored browsers that for which the weak reference is valid.
      56             :   virtual void EnumerateBrowsers(BrowserEnumerator aEnumFunc, void* aArg) = 0;
      57             : 
      58             :   virtual bool ShowAccelerators() = 0;
      59             :   virtual bool ShowFocusRings() = 0;
      60             :   virtual void SetShowAccelerators(bool aEnable) = 0;
      61             :   virtual void SetShowFocusRings(bool aEnable) = 0;
      62             : };
      63             : 
      64             : NS_DEFINE_STATIC_IID_ACCESSOR(nsPIWindowRoot, NS_IWINDOWROOT_IID)
      65             : 
      66             : #endif // nsPIWindowRoot_h__

Generated by: LCOV version 1.13