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

Side by Side Diff: ui/events/test/mock_motion_event.h

Issue 502993004: Remove abstract Clone and Cancel methods from MotionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "ui/events/gesture_detection/motion_event_generic.h" 9 #include "ui/events/gesture_detection/motion_event_generic.h"
10 #include "ui/gfx/geometry/point_f.h" 10 #include "ui/gfx/geometry/point_f.h"
(...skipping 17 matching lines...) Expand all
28 base::TimeTicks time, 28 base::TimeTicks time,
29 float x0, 29 float x0,
30 float y0, 30 float y0,
31 float x1, 31 float x1,
32 float y1, 32 float y1,
33 float x2, 33 float x2,
34 float y2); 34 float y2);
35 MockMotionEvent(Action action, 35 MockMotionEvent(Action action,
36 base::TimeTicks time, 36 base::TimeTicks time,
37 const std::vector<gfx::PointF>& positions); 37 const std::vector<gfx::PointF>& positions);
38 MockMotionEvent(const MockMotionEvent& other); 38 MockMotionEvent(const MockMotionEvent& event);
39 39
40 virtual ~MockMotionEvent(); 40 virtual ~MockMotionEvent();
41 41
42 // MotionEvent methods.
43 virtual scoped_ptr<MotionEvent> Clone() const override;
44 virtual scoped_ptr<MotionEvent> Cancel() const override;
45 42
46 // Utility methods. 43 // Utility methods.
47 void PressPoint(float x, float y); 44 void PressPoint(float x, float y);
48 void MovePoint(size_t index, float x, float y); 45 void MovePoint(size_t index, float x, float y);
49 void ReleasePoint(); 46 void ReleasePoint();
50 void CancelPoint(); 47 void CancelPoint();
51 void SetTouchMajor(float new_touch_major); 48 void SetTouchMajor(float new_touch_major);
52 void SetRawOffset(float raw_offset_x, float raw_offset_y); 49 void SetRawOffset(float raw_offset_x, float raw_offset_y);
53 void SetToolType(size_t index, ToolType tool_type); 50 void SetToolType(size_t index, ToolType tool_type);
54 51
55 private: 52 private:
56 void PushPointer(float x, float y); 53 void PushPointer(float x, float y);
57 void ResolvePointers(); 54 void ResolvePointers();
58 }; 55 };
59 56
60 } // namespace test 57 } // namespace test
61 } // namespace ui 58 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698