Index: content/browser/renderer_host/input/motion_event_web.cc |
diff --git a/content/browser/renderer_host/input/motion_event_web.cc b/content/browser/renderer_host/input/motion_event_web.cc |
index bc47cf8c17734a662dc43ad10a8662340fbed16f..65152590073e93e12757e0fc5c9dc36bb57af8c5 100644 |
--- a/content/browser/renderer_host/input/motion_event_web.cc |
+++ b/content/browser/renderer_host/input/motion_event_web.cc |
@@ -149,6 +149,37 @@ float MotionEventWeb::GetPressure(size_t pointer_index) const { |
return 0.f; |
} |
+// TODO(e_hakkinen): Remove either this and GetTiltOrientation or GetTiltX and |
+// GetTiltY. |
+float MotionEventWeb::GetTilt(size_t pointer_index) const { |
+ DCHECK_LT(pointer_index, GetPointerCount()); |
+ // TODO(e_hakkinen): Remove one of these. |
+ return event_.touches[pointer_index].tiltRad; |
+ return event_.touches[pointer_index].tilt * M_PI / 180.f; |
+} |
+ |
+// TODO(e_hakkinen): Remove either this and GetTilt or GetTiltX and GetTiltY. |
+float MotionEventWeb::GetTiltOrientation(size_t pointer_index) const { |
+ DCHECK_LT(pointer_index, GetPointerCount()); |
+ // TODO(e_hakkinen): Remove one of these. |
+ return event_.touches[pointer_index].tiltOrientationRad; |
+ return event_.touches[pointer_index].tiltOrientation * M_PI / 180.f; |
+} |
+ |
+// TODO(e_hakkinen): Remove either this and GetTiltY or GetTilt and |
+// GetTiltOrientation. |
+float MotionEventWeb::GetTiltX(size_t pointer_index) const { |
+ DCHECK_LT(pointer_index, GetPointerCount()); |
+ return event_.touches[pointer_index].tiltX * M_PI / 180.f; |
+} |
+ |
+// TODO(e_hakkinen): Remove either this and GetTiltX or GetTilt and |
+// GetTiltOrientation. |
+float MotionEventWeb::GetTiltY(size_t pointer_index) const { |
+ DCHECK_LT(pointer_index, GetPointerCount()); |
+ return event_.touches[pointer_index].tiltY * M_PI / 180.f; |
+} |
+ |
base::TimeTicks MotionEventWeb::GetEventTime() const { |
return base::TimeTicks() + |
base::TimeDelta::FromMicroseconds(event_.timeStampSeconds * |