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

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

Issue 2860793003: Pass through tilt_x and tilt_y to blink (Closed)
Patch Set: Pass through tilt_x and tilt_y to blink Created 3 years, 7 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: 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 c4d98ba8713a4dc818d842630fa449f2965071ea..1411dc4fa730ee32071048aec64b9475bd352c63 100644
--- a/ui/events/android/motion_event_android.h
+++ b/ui/events/android/motion_event_android.h
@@ -40,6 +40,8 @@ class EVENTS_EXPORT MotionEventAndroid : public MotionEvent {
jfloat touch_major_pixels;
jfloat touch_minor_pixels;
jfloat orientation_rad;
+ // Unlike the tilt angles in motion_event.h, this field matches the
+ // MotionEvent spec because we get this values from Java.
jfloat tilt_rad;
jint tool_type;
};
@@ -82,7 +84,8 @@ class EVENTS_EXPORT MotionEventAndroid : public MotionEvent {
float GetTouchMinor(size_t pointer_index) const override;
float GetOrientation(size_t pointer_index) const override;
float GetPressure(size_t pointer_index) const override;
- float GetTilt(size_t pointer_index) const override;
+ float GetTiltX(size_t pointer_index) const override;
+ float GetTiltY(size_t pointer_index) const override;
base::TimeTicks GetEventTime() const override;
size_t GetHistorySize() const override;
base::TimeTicks GetHistoricalEventTime(
@@ -148,7 +151,8 @@ class EVENTS_EXPORT MotionEventAndroid : public MotionEvent {
float touch_major;
float touch_minor;
float orientation;
- float tilt;
+ float tilt_x;
+ float tilt_y;
ToolType tool_type;
} cached_pointers_[MAX_POINTERS_TO_CACHE];
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | ui/events/android/motion_event_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698