| 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_MANAGER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_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_manager.h" | 9 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 10 #include "content/browser/android/content_view_core_impl.h" | 10 #include "content/browser/android/content_view_core_impl.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 namespace aria_strings { | 14 namespace aria_strings { |
| 15 extern const char kAriaLivePolite[]; | 15 extern const char kAriaLivePolite[]; |
| 16 extern const char kAriaLiveAssertive[]; | 16 extern const char kAriaLiveAssertive[]; |
| 17 } | 17 } |
| 18 | 18 |
| 19 class CONTENT_EXPORT BrowserAccessibilityManagerAndroid | 19 class CONTENT_EXPORT BrowserAccessibilityManagerAndroid |
| 20 : public BrowserAccessibilityManager { | 20 : public BrowserAccessibilityManager { |
| 21 public: | 21 public: |
| 22 BrowserAccessibilityManagerAndroid( | 22 BrowserAccessibilityManagerAndroid( |
| 23 base::android::ScopedJavaLocalRef<jobject> content_view_core, | 23 base::android::ScopedJavaLocalRef<jobject> content_view_core, |
| 24 const AccessibilityNodeData& src, | 24 const ui::AXNodeData& src, |
| 25 BrowserAccessibilityDelegate* delegate, | 25 BrowserAccessibilityDelegate* delegate, |
| 26 BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory()); | 26 BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory()); |
| 27 | 27 |
| 28 virtual ~BrowserAccessibilityManagerAndroid(); | 28 virtual ~BrowserAccessibilityManagerAndroid(); |
| 29 | 29 |
| 30 static AccessibilityNodeData GetEmptyDocument(); | 30 static ui::AXNodeData GetEmptyDocument(); |
| 31 | 31 |
| 32 void SetContentViewCore( | 32 void SetContentViewCore( |
| 33 base::android::ScopedJavaLocalRef<jobject> content_view_core); | 33 base::android::ScopedJavaLocalRef<jobject> content_view_core); |
| 34 | 34 |
| 35 // Implementation of BrowserAccessibilityManager. | 35 // Implementation of BrowserAccessibilityManager. |
| 36 virtual void NotifyAccessibilityEvent( | 36 virtual void NotifyAccessibilityEvent( |
| 37 blink::WebAXEvent event_type, BrowserAccessibility* node) OVERRIDE; | 37 ui::AXEvent event_type, BrowserAccessibility* node) OVERRIDE; |
| 38 | 38 |
| 39 // -------------------------------------------------------------------------- | 39 // -------------------------------------------------------------------------- |
| 40 // Methods called from Java via JNI | 40 // Methods called from Java via JNI |
| 41 // -------------------------------------------------------------------------- | 41 // -------------------------------------------------------------------------- |
| 42 | 42 |
| 43 // Tree methods. | 43 // Tree methods. |
| 44 jint GetRootId(JNIEnv* env, jobject obj); | 44 jint GetRootId(JNIEnv* env, jobject obj); |
| 45 jboolean IsNodeValid(JNIEnv* env, jobject obj, jint id); | 45 jboolean IsNodeValid(JNIEnv* env, jobject obj, jint id); |
| 46 jint HitTest(JNIEnv* env, jobject obj, jint x, jint y); | 46 jint HitTest(JNIEnv* env, jobject obj, jint x, jint y); |
| 47 | 47 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 static int CalculateDistanceSquared(int x, int y, BrowserAccessibility* node); | 87 static int CalculateDistanceSquared(int x, int y, BrowserAccessibility* node); |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); | 89 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 bool RegisterBrowserAccessibilityManager(JNIEnv* env); | 92 bool RegisterBrowserAccessibilityManager(JNIEnv* env); |
| 93 | 93 |
| 94 } | 94 } |
| 95 | 95 |
| 96 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H
_ | 96 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H
_ |
| OLD | NEW |