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 "ui/events/gesture_detection/motion_event.h"
7 #include "base/logging.h"
8 #include "ui/events/gesture_detection/motion_event_generic.h"
12 size_t MotionEvent::GetHistorySize() const {
16 base::TimeTicks
MotionEvent::GetHistoricalEventTime(
17 size_t historical_index
) const {
19 return base::TimeTicks();
22 float MotionEvent::GetHistoricalTouchMajor(size_t pointer_index
,
23 size_t historical_index
) const {
28 float MotionEvent::GetHistoricalX(size_t pointer_index
,
29 size_t historical_index
) const {
34 float MotionEvent::GetHistoricalY(size_t pointer_index
,
35 size_t historical_index
) const {
40 int MotionEvent::FindPointerIndexOfId(int id
) const {
41 const size_t pointer_count
= GetPointerCount();
42 for (size_t i
= 0; i
< pointer_count
; ++i
) {
43 if (GetPointerId(i
) == id
)
44 return static_cast<int>(i
);
49 int MotionEvent::GetSourceDeviceId(size_t pointer_index
) const {
54 scoped_ptr
<MotionEvent
> MotionEvent::Clone() const {
55 return MotionEventGeneric::CloneEvent(*this);
58 scoped_ptr
<MotionEvent
> MotionEvent::Cancel() const {
59 return MotionEventGeneric::CancelEvent(*this);