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

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

Issue 780553002: Switch content/ to use AX_STATE_DISABLE instead of AX_STATE_ENABLED. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/i18n/break_iterator.h" 7 #include "base/i18n/break_iterator.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 bool BrowserAccessibilityAndroid::IsDismissable() const { 167 bool BrowserAccessibilityAndroid::IsDismissable() const {
168 return false; // No concept of "dismissable" on the web currently. 168 return false; // No concept of "dismissable" on the web currently.
169 } 169 }
170 170
171 bool BrowserAccessibilityAndroid::IsEditableText() const { 171 bool BrowserAccessibilityAndroid::IsEditableText() const {
172 return (GetRole() == ui::AX_ROLE_TEXT_AREA || 172 return (GetRole() == ui::AX_ROLE_TEXT_AREA ||
173 GetRole() == ui::AX_ROLE_TEXT_FIELD); 173 GetRole() == ui::AX_ROLE_TEXT_FIELD);
174 } 174 }
175 175
176 bool BrowserAccessibilityAndroid::IsEnabled() const { 176 bool BrowserAccessibilityAndroid::IsEnabled() const {
177 return HasState(ui::AX_STATE_ENABLED); 177 return !HasState(ui::AX_STATE_DISABLED);
178 } 178 }
179 179
180 bool BrowserAccessibilityAndroid::IsFocusable() const { 180 bool BrowserAccessibilityAndroid::IsFocusable() const {
181 bool focusable = HasState(ui::AX_STATE_FOCUSABLE); 181 bool focusable = HasState(ui::AX_STATE_FOCUSABLE);
182 if (IsIframe() || 182 if (IsIframe() ||
183 GetRole() == ui::AX_ROLE_WEB_AREA) { 183 GetRole() == ui::AX_ROLE_WEB_AREA) {
184 focusable = false; 184 focusable = false;
185 } 185 }
186 return focusable; 186 return focusable;
187 } 187 }
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { 858 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const {
859 int count = 0; 859 int count = 0;
860 for (uint32 i = 0; i < PlatformChildCount(); i++) { 860 for (uint32 i = 0; i < PlatformChildCount(); i++) {
861 if (PlatformGetChild(i)->GetRole() == role) 861 if (PlatformGetChild(i)->GetRole() == role)
862 count++; 862 count++;
863 } 863 }
864 return count; 864 return count;
865 } 865 }
866 866
867 } // namespace content 867 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_cocoa.mm » ('j') | ui/accessibility/ax_enums.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698