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

Unified Diff: trunk/src/content/browser/accessibility/browser_accessibility_android.h

Issue 17045010: Revert 207875 "Native Android accessibility." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/content/browser/accessibility/browser_accessibility_android.h
===================================================================
--- trunk/src/content/browser/accessibility/browser_accessibility_android.h (revision 207890)
+++ trunk/src/content/browser/accessibility/browser_accessibility_android.h (working copy)
@@ -16,48 +16,71 @@
virtual void PostInitialize() OVERRIDE;
virtual bool IsNative() const OVERRIDE;
- bool IsLeaf() const;
+ // --------------------------------------------------------------------------
+ // Methods called from Java via JNI
+ // --------------------------------------------------------------------------
- bool IsCheckable() const;
- bool IsChecked() const;
- bool IsClickable() const;
- bool IsEnabled() const;
- bool IsFocusable() const;
- bool IsFocused() const;
- bool IsPassword() const;
- bool IsScrollable() const;
- bool IsSelected() const;
- bool IsVisibleToUser() const;
+ // Actions
+ void FocusJNI(JNIEnv* env, jobject obj);
+ void ClickJNI(JNIEnv* env, jobject obj);
- const char* GetClassName() const;
- string16 GetText() const;
+ // Const accessors
+ jboolean GetClickableJNI(JNIEnv* env, jobject obj) const;
+ jboolean IsFocusedJNI(JNIEnv* env, jobject obj) const;
+ jboolean IsEditableTextJNI(JNIEnv* env, jobject obj) const;
+ base::android::ScopedJavaLocalRef<jstring> GetNameJNI(
+ JNIEnv* env, jobject obj) const;
+ base::android::ScopedJavaLocalRef<jobject> GetAbsoluteRectJNI(
+ JNIEnv* env, jobject obj) const;
+ base::android::ScopedJavaLocalRef<jobject> GetRectInParentJNI(
+ JNIEnv* env, jobject obj) const;
+ jboolean IsFocusableJNI(JNIEnv* env, jobject obj) const;
+ jint GetParentJNI(JNIEnv* env, jobject obj) const;
+ jint GetChildCountJNI(JNIEnv* env, jobject obj) const;
+ jint GetChildIdAtJNI(
+ JNIEnv* env, jobject obj, jint child_index) const;
+ jboolean IsCheckableJNI(JNIEnv* env, jobject obj) const;
+ jboolean IsCheckedJNI(JNIEnv* env, jobject obj) const;
+ base::android::ScopedJavaLocalRef<jstring> GetClassNameJNI(
+ JNIEnv* env, jobject obj) const;
+ jboolean IsEnabledJNI(JNIEnv* env, jobject obj) const;
+ jboolean IsPasswordJNI(JNIEnv* env, jobject obj) const;
+ jboolean IsScrollableJNI(JNIEnv* env, jobject obj) const;
+ jboolean IsSelectedJNI(JNIEnv* env, jobject obj) const;
+ jboolean IsVisibleJNI(JNIEnv* env, jobject obj) const;
+ jint GetItemIndexJNI(JNIEnv* env, jobject obj) const;
+ jint GetItemCountJNI(JNIEnv* env, jobject obj) const;
+ jint GetScrollXJNI(JNIEnv* env, jobject obj) const;
+ jint GetScrollYJNI(JNIEnv* env, jobject obj) const;
+ jint GetMaxScrollXJNI(JNIEnv* env, jobject obj) const;
+ jint GetMaxScrollYJNI(JNIEnv* env, jobject obj) const;
+ base::android::ScopedJavaLocalRef<jstring> GetAriaLiveJNI(
+ JNIEnv* env, jobject obj) const;
+ jint GetSelectionStartJNI(JNIEnv* env, jobject obj) const;
+ jint GetSelectionEndJNI(JNIEnv* env, jobject obj) const;
+ jint GetEditableTextLengthJNI(JNIEnv* env, jobject obj) const;
+ jint GetTextChangeFromIndexJNI(JNIEnv* env, jobject obj) const;
+ jint GetTextChangeAddedCountJNI(JNIEnv* env, jobject obj) const;
+ jint GetTextChangeRemovedCountJNI(JNIEnv* env, jobject obj) const;
+ base::android::ScopedJavaLocalRef<jstring> GetTextChangeBeforeTextJNI(
+ JNIEnv* env, jobject obj) const;
- int GetItemIndex() const;
- int GetItemCount() const;
-
- int GetScrollX() const;
- int GetScrollY() const;
- int GetMaxScrollX() const;
- int GetMaxScrollY() const;
-
- int GetTextChangeFromIndex() const;
- int GetTextChangeAddedCount() const;
- int GetTextChangeRemovedCount() const;
- string16 GetTextChangeBeforeText() const;
-
- int GetSelectionStart() const;
- int GetSelectionEnd() const;
- int GetEditableTextLength() const;
-
private:
// This gives BrowserAccessibility::Create access to the class constructor.
friend class BrowserAccessibility;
+ // Allow BrowserAccessibilityManagerAndroid to call these private methods.
+ friend class BrowserAccessibilityManagerAndroid;
+
BrowserAccessibilityAndroid();
+ string16 ComputeName() const;
+ string16 GetAriaLive() const;
+ bool IsFocusable() const;
bool HasFocusableChild() const;
bool HasOnlyStaticTextChildren() const;
bool IsIframe() const;
+ bool IsLeaf() const;
void NotifyLiveRegionUpdate(string16& aria_live);
@@ -69,6 +92,8 @@
DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid);
};
+bool RegisterBrowserAccessibility(JNIEnv* env);
+
} // namespace content
#endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698