Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: content/browser/accessibility/browser_accessibility_android.cc

Issue 634533002: Fixing IA2 role for input type attribute in button and checkbox state with menu and aria role menu … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporating comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 break; 223 break;
224 case ui::AX_ROLE_COMBO_BOX: 224 case ui::AX_ROLE_COMBO_BOX:
225 class_name = "android.widget.Spinner"; 225 class_name = "android.widget.Spinner";
226 break; 226 break;
227 case ui::AX_ROLE_BUTTON: 227 case ui::AX_ROLE_BUTTON:
228 case ui::AX_ROLE_MENU_BUTTON: 228 case ui::AX_ROLE_MENU_BUTTON:
229 case ui::AX_ROLE_POP_UP_BUTTON: 229 case ui::AX_ROLE_POP_UP_BUTTON:
230 class_name = "android.widget.Button"; 230 class_name = "android.widget.Button";
231 break; 231 break;
232 case ui::AX_ROLE_CHECK_BOX: 232 case ui::AX_ROLE_CHECK_BOX:
233 case ui::AX_ROLE_MENU_ITEM_CHECK_BOX:
233 class_name = "android.widget.CheckBox"; 234 class_name = "android.widget.CheckBox";
234 break; 235 break;
235 case ui::AX_ROLE_RADIO_BUTTON: 236 case ui::AX_ROLE_RADIO_BUTTON:
237 case ui::AX_ROLE_MENU_ITEM_RADIO:
236 class_name = "android.widget.RadioButton"; 238 class_name = "android.widget.RadioButton";
237 break; 239 break;
238 case ui::AX_ROLE_TOGGLE_BUTTON: 240 case ui::AX_ROLE_TOGGLE_BUTTON:
239 class_name = "android.widget.ToggleButton"; 241 class_name = "android.widget.ToggleButton";
240 break; 242 break;
241 case ui::AX_ROLE_CANVAS: 243 case ui::AX_ROLE_CANVAS:
242 case ui::AX_ROLE_IMAGE: 244 case ui::AX_ROLE_IMAGE:
243 class_name = "android.widget.Image"; 245 class_name = "android.widget.Image";
244 break; 246 break;
245 case ui::AX_ROLE_PROGRESS_INDICATOR: 247 case ui::AX_ROLE_PROGRESS_INDICATOR:
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { 648 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const {
647 int count = 0; 649 int count = 0;
648 for (uint32 i = 0; i < PlatformChildCount(); i++) { 650 for (uint32 i = 0; i < PlatformChildCount(); i++) {
649 if (PlatformGetChild(i)->GetRole() == role) 651 if (PlatformGetChild(i)->GetRole() == role)
650 count++; 652 count++;
651 } 653 }
652 return count; 654 return count;
653 } 655 }
654 656
655 } // namespace content 657 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698