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

Unified Diff: ui/events/gesture_detection/motion_event.h

Issue 1187273004: Pass MotionEvent tilt angles to Blink on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/gesture_detection/motion_event.h
diff --git a/ui/events/gesture_detection/motion_event.h b/ui/events/gesture_detection/motion_event.h
index 12834a793f2db1e51e2af8a621fb98c139bdb32c..6ac0b655bfc654949cbbca11b8cb1a07fe5a2a53 100644
--- a/ui/events/gesture_detection/motion_event.h
+++ b/ui/events/gesture_detection/motion_event.h
@@ -62,6 +62,12 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
virtual float GetTouchMinor(size_t pointer_index) const = 0;
virtual float GetOrientation(size_t pointer_index) const = 0;
virtual float GetPressure(size_t pointer_index) const = 0;
+ // TODO(e_hakkinen): Remove either GetTilt and GetTiltOrientation or GetTiltX
+ // and GetTiltY.
+ virtual float GetTilt(size_t pointer_index) const = 0;
mustaq 2015/06/17 20:01:27 Since the discussion in crrev.com/1147083005 showe
USE eero AT chromium.org 2015/06/18 11:34:07 Done. Initially I thought that WebTouchPoint to M
+ virtual float GetTiltOrientation(size_t pointer_index) const = 0;
+ virtual float GetTiltX(size_t pointer_index) const = 0;
+ virtual float GetTiltY(size_t pointer_index) const = 0;
virtual ToolType GetToolType(size_t pointer_index) const = 0;
virtual int GetButtonState() const = 0;
virtual int GetFlags() const = 0;
@@ -100,6 +106,14 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
float GetOrientation() const { return GetOrientation(0); }
float GetPressure() const { return GetPressure(0); }
+
+ // TODO(e_hakkinen): Remove either GetTilt and GetTiltOrientation or GetTiltX
+ // and GetTiltY.
+ float GetTilt() const { return GetTilt(0); }
+ float GetTiltOrientation() const { return GetTiltOrientation(0); }
+ float GetTiltY() const { return GetTiltX(0); }
+ float GetTiltX() const { return GetTiltY(0); }
+
ToolType GetToolType() const { return GetToolType(0); }
// O(N) search of pointers (use sparingly!). Returns -1 if |id| nonexistent.

Powered by Google App Engine
This is Rietveld 408576698