| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |