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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_
8 #include "base/android/scoped_java_ref.h"
9 #include "content/browser/accessibility/browser_accessibility.h"
13 class BrowserAccessibilityAndroid
: public BrowserAccessibility
{
15 // Overrides from BrowserAccessibility.
16 virtual void OnDataChanged() OVERRIDE
;
17 virtual bool IsNative() const OVERRIDE
;
19 virtual bool PlatformIsLeaf() const OVERRIDE
;
21 bool IsCheckable() const;
22 bool IsChecked() const;
23 bool IsClickable() const;
24 bool IsCollection() const;
25 bool IsCollectionItem() const;
26 bool IsContentInvalid() const;
27 bool IsDismissable() const;
28 bool IsEnabled() const;
29 bool IsFocusable() const;
30 bool IsFocused() const;
31 bool IsHeading() const;
32 bool IsHierarchical() const;
34 bool IsMultiLine() const;
35 bool IsPassword() const;
36 bool IsRangeType() const;
37 bool IsScrollable() const;
38 bool IsSelected() const;
39 bool IsVisibleToUser() const;
41 bool CanOpenPopup() const;
43 const char* GetClassName() const;
44 base::string16
GetText() const;
46 int GetItemIndex() const;
47 int GetItemCount() const;
49 int GetScrollX() const;
50 int GetScrollY() const;
51 int GetMaxScrollX() const;
52 int GetMaxScrollY() const;
54 int GetTextChangeFromIndex() const;
55 int GetTextChangeAddedCount() const;
56 int GetTextChangeRemovedCount() const;
57 base::string16
GetTextChangeBeforeText() const;
59 int GetSelectionStart() const;
60 int GetSelectionEnd() const;
61 int GetEditableTextLength() const;
63 int AndroidInputType() const;
64 int AndroidLiveRegionType() const;
65 int AndroidRangeType() const;
68 int ColumnCount() const;
72 int ColumnIndex() const;
73 int ColumnSpan() const;
75 float RangeMin() const;
76 float RangeMax() const;
77 float RangeCurrentValue() const;
80 // This gives BrowserAccessibility::Create access to the class constructor.
81 friend class BrowserAccessibility
;
83 BrowserAccessibilityAndroid();
85 bool HasFocusableChild() const;
86 bool HasOnlyStaticTextChildren() const;
87 bool IsIframe() const;
89 void NotifyLiveRegionUpdate(base::string16
& aria_live
);
91 int CountChildrenWithRole(ui::AXRole role
) const;
93 base::string16 cached_text_
;
95 base::string16 old_value_
;
96 base::string16 new_value_
;
98 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid
);
101 } // namespace content
103 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_