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

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

Issue 2217363002: Use relative bounding boxes throughout Chrome accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 26 matching lines...) Expand all
37 // Get the child at the given index. 37 // Get the child at the given index.
38 AXNode* ChildAtIndex(int index) const { return children_[index]; } 38 AXNode* ChildAtIndex(int index) const { return children_[index]; }
39 39
40 // Set the node's accessibility data. This may be done during initial 40 // Set the node's accessibility data. This may be done during initial
41 // initialization or later when the node data changes. 41 // initialization or later when the node data changes.
42 void SetData(const AXNodeData& src); 42 void SetData(const AXNodeData& src);
43 43
44 // Update this node's location. This is separate from SetData just because 44 // Update this node's location. This is separate from SetData just because
45 // changing only the location is common and should be more efficient than 45 // changing only the location is common and should be more efficient than
46 // re-copying all of the data. 46 // re-copying all of the data.
47 void SetLocation(const gfx::RectF& new_location); 47 void SetLocation(int offset_container_id,
aboxhall 2016/08/12 16:05:10 Maybe add to the description to explain the three
dmazzoni 2016/08/15 05:31:11 Done
48 const gfx::RectF& location,
49 gfx::Transform* transform);
48 50
49 // Set the index in parent, for example if siblings were inserted or deleted. 51 // Set the index in parent, for example if siblings were inserted or deleted.
50 void SetIndexInParent(int index_in_parent); 52 void SetIndexInParent(int index_in_parent);
51 53
52 // Swap the internal children vector with |children|. This instance 54 // Swap the internal children vector with |children|. This instance
53 // now owns all of the passed children. 55 // now owns all of the passed children.
54 void SwapChildren(std::vector<AXNode*>& children); 56 void SwapChildren(std::vector<AXNode*>& children);
55 57
56 // This is called when the AXTree no longer includes this node in the 58 // This is called when the AXTree no longer includes this node in the
57 // tree. Reference counting is used on some platforms because the 59 // tree. Reference counting is used on some platforms because the
58 // operating system may hold onto a reference to an AXNode 60 // operating system may hold onto a reference to an AXNode
59 // object even after we're through with it, so this may decrement the 61 // object even after we're through with it, so this may decrement the
60 // reference count and clear out the object's data. 62 // reference count and clear out the object's data.
61 void Destroy(); 63 void Destroy();
62 64
63 // Return true if this object is equal to or a descendant of |ancestor|. 65 // Return true if this object is equal to or a descendant of |ancestor|.
64 bool IsDescendantOf(AXNode* ancestor); 66 bool IsDescendantOf(AXNode* ancestor);
65 67
66 private: 68 private:
67 int index_in_parent_; 69 int index_in_parent_;
68 AXNode* parent_; 70 AXNode* parent_;
69 std::vector<AXNode*> children_; 71 std::vector<AXNode*> children_;
70 AXNodeData data_; 72 AXNodeData data_;
71 }; 73 };
72 74
73 } // namespace ui 75 } // namespace ui
74 76
75 #endif // UI_ACCESSIBILITY_AX_NODE_H_ 77 #endif // UI_ACCESSIBILITY_AX_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698