Chromium Code Reviews| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
| 16 #include "ui/accessibility/ax_enums.h" | 16 #include "ui/accessibility/ax_enums.h" |
| 17 #include "ui/accessibility/ax_export.h" | 17 #include "ui/accessibility/ax_export.h" |
| 18 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
| 19 #include "ui/gfx/transform.h" | |
| 19 | 20 |
| 20 namespace ui { | 21 namespace ui { |
| 21 | 22 |
| 22 // A compact representation of the accessibility information for a | 23 // A compact representation of the accessibility information for a |
| 23 // single accessible object, in a form that can be serialized and sent from | 24 // single accessible object, in a form that can be serialized and sent from |
| 24 // one process to another. | 25 // one process to another. |
| 25 struct AX_EXPORT AXNodeData { | 26 struct AX_EXPORT AXNodeData { |
| 26 AXNodeData(); | 27 AXNodeData(); |
| 27 virtual ~AXNodeData(); | 28 virtual ~AXNodeData(); |
| 28 | 29 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 virtual std::string ToString() const; | 93 virtual std::string ToString() const; |
| 93 | 94 |
| 94 bool IsRoot() const; | 95 bool IsRoot() const; |
| 95 void SetRoot(); | 96 void SetRoot(); |
| 96 | 97 |
| 97 // This is a simple serializable struct. All member variables should be | 98 // This is a simple serializable struct. All member variables should be |
| 98 // public and copyable. | 99 // public and copyable. |
| 99 int32_t id; | 100 int32_t id; |
| 100 AXRole role; | 101 AXRole role; |
| 101 uint32_t state; | 102 uint32_t state; |
| 102 gfx::Rect location; | |
| 103 std::vector<std::pair<AXStringAttribute, std::string> > string_attributes; | 103 std::vector<std::pair<AXStringAttribute, std::string> > string_attributes; |
| 104 std::vector<std::pair<AXIntAttribute, int32_t>> int_attributes; | 104 std::vector<std::pair<AXIntAttribute, int32_t>> int_attributes; |
| 105 std::vector<std::pair<AXFloatAttribute, float> > float_attributes; | 105 std::vector<std::pair<AXFloatAttribute, float> > float_attributes; |
| 106 std::vector<std::pair<AXBoolAttribute, bool> > bool_attributes; | 106 std::vector<std::pair<AXBoolAttribute, bool> > bool_attributes; |
| 107 std::vector<std::pair<AXIntListAttribute, std::vector<int32_t>>> | 107 std::vector<std::pair<AXIntListAttribute, std::vector<int32_t>>> |
| 108 intlist_attributes; | 108 intlist_attributes; |
| 109 base::StringPairs html_attributes; | 109 base::StringPairs html_attributes; |
| 110 std::vector<int32_t> child_ids; | 110 std::vector<int32_t> child_ids; |
| 111 | |
| 112 // The object's location relative to its window or frame. | |
| 113 gfx::Rect location; | |
| 114 | |
| 115 // An additional transform to apply to position this object and its subtree. | |
| 116 gfx::Transform transform; | |
|
dmazzoni
2016/02/24 18:53:26
Any thoughts on this? It's 16 floats, so 64 bytes
danakj
2016/02/24 19:31:45
https://codereview.chromium.org/1245163002/ will a
| |
| 111 }; | 117 }; |
| 112 | 118 |
| 113 } // namespace ui | 119 } // namespace ui |
| 114 | 120 |
| 115 #endif // UI_ACCESSIBILITY_AX_NODE_DATA_H_ | 121 #endif // UI_ACCESSIBILITY_AX_NODE_DATA_H_ |
| OLD | NEW |