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

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

Issue 1713723002: Implement accessibility support for CSS-transformed iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return gfx::Rect from AccessibilityTransformToRootCoordSpace, get rid of ifdefed-out code accidenta… Created 4 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_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 19
20 namespace gfx {
21 class Transform;
22 };
23
20 namespace ui { 24 namespace ui {
21 25
22 // A compact representation of the accessibility information for a 26 // A compact representation of the accessibility information for a
23 // single accessible object, in a form that can be serialized and sent from 27 // single accessible object, in a form that can be serialized and sent from
24 // one process to another. 28 // one process to another.
25 struct AX_EXPORT AXNodeData { 29 struct AX_EXPORT AXNodeData {
26 AXNodeData(); 30 AXNodeData();
27 virtual ~AXNodeData(); 31 virtual ~AXNodeData();
28 32
29 AXNodeData(const AXNodeData& other); 33 AXNodeData(const AXNodeData& other);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 virtual std::string ToString() const; 99 virtual std::string ToString() const;
96 100
97 bool IsRoot() const; 101 bool IsRoot() const;
98 void SetRoot(); 102 void SetRoot();
99 103
100 // As much as possible this should behave as a simple, serializable, 104 // As much as possible this should behave as a simple, serializable,
101 // copyable struct. 105 // copyable struct.
102 int32_t id; 106 int32_t id;
103 AXRole role; 107 AXRole role;
104 uint32_t state; 108 uint32_t state;
105 gfx::Rect location;
106 std::vector<std::pair<AXStringAttribute, std::string> > string_attributes; 109 std::vector<std::pair<AXStringAttribute, std::string> > string_attributes;
107 std::vector<std::pair<AXIntAttribute, int32_t>> int_attributes; 110 std::vector<std::pair<AXIntAttribute, int32_t>> int_attributes;
108 std::vector<std::pair<AXFloatAttribute, float> > float_attributes; 111 std::vector<std::pair<AXFloatAttribute, float> > float_attributes;
109 std::vector<std::pair<AXBoolAttribute, bool> > bool_attributes; 112 std::vector<std::pair<AXBoolAttribute, bool> > bool_attributes;
110 std::vector<std::pair<AXIntListAttribute, std::vector<int32_t>>> 113 std::vector<std::pair<AXIntListAttribute, std::vector<int32_t>>>
111 intlist_attributes; 114 intlist_attributes;
112 base::StringPairs html_attributes; 115 base::StringPairs html_attributes;
113 std::vector<int32_t> child_ids; 116 std::vector<int32_t> child_ids;
117
118 // The object's location relative to its window or frame.
119 gfx::Rect location;
120
121 // An additional transform to apply to position this object and its subtree.
122 // NOTE: this member is a scoped_ptr because it's rare and gfx::Transform
123 // takes up a fair amount of space. The assignment operator and copy
124 // constructor both make a duplicate of the owned pointer, so it acts more
125 // like a member than a pointer.
126 scoped_ptr<gfx::Transform> transform;
114 }; 127 };
115 128
116 } // namespace ui 129 } // namespace ui
117 130
118 #endif // UI_ACCESSIBILITY_AX_NODE_DATA_H_ 131 #endif // UI_ACCESSIBILITY_AX_NODE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698