Index: ui/events/gesture_detection/motion_event_generic.cc |
diff --git a/ui/events/gesture_detection/motion_event_generic.cc b/ui/events/gesture_detection/motion_event_generic.cc |
index be367bd841fde7507475786ed6bda1b0122cc706..56d383974d1699e657fe603dd7ae36f1ac303b25 100644 |
--- a/ui/events/gesture_detection/motion_event_generic.cc |
+++ b/ui/events/gesture_detection/motion_event_generic.cc |
@@ -29,6 +29,7 @@ PointerProperties::PointerProperties(float x, float y, float touch_major) |
touch_major(touch_major), |
touch_minor(0), |
orientation(0), |
+ tilt(0), |
source_device_id(0) { |
} |
@@ -44,6 +45,7 @@ PointerProperties::PointerProperties(const MotionEvent& event, |
touch_major(event.GetTouchMajor(pointer_index)), |
touch_minor(event.GetTouchMinor(pointer_index)), |
orientation(event.GetOrientation(pointer_index)), |
+ tilt(event.GetTilt(pointer_index)), |
source_device_id(0) { |
} |
@@ -170,6 +172,11 @@ float MotionEventGeneric::GetPressure(size_t pointer_index) const { |
return pointers_[pointer_index].pressure; |
} |
+float MotionEventGeneric::GetTilt(size_t pointer_index) const { |
+ DCHECK_LT(pointer_index, pointers_->size()); |
+ return pointers_[pointer_index].tilt; |
+} |
+ |
MotionEvent::ToolType MotionEventGeneric::GetToolType( |
size_t pointer_index) const { |
DCHECK_LT(pointer_index, pointers_->size()); |