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
3 // found in the LICENSE file.
5 #include "base/basictypes.h"
6 #include "base/time/time.h"
7 #include "ui/events/gesture_detection/motion_event.h"
8 #include "ui/gfx/geometry/point_f.h"
12 struct MockMotionEvent
: public MotionEvent
{
13 MockMotionEvent(Action action
, base::TimeTicks time
, float x
, float y
);
14 MockMotionEvent(Action action
,
20 MockMotionEvent(const MockMotionEvent
& other
);
21 virtual ~MockMotionEvent();
23 virtual Action
GetAction() const OVERRIDE
;
24 virtual int GetActionIndex() const OVERRIDE
;
25 virtual size_t GetPointerCount() const OVERRIDE
;
26 virtual int GetPointerId(size_t pointer_index
) const OVERRIDE
;
27 virtual float GetX(size_t pointer_index
) const OVERRIDE
;
28 virtual float GetY(size_t pointer_index
) const OVERRIDE
;
29 virtual float GetTouchMajor(size_t pointer_index
) const OVERRIDE
;
30 virtual base::TimeTicks
GetEventTime() const OVERRIDE
;
31 virtual size_t GetHistorySize() const OVERRIDE
;
32 virtual base::TimeTicks
GetHistoricalEventTime(size_t historical_index
) const
34 virtual float GetHistoricalTouchMajor(size_t pointer_index
,
35 size_t historical_index
) const OVERRIDE
;
36 virtual float GetHistoricalX(size_t pointer_index
,
37 size_t historical_index
) const OVERRIDE
;
38 virtual float GetHistoricalY(size_t pointer_index
,
39 size_t historical_index
) const OVERRIDE
;
41 virtual scoped_ptr
<MotionEvent
> Clone() const OVERRIDE
;
42 virtual scoped_ptr
<MotionEvent
> Cancel() const OVERRIDE
;
44 MotionEvent::Action action
;
46 gfx::PointF points
[2];