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 _nsAccessibleRelation_H_
7 #define _nsAccessibleRelation_H_
8 
9 #include "nsIAccessibleRelation.h"
10 
11 #include "nsCOMPtr.h"
12 #include "nsTArray.h"
13 #include "nsIMutableArray.h"
14 #include "mozilla/Attributes.h"
15 #include "mozilla/a11y/RemoteAccessible.h"
16 
17 namespace mozilla {
18 namespace a11y {
19 
20 class Relation;
21 
22 /**
23  * Class represents an accessible relation.
24  */
25 class nsAccessibleRelation final : public nsIAccessibleRelation {
26  public:
27   nsAccessibleRelation(uint32_t aType, Relation* aRel);
28 
29   nsAccessibleRelation(uint32_t aType,
30                        const nsTArray<RemoteAccessible*>* aTargets);
31 
32   NS_DECL_ISUPPORTS
33   NS_DECL_NSIACCESSIBLERELATION
34 
35  private:
36   nsAccessibleRelation();
37   ~nsAccessibleRelation();
38 
39   nsAccessibleRelation(const nsAccessibleRelation&);
40   nsAccessibleRelation& operator=(const nsAccessibleRelation&);
41 
42   uint32_t mType;
43   nsCOMPtr<nsIMutableArray> mTargets;
44 };
45 
46 }  // namespace a11y
47 }  // namespace mozilla
48 
49 #endif
50