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

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

Issue 833373002: Expose attributes max, min, value for meter html tag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/renderer/accessibility/blink_ax_tree_source.cc » ('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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 bool BrowserAccessibilityAndroid::IsMultiLine() const { 213 bool BrowserAccessibilityAndroid::IsMultiLine() const {
214 return GetRole() == ui::AX_ROLE_TEXT_AREA; 214 return GetRole() == ui::AX_ROLE_TEXT_AREA;
215 } 215 }
216 216
217 bool BrowserAccessibilityAndroid::IsPassword() const { 217 bool BrowserAccessibilityAndroid::IsPassword() const {
218 return HasState(ui::AX_STATE_PROTECTED); 218 return HasState(ui::AX_STATE_PROTECTED);
219 } 219 }
220 220
221 bool BrowserAccessibilityAndroid::IsRangeType() const { 221 bool BrowserAccessibilityAndroid::IsRangeType() const {
222 return (GetRole() == ui::AX_ROLE_PROGRESS_INDICATOR || 222 return (GetRole() == ui::AX_ROLE_PROGRESS_INDICATOR ||
223 GetRole() == ui::AX_ROLE_METER ||
223 GetRole() == ui::AX_ROLE_SCROLL_BAR || 224 GetRole() == ui::AX_ROLE_SCROLL_BAR ||
224 GetRole() == ui::AX_ROLE_SLIDER); 225 GetRole() == ui::AX_ROLE_SLIDER);
225 } 226 }
226 227
227 bool BrowserAccessibilityAndroid::IsScrollable() const { 228 bool BrowserAccessibilityAndroid::IsScrollable() const {
228 int dummy; 229 int dummy;
229 return GetIntAttribute(ui::AX_ATTR_SCROLL_X_MAX, &dummy); 230 return GetIntAttribute(ui::AX_ATTR_SCROLL_X_MAX, &dummy);
230 } 231 }
231 232
232 bool BrowserAccessibilityAndroid::IsSelected() const { 233 bool BrowserAccessibilityAndroid::IsSelected() const {
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { 862 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const {
862 int count = 0; 863 int count = 0;
863 for (uint32 i = 0; i < PlatformChildCount(); i++) { 864 for (uint32 i = 0; i < PlatformChildCount(); i++) {
864 if (PlatformGetChild(i)->GetRole() == role) 865 if (PlatformGetChild(i)->GetRole() == role)
865 count++; 866 count++;
866 } 867 }
867 return count; 868 return count;
868 } 869 }
869 870
870 } // namespace content 871 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/accessibility/blink_ax_tree_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698