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/motion_event_generic.h" | 5 #include "ui/events/gesture_detection/motion_event_generic.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace ui { | 9 namespace ui { |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 return event_time_; | 146 return event_time_; |
147 } | 147 } |
148 | 148 |
149 scoped_ptr<MotionEvent> MotionEventGeneric::Clone() const { | 149 scoped_ptr<MotionEvent> MotionEventGeneric::Clone() const { |
150 return scoped_ptr<MotionEvent>(new MotionEventGeneric(*this)); | 150 return scoped_ptr<MotionEvent>(new MotionEventGeneric(*this)); |
151 } | 151 } |
152 | 152 |
153 scoped_ptr<MotionEvent> MotionEventGeneric::Cancel() const { | 153 scoped_ptr<MotionEvent> MotionEventGeneric::Cancel() const { |
154 scoped_ptr<MotionEventGeneric> event(new MotionEventGeneric(*this)); | 154 scoped_ptr<MotionEventGeneric> event(new MotionEventGeneric(*this)); |
155 event->set_action(ACTION_CANCEL); | 155 event->set_action(ACTION_CANCEL); |
156 return event.PassAs<MotionEvent>(); | 156 return event.Pass(); |
157 } | 157 } |
158 | 158 |
159 void MotionEventGeneric::PushPointer(const PointerProperties& pointer) { | 159 void MotionEventGeneric::PushPointer(const PointerProperties& pointer) { |
160 pointers_->push_back(pointer); | 160 pointers_->push_back(pointer); |
161 } | 161 } |
162 | 162 |
163 void MotionEventGeneric::PopPointer() { | 163 void MotionEventGeneric::PopPointer() { |
164 DCHECK_GT(pointers_->size(), 0U); | 164 DCHECK_GT(pointers_->size(), 0U); |
165 pointers_->pop_back(); | 165 pointers_->pop_back(); |
166 } | 166 } |
167 | 167 |
168 } // namespace ui | 168 } // namespace ui |
OLD | NEW |