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

Side by Side Diff: ui/accessibility/ax_node.h

Issue 2745713002: WIP: Modified AXPosition to work with objects with both embedded object characters and text. (Closed)
Patch Set: Created 3 years, 9 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 UI_ACCESSIBILITY_AX_NODE_H_ 5 #ifndef UI_ACCESSIBILITY_AX_NODE_H_
6 #define UI_ACCESSIBILITY_AX_NODE_H_ 6 #define UI_ACCESSIBILITY_AX_NODE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 15 matching lines...) Expand all
26 int32_t id() const { return data_.id; } 26 int32_t id() const { return data_.id; }
27 AXNode* parent() const { return parent_; } 27 AXNode* parent() const { return parent_; }
28 int child_count() const { return static_cast<int>(children_.size()); } 28 int child_count() const { return static_cast<int>(children_.size()); }
29 const AXNodeData& data() const { return data_; } 29 const AXNodeData& data() const { return data_; }
30 const std::vector<AXNode*>& children() const { return children_; } 30 const std::vector<AXNode*>& children() const { return children_; }
31 int index_in_parent() const { return index_in_parent_; } 31 int index_in_parent() const { return index_in_parent_; }
32 32
33 // Get the child at the given index. 33 // Get the child at the given index.
34 AXNode* ChildAtIndex(int index) const { return children_[index]; } 34 AXNode* ChildAtIndex(int index) const { return children_[index]; }
35 35
36 // Returns true if the node has any of the text related roles.
37 bool IsTextNode() const;
38
36 // Set the node's accessibility data. This may be done during initial 39 // Set the node's accessibility data. This may be done during initial
37 // initialization or later when the node data changes. 40 // initialization or later when the node data changes.
38 void SetData(const AXNodeData& src); 41 void SetData(const AXNodeData& src);
39 42
40 // Update this node's location. This is separate from SetData just because 43 // Update this node's location. This is separate from SetData just because
41 // changing only the location is common and should be more efficient than 44 // changing only the location is common and should be more efficient than
42 // re-copying all of the data. 45 // re-copying all of the data.
43 // 46 //
44 // The node's location is stored as a relative bounding box, the ID of 47 // The node's location is stored as a relative bounding box, the ID of
45 // the element it's relative to, and an optional transformation matrix. 48 // the element it's relative to, and an optional transformation matrix.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 80
78 int index_in_parent_; 81 int index_in_parent_;
79 AXNode* parent_; 82 AXNode* parent_;
80 std::vector<AXNode*> children_; 83 std::vector<AXNode*> children_;
81 AXNodeData data_; 84 AXNodeData data_;
82 }; 85 };
83 86
84 } // namespace ui 87 } // namespace ui
85 88
86 #endif // UI_ACCESSIBILITY_AX_NODE_H_ 89 #endif // UI_ACCESSIBILITY_AX_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698