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

Unified Diff: ui/events/android/motion_event_android.h

Issue 2770613002: Forward GenericMotionEvent to EventForwarder (Closed)
Patch Set: comments Created 3 years, 9 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
« no previous file with comments | « ui/android/view_client.cc ('k') | ui/events/android/motion_event_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/android/motion_event_android.h
diff --git a/ui/events/android/motion_event_android.h b/ui/events/android/motion_event_android.h
index 305fe6a53b9a95275ee1a996cff5f1d221735893..c4d98ba8713a4dc818d842630fa449f2965071ea 100644
--- a/ui/events/android/motion_event_android.h
+++ b/ui/events/android/motion_event_android.h
@@ -46,9 +46,12 @@ class EVENTS_EXPORT MotionEventAndroid : public MotionEvent {
// Forcing the caller to provide all cached values upon construction
// eliminates the need to perform a JNI call to retrieve values individually.
- MotionEventAndroid(float pix_to_dip,
- JNIEnv* env,
+ MotionEventAndroid(JNIEnv* env,
jobject event,
+ jfloat pix_to_dip,
+ jfloat ticks_x,
+ jfloat ticks_y,
+ jfloat tick_multiplier,
jlong time_ms,
jint android_action,
jint pointer_count,
@@ -95,6 +98,11 @@ class EVENTS_EXPORT MotionEventAndroid : public MotionEvent {
int GetFlags() const override;
int GetActionButton() const;
+ float ticks_x() const { return ticks_x_; }
+ float ticks_y() const { return ticks_y_; }
+ float time_sec() const { return time_sec_; }
+ float GetTickMultiplier() const;
+
base::android::ScopedJavaLocalRef<jobject> GetJavaObject() const;
private:
@@ -118,6 +126,12 @@ class EVENTS_EXPORT MotionEventAndroid : public MotionEvent {
// DIP coordinates cached/returned by the MotionEventAndroid.
const float pix_to_dip_;
+ // Variables for mouse wheel event.
+ const float ticks_x_;
+ const float ticks_y_;
+ const float tick_multiplier_;
+ const uint64_t time_sec_;
+
const base::TimeTicks cached_time_;
const Action cached_action_;
const size_t cached_pointer_count_;
« no previous file with comments | « ui/android/view_client.cc ('k') | ui/events/android/motion_event_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698