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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/AccessibleNodeList.h
diff --git a/third_party/WebKit/Source/core/dom/AccessibleNodeList.h b/third_party/WebKit/Source/core/dom/AccessibleNodeList.h
new file mode 100644
index 0000000000000000000000000000000000000000..130ede4698bd5dad76adeebd7f7d14da5c82fd8f
--- /dev/null
+++ b/third_party/WebKit/Source/core/dom/AccessibleNodeList.h
@@ -0,0 +1,53 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef AccessibleNodeList_h
+#define AccessibleNodeList_h
+
+#include "core/CoreExport.h"
+#include "platform/bindings/ScriptWrappable.h"
+
+namespace blink {
+
+class AccessibleNode;
+enum class AOMRelationListProperty;
+class ExceptionState;
+
+// Accessibility Object Model node list
+// Explainer: https://github.com/WICG/aom/blob/master/explainer.md
+// Spec: https://wicg.github.io/aom/spec/
+class CORE_EXPORT AccessibleNodeList
+ : public GarbageCollectedFinalized<AccessibleNodeList>,
+ public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ static AccessibleNodeList* Create(const HeapVector<Member<AccessibleNode>>&);
+
+ AccessibleNodeList();
+ virtual ~AccessibleNodeList();
+
+ void AddOwner(AOMRelationListProperty, AccessibleNode*);
+ void RemoveOwner(AOMRelationListProperty, AccessibleNode*);
+
+ AccessibleNode* item(unsigned offset) const;
+ void add(AccessibleNode*, AccessibleNode* = nullptr);
+ void remove(int index);
+ bool AnonymousIndexedSetter(unsigned, AccessibleNode*, ExceptionState&);
+ unsigned length() const;
+ void setLength(unsigned);
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ void NotifyChanged();
+
+ HeapVector<std::pair<AOMRelationListProperty, Member<AccessibleNode>>>
+ owners_;
+ HeapVector<Member<AccessibleNode>> nodes_;
+};
+
+} // namespace blink
+
+#endif // AccessibleNodeList_h
« 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