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
;
18 virtual void OnLocationChanged() OVERRIDE
;
20 virtual bool PlatformIsLeaf() const OVERRIDE
;
22 bool IsCheckable() const;
23 bool IsChecked() const;
24 bool IsClickable() const;
25 bool IsCollection() const;
26 bool IsCollectionItem() const;
27 bool IsContentInvalid() const;
28 bool IsDismissable() const;
29 bool IsEnabled() const;
30 bool IsFocusable() const;
31 bool IsFocused() const;
32 bool IsHeading() const;
33 bool IsHierarchical() const;
35 bool IsMultiLine() const;
36 bool IsPassword() const;
37 bool IsRangeType() const;
38 bool IsScrollable() const;
39 bool IsSelected() const;
40 bool IsVisibleToUser() const;
42 bool CanOpenPopup() const;
44 bool HasFocusableChild() const;
46 const char* GetClassName() const;
47 base::string16
GetText() const;
49 int GetItemIndex() const;
50 int GetItemCount() const;
52 int GetScrollX() const;
53 int GetScrollY() const;
54 int GetMaxScrollX() const;
55 int GetMaxScrollY() const;
57 int GetTextChangeFromIndex() const;
58 int GetTextChangeAddedCount() const;
59 int GetTextChangeRemovedCount() const;
60 base::string16
GetTextChangeBeforeText() const;
62 int GetSelectionStart() const;
63 int GetSelectionEnd() const;
64 int GetEditableTextLength() const;
66 int AndroidInputType() const;
67 int AndroidLiveRegionType() const;
68 int AndroidRangeType() const;
71 int ColumnCount() const;
75 int ColumnIndex() const;
76 int ColumnSpan() const;
78 float RangeMin() const;
79 float RangeMax() const;
80 float RangeCurrentValue() const;
83 // This gives BrowserAccessibility::Create access to the class constructor.
84 friend class BrowserAccessibility
;
86 BrowserAccessibilityAndroid();
88 bool HasOnlyStaticTextChildren() const;
89 bool IsIframe() const;
91 void NotifyLiveRegionUpdate(base::string16
& aria_live
);
93 int CountChildrenWithRole(ui::AXRole role
) const;
95 base::string16 cached_text_
;
97 base::string16 old_value_
;
98 base::string16 new_value_
;
100 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid
);
103 } // namespace content
105 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_