Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: third_party/WebKit/Source/core/dom/AccessibleNodeList.h

Issue 2967193003: Relation list properties for Accessibility Object Model phase 1 (Closed)
Patch Set: Get rid of accidental duplication in inspector output Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef AccessibleNodeList_h
6 #define AccessibleNodeList_h
7
8 #include "core/CoreExport.h"
9 #include "platform/bindings/ScriptWrappable.h"
10
11 namespace blink {
12
13 class AccessibleNode;
14 enum class AOMRelationListProperty;
15 class ExceptionState;
16
17 // Accessibility Object Model node list
18 // Explainer: https://github.com/WICG/aom/blob/master/explainer.md
19 // Spec: https://wicg.github.io/aom/spec/
20 class CORE_EXPORT AccessibleNodeList
21 : public GarbageCollectedFinalized<AccessibleNodeList>,
22 public ScriptWrappable {
23 DEFINE_WRAPPERTYPEINFO();
24
25 public:
26 static AccessibleNodeList* Create(const HeapVector<Member<AccessibleNode>>&);
27
28 AccessibleNodeList();
29 virtual ~AccessibleNodeList();
30
31 void AddOwner(AOMRelationListProperty, AccessibleNode*);
32 void RemoveOwner(AOMRelationListProperty, AccessibleNode*);
33
34 AccessibleNode* item(unsigned offset) const;
35 void add(AccessibleNode*, AccessibleNode* = nullptr);
36 void remove(int index);
37 bool AnonymousIndexedSetter(unsigned, AccessibleNode*, ExceptionState&);
38 unsigned length() const;
39 void setLength(unsigned);
40
41 DECLARE_VIRTUAL_TRACE();
42
43 private:
44 void NotifyChanged();
45
46 HeapVector<std::pair<AOMRelationListProperty, Member<AccessibleNode>>>
47 owners_;
48 HeapVector<Member<AccessibleNode>> nodes_;
49 };
50
51 } // namespace blink
52
53 #endif // AccessibleNodeList_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/AccessibleNode.idl ('k') | third_party/WebKit/Source/core/dom/AccessibleNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698