OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/accessibility/browser_accessibility.h" | 5 #include "content/browser/accessibility/browser_accessibility.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 uint32 BrowserAccessibility::InternalChildCount() const { | 123 uint32 BrowserAccessibility::InternalChildCount() const { |
124 if (!node_ || !manager_) | 124 if (!node_ || !manager_) |
125 return 0; | 125 return 0; |
126 return static_cast<uint32>(node_->child_count()); | 126 return static_cast<uint32>(node_->child_count()); |
127 } | 127 } |
128 | 128 |
129 BrowserAccessibility* BrowserAccessibility::InternalGetChild( | 129 BrowserAccessibility* BrowserAccessibility::InternalGetChild( |
130 uint32 child_index) const { | 130 uint32 child_index) const { |
131 if (!node_ || !manager_) | 131 if (!node_ || !manager_) |
132 return NULL; | 132 return NULL; |
133 return manager_->GetFromAXNode(node_->children()[child_index]); | 133 return manager_->GetFromAXNode(node_->ChildAtIndex(child_index)); |
134 } | 134 } |
135 | 135 |
136 BrowserAccessibility* BrowserAccessibility::GetParent() const { | 136 BrowserAccessibility* BrowserAccessibility::GetParent() const { |
137 if (!node_ || !manager_) | 137 if (!node_ || !manager_) |
138 return NULL; | 138 return NULL; |
139 ui::AXNode* parent = node_->parent(); | 139 ui::AXNode* parent = node_->parent(); |
140 if (parent) | 140 if (parent) |
141 return manager_->GetFromAXNode(parent); | 141 return manager_->GetFromAXNode(parent); |
142 | 142 |
143 if (!manager_->delegate()) | 143 if (!manager_->delegate()) |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 } | 709 } |
710 need_to_offset_web_area = true; | 710 need_to_offset_web_area = true; |
711 } | 711 } |
712 parent = parent->GetParentForBoundsCalculation(); | 712 parent = parent->GetParentForBoundsCalculation(); |
713 } | 713 } |
714 | 714 |
715 return bounds; | 715 return bounds; |
716 } | 716 } |
717 | 717 |
718 } // namespace content | 718 } // namespace content |
OLD | NEW |