OLD | NEW |
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_DATA_H_ | 5 #ifndef UI_ACCESSIBILITY_AX_NODE_DATA_H_ |
6 #define UI_ACCESSIBILITY_AX_NODE_DATA_H_ | 6 #define UI_ACCESSIBILITY_AX_NODE_DATA_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 void SetValue(const std::string& value); | 97 void SetValue(const std::string& value); |
98 | 98 |
99 // Return a string representation of this data, for debugging. | 99 // Return a string representation of this data, for debugging. |
100 virtual std::string ToString() const; | 100 virtual std::string ToString() const; |
101 | 101 |
102 // As much as possible this should behave as a simple, serializable, | 102 // As much as possible this should behave as a simple, serializable, |
103 // copyable struct. | 103 // copyable struct. |
104 int32_t id; | 104 int32_t id; |
105 AXRole role; | 105 AXRole role; |
106 uint32_t state; | 106 uint32_t state; |
107 std::vector<std::pair<AXStringAttribute, std::string> > string_attributes; | 107 std::vector<std::pair<AXStringAttribute, std::string>> string_attributes; |
108 std::vector<std::pair<AXIntAttribute, int32_t>> int_attributes; | 108 std::vector<std::pair<AXIntAttribute, int32_t>> int_attributes; |
109 std::vector<std::pair<AXFloatAttribute, float> > float_attributes; | 109 std::vector<std::pair<AXFloatAttribute, float>> float_attributes; |
110 std::vector<std::pair<AXBoolAttribute, bool> > bool_attributes; | 110 std::vector<std::pair<AXBoolAttribute, bool>> bool_attributes; |
111 std::vector<std::pair<AXIntListAttribute, std::vector<int32_t>>> | 111 std::vector<std::pair<AXIntListAttribute, std::vector<int32_t>>> |
112 intlist_attributes; | 112 intlist_attributes; |
113 base::StringPairs html_attributes; | 113 base::StringPairs html_attributes; |
114 std::vector<int32_t> child_ids; | 114 std::vector<int32_t> child_ids; |
115 | 115 |
116 // The object's location relative to its window or frame. | 116 // The object's location relative to its window or frame. |
117 gfx::Rect location; | 117 gfx::Rect location; |
118 | 118 |
119 // An additional transform to apply to position this object and its subtree. | 119 // An additional transform to apply to position this object and its subtree. |
120 // NOTE: this member is a std::unique_ptr because it's rare and gfx::Transform | 120 // NOTE: this member is a std::unique_ptr because it's rare and gfx::Transform |
121 // takes up a fair amount of space. The assignment operator and copy | 121 // takes up a fair amount of space. The assignment operator and copy |
122 // constructor both make a duplicate of the owned pointer, so it acts more | 122 // constructor both make a duplicate of the owned pointer, so it acts more |
123 // like a member than a pointer. | 123 // like a member than a pointer. |
124 std::unique_ptr<gfx::Transform> transform; | 124 std::unique_ptr<gfx::Transform> transform; |
125 }; | 125 }; |
126 | 126 |
127 } // namespace ui | 127 } // namespace ui |
128 | 128 |
129 #endif // UI_ACCESSIBILITY_AX_NODE_DATA_H_ | 129 #endif // UI_ACCESSIBILITY_AX_NODE_DATA_H_ |
OLD | NEW |