Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: ui/events/gesture_detection/motion_event_generic.cc

Issue 659713003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/events/gesture_detection/motion_event_buffer.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/motion_event_buffer.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698