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 #include "content/browser/accessibility/browser_accessibility_android.h" | 5 #include "content/browser/accessibility/browser_accessibility_android.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "content/browser/accessibility/browser_accessibility_manager_android.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager_android.h" |
9 #include "content/common/accessibility_messages.h" | 9 #include "content/common/accessibility_messages.h" |
10 | 10 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 case ui::AX_ROLE_RADIO_BUTTON: | 235 case ui::AX_ROLE_RADIO_BUTTON: |
236 class_name = "android.widget.RadioButton"; | 236 class_name = "android.widget.RadioButton"; |
237 break; | 237 break; |
238 case ui::AX_ROLE_TOGGLE_BUTTON: | 238 case ui::AX_ROLE_TOGGLE_BUTTON: |
239 class_name = "android.widget.ToggleButton"; | 239 class_name = "android.widget.ToggleButton"; |
240 break; | 240 break; |
241 case ui::AX_ROLE_CANVAS: | 241 case ui::AX_ROLE_CANVAS: |
242 case ui::AX_ROLE_IMAGE: | 242 case ui::AX_ROLE_IMAGE: |
243 class_name = "android.widget.Image"; | 243 class_name = "android.widget.Image"; |
244 break; | 244 break; |
| 245 case ui::AX_ROLE_METER: |
245 case ui::AX_ROLE_PROGRESS_INDICATOR: | 246 case ui::AX_ROLE_PROGRESS_INDICATOR: |
246 class_name = "android.widget.ProgressBar"; | 247 class_name = "android.widget.ProgressBar"; |
247 break; | 248 break; |
248 case ui::AX_ROLE_TAB_LIST: | 249 case ui::AX_ROLE_TAB_LIST: |
249 class_name = "android.widget.TabWidget"; | 250 class_name = "android.widget.TabWidget"; |
250 break; | 251 break; |
251 case ui::AX_ROLE_GRID: | 252 case ui::AX_ROLE_GRID: |
252 case ui::AX_ROLE_TABLE: | 253 case ui::AX_ROLE_TABLE: |
253 class_name = "android.widget.GridView"; | 254 class_name = "android.widget.GridView"; |
254 break; | 255 break; |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { | 647 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { |
647 int count = 0; | 648 int count = 0; |
648 for (uint32 i = 0; i < PlatformChildCount(); i++) { | 649 for (uint32 i = 0; i < PlatformChildCount(); i++) { |
649 if (PlatformGetChild(i)->GetRole() == role) | 650 if (PlatformGetChild(i)->GetRole() == role) |
650 count++; | 651 count++; |
651 } | 652 } |
652 return count; | 653 return count; |
653 } | 654 } |
654 | 655 |
655 } // namespace content | 656 } // namespace content |
OLD | NEW |