OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 UI_ANDROID_EVENT_FORWARDER_H_ | 5 #ifndef UI_ANDROID_EVENT_FORWARDER_H_ |
6 #define UI_ANDROID_EVENT_FORWARDER_H_ | 6 #define UI_ANDROID_EVENT_FORWARDER_H_ |
7 | 7 |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 void OnMouseWheelEvent(JNIEnv* env, | 64 void OnMouseWheelEvent(JNIEnv* env, |
65 const base::android::JavaParamRef<jobject>& obj, | 65 const base::android::JavaParamRef<jobject>& obj, |
66 jlong time_ms, | 66 jlong time_ms, |
67 jfloat x, | 67 jfloat x, |
68 jfloat y, | 68 jfloat y, |
69 jfloat ticks_x, | 69 jfloat ticks_x, |
70 jfloat ticks_y, | 70 jfloat ticks_y, |
71 jfloat pixels_per_tick); | 71 jfloat pixels_per_tick); |
72 | 72 |
| 73 void OnDragEvent(JNIEnv* env, |
| 74 const base::android::JavaParamRef<jobject>& jobj, |
| 75 jint action, |
| 76 jint x, |
| 77 jint y, |
| 78 jint screen_x, |
| 79 jint screen_y, |
| 80 const base::android::JavaParamRef<jobjectArray>& j_mimeTypes, |
| 81 const base::android::JavaParamRef<jstring>& j_content); |
| 82 |
73 private: | 83 private: |
74 friend class ViewAndroid; | 84 friend class ViewAndroid; |
75 | 85 |
76 explicit EventForwarder(ViewAndroid* view); | 86 explicit EventForwarder(ViewAndroid* view); |
77 | 87 |
78 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | 88 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); |
79 | 89 |
80 ViewAndroid* const view_; | 90 ViewAndroid* const view_; |
81 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 91 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
82 | 92 |
83 DISALLOW_COPY_AND_ASSIGN(EventForwarder); | 93 DISALLOW_COPY_AND_ASSIGN(EventForwarder); |
84 }; | 94 }; |
85 | 95 |
86 bool RegisterEventForwarder(JNIEnv* env); | 96 bool RegisterEventForwarder(JNIEnv* env); |
87 | 97 |
88 } // namespace ui | 98 } // namespace ui |
89 | 99 |
90 #endif // UI_ANDROID_EVENT_FORWARDER_H_ | 100 #endif // UI_ANDROID_EVENT_FORWARDER_H_ |
OLD | NEW |