Chromium Code Reviews| 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" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 BrowserAccessibility* node) OVERRIDE; | 34 BrowserAccessibility* node) OVERRIDE; |
| 35 | 35 |
| 36 // -------------------------------------------------------------------------- | 36 // -------------------------------------------------------------------------- |
| 37 // Methods called from Java via JNI | 37 // Methods called from Java via JNI |
| 38 // -------------------------------------------------------------------------- | 38 // -------------------------------------------------------------------------- |
| 39 | 39 |
| 40 // Tree methods. | 40 // Tree methods. |
| 41 jint GetRootId(JNIEnv* env, jobject obj); | 41 jint GetRootId(JNIEnv* env, jobject obj); |
| 42 jint HitTest(JNIEnv* env, jobject obj, jint x, jint y); | 42 jint HitTest(JNIEnv* env, jobject obj, jint x, jint y); |
| 43 | 43 |
| 44 // Populate Java accessibility data structures with info about a node. | |
| 45 jboolean PopulateAccessibilityNodeInfo( | |
| 46 JNIEnv* env, jobject obj, jobject info, jint id); | |
| 47 jboolean PopulateAccessibilityEvent( | |
| 48 JNIEnv* env, jobject obj, jobject event, jint id, jint event_type); | |
| 49 | |
| 50 // Perform actions on a node. | |
| 51 void Click(JNIEnv* env, jobject obj, jint id); | |
| 52 void Focus(JNIEnv* env, jobject obj, jint id); | |
| 53 | |
| 44 // Gets a temporary pointer to a specific node, only valid in this scope. | 54 // Gets a temporary pointer to a specific node, only valid in this scope. |
| 45 // May return 0 if that node id is no longer valid. | 55 // May return 0 if that node id is no longer valid. |
| 46 jint GetNativeNodeById(JNIEnv* env, jobject obj, jint id); | 56 //jint GetNativeNodeById(JNIEnv* env, jobject obj, jint id); |
|
bulach
2013/06/20 09:18:42
nit: remove?
dmazzoni
2013/06/21 05:38:55
Done.
| |
| 47 | 57 |
| 48 protected: | 58 protected: |
| 49 virtual void NotifyRootChanged() OVERRIDE; | 59 virtual void NotifyRootChanged() OVERRIDE; |
| 50 | 60 |
| 51 virtual bool UseRootScrollOffsetsWhenComputingBounds() OVERRIDE; | 61 virtual bool UseRootScrollOffsetsWhenComputingBounds() OVERRIDE; |
| 52 | 62 |
| 53 private: | 63 private: |
| 54 // This gives BrowserAccessibilityManager::Create access to the class | 64 // This gives BrowserAccessibilityManager::Create access to the class |
| 55 // constructor. | 65 // constructor. |
| 56 friend class BrowserAccessibilityManager; | 66 friend class BrowserAccessibilityManager; |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 76 static int CalculateDistanceSquared(int x, int y, BrowserAccessibility* node); | 86 static int CalculateDistanceSquared(int x, int y, BrowserAccessibility* node); |
| 77 | 87 |
| 78 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); | 88 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); |
| 79 }; | 89 }; |
| 80 | 90 |
| 81 bool RegisterBrowserAccessibilityManager(JNIEnv* env); | 91 bool RegisterBrowserAccessibilityManager(JNIEnv* env); |
| 82 | 92 |
| 83 } | 93 } |
| 84 | 94 |
| 85 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H _ | 95 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H _ |
| OLD | NEW |