| 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 "ui/events/gesture_detection/mock_motion_event.h" | 5 #include "ui/events/gesture_detection/mock_motion_event.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 using base::TimeTicks; | 9 using base::TimeTicks; |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 float MockMotionEvent::GetY(size_t pointer_index) const { | 67 float MockMotionEvent::GetY(size_t pointer_index) const { |
| 68 return points[pointer_index].y(); | 68 return points[pointer_index].y(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 float MockMotionEvent::GetTouchMajor(size_t pointer_index) const { | 71 float MockMotionEvent::GetTouchMajor(size_t pointer_index) const { |
| 72 return kTouchMajor; | 72 return kTouchMajor; |
| 73 } | 73 } |
| 74 | 74 |
| 75 float MockMotionEvent::GetPressure(size_t pointer_index) const { |
| 76 return 0; |
| 77 } |
| 78 |
| 75 TimeTicks MockMotionEvent::GetEventTime() const { return time; } | 79 TimeTicks MockMotionEvent::GetEventTime() const { return time; } |
| 76 | 80 |
| 77 size_t MockMotionEvent::GetHistorySize() const { return 0; } | 81 size_t MockMotionEvent::GetHistorySize() const { return 0; } |
| 78 | 82 |
| 79 TimeTicks MockMotionEvent::GetHistoricalEventTime( | 83 TimeTicks MockMotionEvent::GetHistoricalEventTime( |
| 80 size_t historical_index) const { | 84 size_t historical_index) const { |
| 81 return TimeTicks(); | 85 return TimeTicks(); |
| 82 } | 86 } |
| 83 | 87 |
| 84 float MockMotionEvent::GetHistoricalTouchMajor(size_t pointer_index, | 88 float MockMotionEvent::GetHistoricalTouchMajor(size_t pointer_index, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } | 138 } |
| 135 | 139 |
| 136 void MockMotionEvent::CancelPoint() { | 140 void MockMotionEvent::CancelPoint() { |
| 137 DCHECK_GT(pointer_count, 0U); | 141 DCHECK_GT(pointer_count, 0U); |
| 138 if (pointer_count > 1) | 142 if (pointer_count > 1) |
| 139 --pointer_count; | 143 --pointer_count; |
| 140 action = ACTION_CANCEL; | 144 action = ACTION_CANCEL; |
| 141 } | 145 } |
| 142 | 146 |
| 143 } // namespace ui | 147 } // namespace ui |
| OLD | NEW |