Index: ui/events/gesture_detection/mock_motion_event.cc |
diff --git a/ui/events/gesture_detection/mock_motion_event.cc b/ui/events/gesture_detection/mock_motion_event.cc |
index 14623afcef03a9b145839d87507700cc9a3fcbba..d6e0a91b5a1f9f39adff2eca69b8e41e417f67a0 100644 |
--- a/ui/events/gesture_detection/mock_motion_event.cc |
+++ b/ui/events/gesture_detection/mock_motion_event.cc |
@@ -101,11 +101,11 @@ float MockMotionEvent::GetY(size_t pointer_index) const { |
} |
float MockMotionEvent::GetRawX(size_t pointer_index) const { |
- return GetX(pointer_index); |
+ return GetX(pointer_index) + raw_offset.x(); |
} |
float MockMotionEvent::GetRawY(size_t pointer_index) const { |
- return GetY(pointer_index); |
+ return GetY(pointer_index) + raw_offset.y(); |
} |
float MockMotionEvent::GetTouchMajor(size_t pointer_index) const { |
@@ -196,4 +196,9 @@ void MockMotionEvent::SetTouchMajor(float new_touch_major) { |
touch_major = new_touch_major; |
} |
+void MockMotionEvent::SetRawOffset(float raw_offset_x, float raw_offset_y) { |
+ raw_offset.set_x(raw_offset_x); |
+ raw_offset.set_y(raw_offset_y); |
+} |
+ |
} // namespace ui |