| OLD | NEW |
| 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.h" | 9 #include "ui/events/gesture_detection/motion_event.h" |
| 10 #include "ui/gfx/geometry/point_f.h" | 10 #include "ui/gfx/geometry/point_f.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 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& other); |
| 39 |
| 39 virtual ~MockMotionEvent(); | 40 virtual ~MockMotionEvent(); |
| 40 | 41 |
| 41 // MotionEvent methods. | 42 // MotionEvent methods. |
| 42 virtual Action GetAction() const OVERRIDE; | 43 virtual Action GetAction() const OVERRIDE; |
| 43 virtual int GetActionIndex() const OVERRIDE; | 44 virtual int GetActionIndex() const OVERRIDE; |
| 44 virtual size_t GetPointerCount() const OVERRIDE; | 45 virtual size_t GetPointerCount() const OVERRIDE; |
| 45 virtual int GetId() const OVERRIDE; | 46 virtual int GetId() const OVERRIDE; |
| 46 virtual int GetPointerId(size_t pointer_index) const OVERRIDE; | 47 virtual int GetPointerId(size_t pointer_index) const OVERRIDE; |
| 47 virtual float GetX(size_t pointer_index) const OVERRIDE; | 48 virtual float GetX(size_t pointer_index) const OVERRIDE; |
| 48 virtual float GetY(size_t pointer_index) const OVERRIDE; | 49 virtual float GetY(size_t pointer_index) const OVERRIDE; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 68 | 69 |
| 69 // Utility methods. | 70 // Utility methods. |
| 70 void SetId(int new_id); | 71 void SetId(int new_id); |
| 71 void SetTime(base::TimeTicks new_time); | 72 void SetTime(base::TimeTicks new_time); |
| 72 void PressPoint(float x, float y); | 73 void PressPoint(float x, float y); |
| 73 void MovePoint(size_t index, float x, float y); | 74 void MovePoint(size_t index, float x, float y); |
| 74 void ReleasePoint(); | 75 void ReleasePoint(); |
| 75 void CancelPoint(); | 76 void CancelPoint(); |
| 76 void SetTouchMajor(float new_touch_major); | 77 void SetTouchMajor(float new_touch_major); |
| 77 void SetRawOffset(float raw_offset_x, float raw_offset_y); | 78 void SetRawOffset(float raw_offset_x, float raw_offset_y); |
| 79 void SetToolType(size_t index, ToolType tool_type); |
| 80 void SetButtonState(int button_state); |
| 78 | 81 |
| 79 MotionEvent::Action action; | 82 MotionEvent::Action action; |
| 80 size_t pointer_count; | 83 size_t pointer_count; |
| 81 gfx::PointF points[MAX_POINTERS]; | 84 gfx::PointF points[MAX_POINTERS]; |
| 85 ToolType tool_types[MAX_POINTERS]; |
| 82 gfx::Vector2dF raw_offset; | 86 gfx::Vector2dF raw_offset; |
| 83 base::TimeTicks time; | 87 base::TimeTicks time; |
| 84 float touch_major; | 88 float touch_major; |
| 85 int id; | 89 int id; |
| 90 int button_state; |
| 86 }; | 91 }; |
| 87 | 92 |
| 88 } // namespace ui | 93 } // namespace ui |
| OLD | NEW |