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

Side by Side Diff: chrome/browser/ui/aura/accessibility/ax_tree_source_aura.cc

Issue 2860883003: A11y: Add/refactor methods for manipulating bitfields on AXNodeData. (Closed)
Patch Set: Revert comment. Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h" 5 #include "chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (rfh) { 116 if (rfh) {
117 int ax_tree_id = rfh->GetAXTreeID(); 117 int ax_tree_id = rfh->GetAXTreeID();
118 out_data->AddIntAttribute(ui::AX_ATTR_CHILD_TREE_ID, ax_tree_id); 118 out_data->AddIntAttribute(ui::AX_ATTR_CHILD_TREE_ID, ax_tree_id);
119 } 119 }
120 } 120 }
121 } 121 }
122 122
123 std::string AXTreeSourceAura::ToString(AXAuraObjWrapper* root, 123 std::string AXTreeSourceAura::ToString(AXAuraObjWrapper* root,
124 std::string prefix) { 124 std::string prefix) {
125 ui::AXNodeData data; 125 ui::AXNodeData data;
126 data.ClearBitfields();
126 root->Serialize(&data); 127 root->Serialize(&data);
127 std::string output = prefix + data.ToString() + '\n'; 128 std::string output = prefix + data.ToString() + '\n';
128 129
129 std::vector<AXAuraObjWrapper*> children; 130 std::vector<AXAuraObjWrapper*> children;
130 root->GetChildren(&children); 131 root->GetChildren(&children);
131 132
132 prefix += prefix[0]; 133 prefix += prefix[0];
133 for (size_t i = 0; i < children.size(); ++i) 134 for (size_t i = 0; i < children.size(); ++i)
134 output += ToString(children[i], prefix); 135 output += ToString(children[i], prefix);
135 136
136 return output; 137 return output;
137 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698