Index: ui/events/test/mock_motion_event.h |
diff --git a/ui/events/test/mock_motion_event.h b/ui/events/test/mock_motion_event.h |
index f5258102fbccccf6562d1d7e3be87a815b4128f1..eeaa4d23095a90d96b2b7a8f34556f218ce673f7 100644 |
--- a/ui/events/test/mock_motion_event.h |
+++ b/ui/events/test/mock_motion_event.h |
@@ -6,14 +6,13 @@ |
#include "base/basictypes.h" |
#include "base/time/time.h" |
-#include "ui/events/gesture_detection/motion_event.h" |
+#include "ui/events/gesture_detection/motion_event_generic.h" |
#include "ui/gfx/geometry/point_f.h" |
namespace ui { |
namespace test { |
-struct MockMotionEvent : public MotionEvent { |
- enum { MAX_POINTERS = 3 }; |
+struct MockMotionEvent : public MotionEventGeneric { |
enum { TOUCH_MAJOR = 10 }; |
MockMotionEvent(); |
@@ -41,30 +40,10 @@ struct MockMotionEvent : public MotionEvent { |
virtual ~MockMotionEvent(); |
// MotionEvent methods. |
- virtual Action GetAction() const OVERRIDE; |
virtual int GetActionIndex() const OVERRIDE; |
- virtual size_t GetPointerCount() const OVERRIDE; |
- virtual int GetId() const OVERRIDE; |
virtual int GetPointerId(size_t pointer_index) const OVERRIDE; |
- virtual float GetX(size_t pointer_index) const OVERRIDE; |
- virtual float GetY(size_t pointer_index) const OVERRIDE; |
virtual float GetRawX(size_t pointer_index) const OVERRIDE; |
virtual float GetRawY(size_t pointer_index) const OVERRIDE; |
- virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE; |
- virtual float GetPressure(size_t pointer_index) const OVERRIDE; |
- virtual base::TimeTicks GetEventTime() const OVERRIDE; |
- virtual size_t GetHistorySize() const OVERRIDE; |
- virtual base::TimeTicks GetHistoricalEventTime(size_t historical_index) const |
- OVERRIDE; |
- virtual float GetHistoricalTouchMajor(size_t pointer_index, |
- size_t historical_index) const OVERRIDE; |
- virtual float GetHistoricalX(size_t pointer_index, |
- size_t historical_index) const OVERRIDE; |
- virtual float GetHistoricalY(size_t pointer_index, |
- size_t historical_index) const OVERRIDE; |
- virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE; |
- virtual int GetButtonState() const OVERRIDE; |
- |
virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE; |
virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE; |
@@ -80,15 +59,10 @@ struct MockMotionEvent : public MotionEvent { |
void SetToolType(size_t index, ToolType tool_type); |
void SetButtonState(int button_state); |
- MotionEvent::Action action; |
- size_t pointer_count; |
- gfx::PointF points[MAX_POINTERS]; |
- ToolType tool_types[MAX_POINTERS]; |
- gfx::Vector2dF raw_offset; |
- base::TimeTicks time; |
- float touch_major; |
- int id; |
- int button_state; |
+ private: |
+ void ResolvePoints(); |
+ |
+ gfx::Vector2dF raw_offset_; |
tdresser
2014/07/23 12:53:45
Now that we're storing separate values for |raw_x|
jdduke (slow)
2014/07/23 17:20:56
Yeah, I actually ripped this out, then found a cou
|
}; |
} // namespace test |