| 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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "content/browser/accessibility/browser_accessibility.h" | 9 #include "content/browser/accessibility/browser_accessibility.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 class BrowserAccessibilityAndroid : public BrowserAccessibility { | 13 class BrowserAccessibilityAndroid : public BrowserAccessibility { |
| 14 public: | 14 public: |
| 15 // Overrides from BrowserAccessibility. | 15 // Overrides from BrowserAccessibility. |
| 16 virtual void PostInitialize() OVERRIDE; | 16 virtual void PostInitialize() OVERRIDE; |
| 17 virtual bool IsNative() const OVERRIDE; | 17 virtual bool IsNative() const OVERRIDE; |
| 18 | 18 |
| 19 virtual bool PlatformIsLeaf() const OVERRIDE; | 19 virtual bool PlatformIsLeaf() const OVERRIDE; |
| 20 | 20 |
| 21 bool IsCheckable() const; | 21 bool IsCheckable() const; |
| 22 bool IsChecked() const; | 22 bool IsChecked() const; |
| 23 bool IsClickable() const; | 23 bool IsClickable() const; |
| 24 bool IsCollection() const; |
| 25 bool IsCollectionItem() const; |
| 26 bool IsContentInvalid() const; |
| 27 bool IsDismissable() const; |
| 24 bool IsEnabled() const; | 28 bool IsEnabled() const; |
| 25 bool IsFocusable() const; | 29 bool IsFocusable() const; |
| 26 bool IsFocused() const; | 30 bool IsFocused() const; |
| 31 bool IsHeading() const; |
| 32 bool IsHierarchical() const; |
| 33 bool IsMultiLine() const; |
| 27 bool IsPassword() const; | 34 bool IsPassword() const; |
| 35 bool IsRangeType() const; |
| 28 bool IsScrollable() const; | 36 bool IsScrollable() const; |
| 29 bool IsSelected() const; | 37 bool IsSelected() const; |
| 30 bool IsVisibleToUser() const; | 38 bool IsVisibleToUser() const; |
| 31 | 39 |
| 40 bool CanOpenPopup() const; |
| 41 |
| 32 const char* GetClassName() const; | 42 const char* GetClassName() const; |
| 33 base::string16 GetText() const; | 43 base::string16 GetText() const; |
| 34 | 44 |
| 35 int GetItemIndex() const; | 45 int GetItemIndex() const; |
| 36 int GetItemCount() const; | 46 int GetItemCount() const; |
| 37 | 47 |
| 38 int GetScrollX() const; | 48 int GetScrollX() const; |
| 39 int GetScrollY() const; | 49 int GetScrollY() const; |
| 40 int GetMaxScrollX() const; | 50 int GetMaxScrollX() const; |
| 41 int GetMaxScrollY() const; | 51 int GetMaxScrollY() const; |
| 42 | 52 |
| 43 int GetTextChangeFromIndex() const; | 53 int GetTextChangeFromIndex() const; |
| 44 int GetTextChangeAddedCount() const; | 54 int GetTextChangeAddedCount() const; |
| 45 int GetTextChangeRemovedCount() const; | 55 int GetTextChangeRemovedCount() const; |
| 46 base::string16 GetTextChangeBeforeText() const; | 56 base::string16 GetTextChangeBeforeText() const; |
| 47 | 57 |
| 48 int GetSelectionStart() const; | 58 int GetSelectionStart() const; |
| 49 int GetSelectionEnd() const; | 59 int GetSelectionEnd() const; |
| 50 int GetEditableTextLength() const; | 60 int GetEditableTextLength() const; |
| 51 | 61 |
| 62 int AndroidInputType() const; |
| 63 int AndroidLiveRegionType() const; |
| 64 int AndroidRangeType() const; |
| 65 |
| 66 int RowCount() const; |
| 67 int ColumnCount() const; |
| 68 |
| 69 int RowIndex() const; |
| 70 int RowSpan() const; |
| 71 int ColumnIndex() const; |
| 72 int ColumnSpan() const; |
| 73 |
| 74 float RangeMin() const; |
| 75 float RangeMax() const; |
| 76 float RangeCurrentValue() const; |
| 77 |
| 52 private: | 78 private: |
| 53 // This gives BrowserAccessibility::Create access to the class constructor. | 79 // This gives BrowserAccessibility::Create access to the class constructor. |
| 54 friend class BrowserAccessibility; | 80 friend class BrowserAccessibility; |
| 55 | 81 |
| 56 BrowserAccessibilityAndroid(); | 82 BrowserAccessibilityAndroid(); |
| 57 | 83 |
| 58 bool HasFocusableChild() const; | 84 bool HasFocusableChild() const; |
| 59 bool HasOnlyStaticTextChildren() const; | 85 bool HasOnlyStaticTextChildren() const; |
| 60 bool IsIframe() const; | 86 bool IsIframe() const; |
| 61 | 87 |
| 62 void NotifyLiveRegionUpdate(base::string16& aria_live); | 88 void NotifyLiveRegionUpdate(base::string16& aria_live); |
| 63 | 89 |
| 90 int CountChildrenWithRole(blink::WebAXRole role) const; |
| 91 |
| 64 base::string16 cached_text_; | 92 base::string16 cached_text_; |
| 65 bool first_time_; | 93 bool first_time_; |
| 66 base::string16 old_value_; | 94 base::string16 old_value_; |
| 67 base::string16 new_value_; | 95 base::string16 new_value_; |
| 68 | 96 |
| 69 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid); | 97 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid); |
| 70 }; | 98 }; |
| 71 | 99 |
| 72 } // namespace content | 100 } // namespace content |
| 73 | 101 |
| 74 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ | 102 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ |
| OLD | NEW |