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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 case ui::AX_ROLE_TABLE: | 243 case ui::AX_ROLE_TABLE: |
244 class_name = "android.widget.GridView"; | 244 class_name = "android.widget.GridView"; |
245 break; | 245 break; |
246 case ui::AX_ROLE_LIST: | 246 case ui::AX_ROLE_LIST: |
247 case ui::AX_ROLE_LIST_BOX: | 247 case ui::AX_ROLE_LIST_BOX: |
248 class_name = "android.widget.ListView"; | 248 class_name = "android.widget.ListView"; |
249 break; | 249 break; |
250 case ui::AX_ROLE_DIALOG: | 250 case ui::AX_ROLE_DIALOG: |
251 class_name = "android.app.Dialog"; | 251 class_name = "android.app.Dialog"; |
252 break; | 252 break; |
| 253 case ui::AX_ROLE_ROOT_WEB_AREA: |
| 254 class_name = "android.webkit.WebView"; |
| 255 break; |
253 default: | 256 default: |
254 class_name = "android.view.View"; | 257 class_name = "android.view.View"; |
255 break; | 258 break; |
256 } | 259 } |
257 | 260 |
258 return class_name; | 261 return class_name; |
259 } | 262 } |
260 | 263 |
261 base::string16 BrowserAccessibilityAndroid::GetText() const { | 264 base::string16 BrowserAccessibilityAndroid::GetText() const { |
262 if (IsIframe() || | 265 if (IsIframe() || |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { | 606 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { |
604 int count = 0; | 607 int count = 0; |
605 for (uint32 i = 0; i < PlatformChildCount(); i++) { | 608 for (uint32 i = 0; i < PlatformChildCount(); i++) { |
606 if (PlatformGetChild(i)->role() == role) | 609 if (PlatformGetChild(i)->role() == role) |
607 count++; | 610 count++; |
608 } | 611 } |
609 return count; | 612 return count; |
610 } | 613 } |
611 | 614 |
612 } // namespace content | 615 } // namespace content |
OLD | NEW |