| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 float MockMotionEvent::GetHistoricalX(size_t pointer_index, | 133 float MockMotionEvent::GetHistoricalX(size_t pointer_index, |
| 134 size_t historical_index) const { | 134 size_t historical_index) const { |
| 135 return 0; | 135 return 0; |
| 136 } | 136 } |
| 137 | 137 |
| 138 float MockMotionEvent::GetHistoricalY(size_t pointer_index, | 138 float MockMotionEvent::GetHistoricalY(size_t pointer_index, |
| 139 size_t historical_index) const { | 139 size_t historical_index) const { |
| 140 return 0; | 140 return 0; |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool MockMotionEvent::ShouldConvertToMouseEvent() const { |
| 144 return false; |
| 145 } |
| 146 |
| 143 scoped_ptr<MotionEvent> MockMotionEvent::Clone() const { | 147 scoped_ptr<MotionEvent> MockMotionEvent::Clone() const { |
| 144 return scoped_ptr<MotionEvent>(new MockMotionEvent(*this)); | 148 return scoped_ptr<MotionEvent>(new MockMotionEvent(*this)); |
| 145 } | 149 } |
| 146 | 150 |
| 147 scoped_ptr<MotionEvent> MockMotionEvent::Cancel() const { | 151 scoped_ptr<MotionEvent> MockMotionEvent::Cancel() const { |
| 148 scoped_ptr<MockMotionEvent> cancel_event(new MockMotionEvent(*this)); | 152 scoped_ptr<MockMotionEvent> cancel_event(new MockMotionEvent(*this)); |
| 149 cancel_event->action = MotionEvent::ACTION_CANCEL; | 153 cancel_event->action = MotionEvent::ACTION_CANCEL; |
| 150 return cancel_event.PassAs<MotionEvent>(); | 154 return cancel_event.PassAs<MotionEvent>(); |
| 151 } | 155 } |
| 152 | 156 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (pointer_count > 1) | 194 if (pointer_count > 1) |
| 191 --pointer_count; | 195 --pointer_count; |
| 192 action = ACTION_CANCEL; | 196 action = ACTION_CANCEL; |
| 193 } | 197 } |
| 194 | 198 |
| 195 void MockMotionEvent::SetTouchMajor(float new_touch_major) { | 199 void MockMotionEvent::SetTouchMajor(float new_touch_major) { |
| 196 touch_major = new_touch_major; | 200 touch_major = new_touch_major; |
| 197 } | 201 } |
| 198 | 202 |
| 199 } // namespace ui | 203 } // namespace ui |
| OLD | NEW |