tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

xpcAccessiblePivot.h (1274B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=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 _xpcAccessiblePivot_H_
      8 #define _xpcAccessiblePivot_H_
      9 
     10 #include "nsIAccessiblePivot.h"
     11 
     12 #include "Accessible.h"
     13 #include "nsCycleCollectionParticipant.h"
     14 #include "xpcAccessible.h"
     15 
     16 namespace mozilla::a11y {
     17 /**
     18 * Class represents an accessible pivot.
     19 */
     20 class xpcAccessiblePivot final : public nsIAccessiblePivot {
     21 public:
     22  explicit xpcAccessiblePivot(nsIAccessible* aRoot);
     23 
     24  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     25  NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(xpcAccessiblePivot,
     26                                           nsIAccessiblePivot)
     27 
     28  NS_DECL_NSIACCESSIBLEPIVOT
     29 
     30 private:
     31  ~xpcAccessiblePivot();
     32  xpcAccessiblePivot() = delete;
     33  xpcAccessiblePivot(const xpcAccessiblePivot&) = delete;
     34  void operator=(const xpcAccessiblePivot&) = delete;
     35 
     36  Accessible* Root() { return mRoot ? mRoot->ToInternalGeneric() : nullptr; }
     37 
     38  /*
     39   * The root accessible.
     40   */
     41  RefPtr<nsIAccessible> mRoot;
     42 };
     43 
     44 }  // namespace mozilla::a11y
     45 
     46 #endif