OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_ACCESSIBILITY_BLINK_AX_TREE_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_ACCESSIBILITY_BLINK_AX_TREE_SOURCE_H_ |
6 #define CONTENT_RENDERER_ACCESSIBILITY_BLINK_AX_TREE_SOURCE_H_ | 6 #define CONTENT_RENDERER_ACCESSIBILITY_BLINK_AX_TREE_SOURCE_H_ |
7 | 7 |
8 #include "content/common/ax_content_node_data.h" | 8 #include "content/common/ax_content_node_data.h" |
9 #include "third_party/WebKit/public/web/WebAXObject.h" | 9 #include "third_party/WebKit/public/web/WebAXObject.h" |
10 #include "ui/accessibility/ax_node_data.h" | 10 #include "ui/accessibility/ax_node_data.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // WebDocument if accessibility isn't enabled globally. | 25 // WebDocument if accessibility isn't enabled globally. |
26 void SetRoot(blink::WebAXObject root); | 26 void SetRoot(blink::WebAXObject root); |
27 | 27 |
28 // Walks up the ancestor chain to see if this is a descendant of the root. | 28 // Walks up the ancestor chain to see if this is a descendant of the root. |
29 bool IsInTree(blink::WebAXObject node) const; | 29 bool IsInTree(blink::WebAXObject node) const; |
30 | 30 |
31 // Set the id of the node with accessibility focus. The node with | 31 // Set the id of the node with accessibility focus. The node with |
32 // accessibility focus will force loading inline text box children, | 32 // accessibility focus will force loading inline text box children, |
33 // which aren't always loaded by default on all platforms. | 33 // which aren't always loaded by default on all platforms. |
34 int accessibility_focus_id() { return accessibility_focus_id_; } | 34 int accessibility_focus_id() { return accessibility_focus_id_; } |
35 void set_accessiblity_focus_id(int id) { accessibility_focus_id_ = id; } | 35 void set_accessibility_focus_id(int id) { accessibility_focus_id_ = id; } |
36 | 36 |
37 // AXTreeSource implementation. | 37 // AXTreeSource implementation. |
38 blink::WebAXObject GetRoot() const override; | 38 blink::WebAXObject GetRoot() const override; |
39 blink::WebAXObject GetFromId(int32 id) const override; | 39 blink::WebAXObject GetFromId(int32 id) const override; |
40 int32 GetId(blink::WebAXObject node) const override; | 40 int32 GetId(blink::WebAXObject node) const override; |
41 void GetChildren( | 41 void GetChildren( |
42 blink::WebAXObject node, | 42 blink::WebAXObject node, |
43 std::vector<blink::WebAXObject>* out_children) const override; | 43 std::vector<blink::WebAXObject>* out_children) const override; |
44 blink::WebAXObject GetParent(blink::WebAXObject node) const override; | 44 blink::WebAXObject GetParent(blink::WebAXObject node) const override; |
45 void SerializeNode(blink::WebAXObject node, | 45 void SerializeNode(blink::WebAXObject node, |
46 AXContentNodeData* out_data) const override; | 46 AXContentNodeData* out_data) const override; |
47 bool IsValid(blink::WebAXObject node) const override; | 47 bool IsValid(blink::WebAXObject node) const override; |
48 bool IsEqual(blink::WebAXObject node1, | 48 bool IsEqual(blink::WebAXObject node1, |
49 blink::WebAXObject node2) const override; | 49 blink::WebAXObject node2) const override; |
50 blink::WebAXObject GetNull() const override; | 50 blink::WebAXObject GetNull() const override; |
51 | 51 |
52 blink::WebDocument GetMainDocument() const; | 52 blink::WebDocument GetMainDocument() const; |
53 | 53 |
54 private: | 54 private: |
55 RenderFrameImpl* render_frame_; | 55 RenderFrameImpl* render_frame_; |
56 blink::WebAXObject root_; | 56 blink::WebAXObject root_; |
57 | 57 |
58 int accessibility_focus_id_; | 58 int accessibility_focus_id_; |
59 }; | 59 }; |
60 | 60 |
61 } // namespace content | 61 } // namespace content |
62 | 62 |
63 #endif // CONTENT_RENDERER_ACCESSIBILITY_BLINK_AX_TREE_SOURCE_H_ | 63 #endif // CONTENT_RENDERER_ACCESSIBILITY_BLINK_AX_TREE_SOURCE_H_ |
OLD | NEW |