Roll src/third_party/WebKit 7f556d1:d75145d (svn 195932:195940)
[chromium-blink-merge.git] / ui / events / gesture_detection / motion_event.cc
blob1d8f7c5269adef6323a4532a277be13741886866
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"
10 namespace ui {
12 size_t MotionEvent::GetHistorySize() const {
13 return 0;
16 base::TimeTicks MotionEvent::GetHistoricalEventTime(
17 size_t historical_index) const {
18 NOTIMPLEMENTED();
19 return base::TimeTicks();
22 float MotionEvent::GetHistoricalTouchMajor(size_t pointer_index,
23 size_t historical_index) const {
24 NOTIMPLEMENTED();
25 return 0.f;
28 float MotionEvent::GetHistoricalX(size_t pointer_index,
29 size_t historical_index) const {
30 NOTIMPLEMENTED();
31 return 0.f;
34 float MotionEvent::GetHistoricalY(size_t pointer_index,
35 size_t historical_index) const {
36 NOTIMPLEMENTED();
37 return 0.f;
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);
46 return -1;
49 int MotionEvent::GetSourceDeviceId(size_t pointer_index) const {
50 NOTIMPLEMENTED();
51 return 0;
54 scoped_ptr<MotionEvent> MotionEvent::Clone() const {
55 return MotionEventGeneric::CloneEvent(*this);
58 scoped_ptr<MotionEvent> MotionEvent::Cancel() const {
59 return MotionEventGeneric::CancelEvent(*this);
62 } // namespace ui