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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 case ui::AX_ROLE_LIST_BOX: | 256 case ui::AX_ROLE_LIST_BOX: |
257 case ui::AX_ROLE_DESCRIPTION_LIST: | 257 case ui::AX_ROLE_DESCRIPTION_LIST: |
258 class_name = "android.widget.ListView"; | 258 class_name = "android.widget.ListView"; |
259 break; | 259 break; |
260 case ui::AX_ROLE_DIALOG: | 260 case ui::AX_ROLE_DIALOG: |
261 class_name = "android.app.Dialog"; | 261 class_name = "android.app.Dialog"; |
262 break; | 262 break; |
263 case ui::AX_ROLE_ROOT_WEB_AREA: | 263 case ui::AX_ROLE_ROOT_WEB_AREA: |
264 class_name = "android.webkit.WebView"; | 264 class_name = "android.webkit.WebView"; |
265 break; | 265 break; |
| 266 case ui::AX_ROLE_MENU_ITEM: |
| 267 case ui::AX_ROLE_MENU_ITEM_CHECK_BOX: |
| 268 case ui::AX_ROLE_MENU_ITEM_RADIO: |
| 269 class_name = "android.view.MenuItem"; |
| 270 break; |
266 default: | 271 default: |
267 class_name = "android.view.View"; | 272 class_name = "android.view.View"; |
268 break; | 273 break; |
269 } | 274 } |
270 | 275 |
271 return class_name; | 276 return class_name; |
272 } | 277 } |
273 | 278 |
274 base::string16 BrowserAccessibilityAndroid::GetText() const { | 279 base::string16 BrowserAccessibilityAndroid::GetText() const { |
275 if (IsIframe() || | 280 if (IsIframe() || |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { | 651 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { |
647 int count = 0; | 652 int count = 0; |
648 for (uint32 i = 0; i < PlatformChildCount(); i++) { | 653 for (uint32 i = 0; i < PlatformChildCount(); i++) { |
649 if (PlatformGetChild(i)->GetRole() == role) | 654 if (PlatformGetChild(i)->GetRole() == role) |
650 count++; | 655 count++; |
651 } | 656 } |
652 return count; | 657 return count; |
653 } | 658 } |
654 | 659 |
655 } // namespace content | 660 } // namespace content |
OLD | NEW |