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

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: rebasing Created 5 years, 8 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
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_cocoa.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 bool BrowserAccessibilityAndroid::IsDismissable() const { 170 bool BrowserAccessibilityAndroid::IsDismissable() const {
171 return false; // No concept of "dismissable" on the web currently. 171 return false; // No concept of "dismissable" on the web currently.
172 } 172 }
173 173
174 bool BrowserAccessibilityAndroid::IsEditableText() const { 174 bool BrowserAccessibilityAndroid::IsEditableText() const {
175 return GetRole() == ui::AX_ROLE_TEXT_FIELD; 175 return GetRole() == ui::AX_ROLE_TEXT_FIELD;
176 } 176 }
177 177
178 bool BrowserAccessibilityAndroid::IsEnabled() const { 178 bool BrowserAccessibilityAndroid::IsEnabled() const {
179 return HasState(ui::AX_STATE_ENABLED); 179 return !HasState(ui::AX_STATE_DISABLED);
180 } 180 }
181 181
182 bool BrowserAccessibilityAndroid::IsFocusable() const { 182 bool BrowserAccessibilityAndroid::IsFocusable() const {
183 bool focusable = HasState(ui::AX_STATE_FOCUSABLE); 183 bool focusable = HasState(ui::AX_STATE_FOCUSABLE);
184 if (IsIframe() || 184 if (IsIframe() ||
185 GetRole() == ui::AX_ROLE_WEB_AREA) { 185 GetRole() == ui::AX_ROLE_WEB_AREA) {
186 focusable = false; 186 focusable = false;
187 } 187 }
188 return focusable; 188 return focusable;
189 } 189 }
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { 875 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const {
876 int count = 0; 876 int count = 0;
877 for (uint32 i = 0; i < PlatformChildCount(); i++) { 877 for (uint32 i = 0; i < PlatformChildCount(); i++) {
878 if (PlatformGetChild(i)->GetRole() == role) 878 if (PlatformGetChild(i)->GetRole() == role)
879 count++; 879 count++;
880 } 880 }
881 return count; 881 return count;
882 } 882 }
883 883
884 } // namespace content 884 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698