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/. */
7 #ifndef _xpcAccessiblePivot_H_
8 #define _xpcAccessiblePivot_H_
10 #include "nsIAccessiblePivot.h"
12 #include "Accessible.h"
13 #include "nsCycleCollectionParticipant.h"
14 #include "mozilla/Attributes.h"
15 #include "xpcAccessible.h"
17 namespace mozilla::a11y
{
19 * Class represents an accessible pivot.
21 class xpcAccessiblePivot final
: public nsIAccessiblePivot
{
23 explicit xpcAccessiblePivot(nsIAccessible
* aRoot
);
25 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
26 NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(xpcAccessiblePivot
,
29 NS_DECL_NSIACCESSIBLEPIVOT
32 ~xpcAccessiblePivot();
33 xpcAccessiblePivot() = delete;
34 xpcAccessiblePivot(const xpcAccessiblePivot
&) = delete;
35 void operator=(const xpcAccessiblePivot
&) = delete;
37 Accessible
* Root() { return mRoot
? mRoot
->ToInternalGeneric() : nullptr; }
40 * The root accessible.
42 RefPtr
<nsIAccessible
> mRoot
;
45 } // namespace mozilla::a11y