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

Unified Diff: ui/events/gesture_detection/mock_motion_event.cc

Issue 306483003: Prepare for Unified Gesture Recognizer landing in Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable UGR. Created 6 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/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 26d884f90e9d480666278a63c90bd4e481c6fb4f..6e4e9db0114c534d4a51260debd4efa1bd58b59c 100644
--- a/ui/events/gesture_detection/mock_motion_event.cc
+++ b/ui/events/gesture_detection/mock_motion_event.cc
@@ -49,13 +49,30 @@ MockMotionEvent::MockMotionEvent(Action action,
points[2].SetPoint(x2, y2);
}
+MockMotionEvent::MockMotionEvent(Action action,
+ TimeTicks time,
+ float x0,
+ float y0,
+ float x1,
+ float y1,
+ float x2,
+ float y2,
+ float x3,
+ float y3)
+ : action(action), pointer_count(4), time(time), id(0) {
+ points[0].SetPoint(x0, y0);
+ points[1].SetPoint(x1, y1);
+ points[2].SetPoint(x2, y2);
+ points[2].SetPoint(x3, y3);
+}
+
MockMotionEvent::MockMotionEvent(const MockMotionEvent& other)
: action(other.action),
pointer_count(other.pointer_count),
time(other.time),
id(other.GetId()) {
- points[0] = other.points[0];
- points[1] = other.points[1];
+ for (size_t i = 0; i < pointer_count; ++i)
jdduke (slow) 2014/05/28 16:26:00 Ooph, good catch...
+ points[i] = other.points[i];
}
MockMotionEvent::~MockMotionEvent() {}

Powered by Google App Engine
This is Rietveld 408576698