LCOV - code coverage report
Current view: top level - accessible/generic - RootAccessible.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 2 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       5             : 
       6             : #ifndef mozilla_a11y_RootAccessible_h__
       7             : #define mozilla_a11y_RootAccessible_h__
       8             : 
       9             : #include "HyperTextAccessible.h"
      10             : #include "DocAccessibleWrap.h"
      11             : 
      12             : #include "nsIDOMEventListener.h"
      13             : 
      14             : class nsIDocument;
      15             : 
      16             : namespace mozilla {
      17             : namespace a11y {
      18             : 
      19             : class RootAccessible : public DocAccessibleWrap,
      20             :                        public nsIDOMEventListener
      21             : {
      22             :   NS_DECL_ISUPPORTS_INHERITED
      23             : 
      24             : public:
      25             :   RootAccessible(nsIDocument* aDocument, nsIPresShell* aPresShell);
      26             : 
      27             :   // nsIDOMEventListener
      28             :   NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) override;
      29             : 
      30             :   // Accessible
      31             :   virtual void Shutdown() override;
      32             :   virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) override;
      33             :   virtual Relation RelationByType(RelationType aType) override;
      34             :   virtual mozilla::a11y::role NativeRole() override;
      35             :   virtual uint64_t NativeState() override;
      36             : 
      37             :   // RootAccessible
      38             : 
      39             :   /**
      40             :    * Notify that the sub document presshell was activated.
      41             :    */
      42             :   virtual void DocumentActivated(DocAccessible* aDocument);
      43             : 
      44             :   /**
      45             :    * Return the primary remote top level document if any.
      46             :    */
      47             :   ProxyAccessible* GetPrimaryRemoteTopLevelContentDoc() const;
      48             : 
      49             : protected:
      50             :   virtual ~RootAccessible();
      51             : 
      52             :   /**
      53             :    * Add/remove DOM event listeners.
      54             :    */
      55             :   virtual nsresult AddEventListeners() override;
      56             :   virtual nsresult RemoveEventListeners() override;
      57             : 
      58             :   /**
      59             :    * Process the DOM event.
      60             :    */
      61             :   void ProcessDOMEvent(nsIDOMEvent* aEvent);
      62             : 
      63             :   /**
      64             :    * Process "popupshown" event. Used by HandleEvent().
      65             :    */
      66             :   void HandlePopupShownEvent(Accessible* aAccessible);
      67             : 
      68             :   /*
      69             :    * Process "popuphiding" event. Used by HandleEvent().
      70             :    */
      71             :   void HandlePopupHidingEvent(nsINode* aNode);
      72             : 
      73             : #ifdef MOZ_XUL
      74             :     void HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
      75             :                                         XULTreeAccessible* aAccessible);
      76             :     void HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
      77             :                                     XULTreeAccessible* aAccessible);
      78             : 
      79             :     uint32_t GetChromeFlags();
      80             : #endif
      81             : };
      82             : 
      83             : inline RootAccessible*
      84           0 : Accessible::AsRoot()
      85             : {
      86           0 :   return IsRoot() ? static_cast<mozilla::a11y::RootAccessible*>(this) : nullptr;
      87             : }
      88             : 
      89             : } // namespace a11y
      90             : } // namespace mozilla
      91             : 
      92             : #endif

Generated by: LCOV version 1.13