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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |