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

Side by Side Diff: ui/events/gestures/gesture_provider_aura.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/gestures/blink/web_gesture_curve_impl.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/gestures/gesture_provider_aura.h" 5 #include "ui/events/gestures/gesture_provider_aura.h"
6 6
7 #include <utility>
8
7 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
8 #include "base/logging.h" 10 #include "base/logging.h"
9 #include "ui/events/event.h" 11 #include "ui/events/event.h"
10 #include "ui/events/gesture_detection/gesture_configuration.h" 12 #include "ui/events/gesture_detection/gesture_configuration.h"
11 #include "ui/events/gesture_detection/gesture_event_data.h" 13 #include "ui/events/gesture_detection/gesture_event_data.h"
12 #include "ui/events/gesture_detection/gesture_provider_config_helper.h" 14 #include "ui/events/gesture_detection/gesture_provider_config_helper.h"
13 15
14 namespace ui { 16 namespace ui {
15 17
16 GestureProviderAura::GestureProviderAura(GestureProviderAuraClient* client) 18 GestureProviderAura::GestureProviderAura(GestureProviderAuraClient* client)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 gesture.y, 56 gesture.y,
55 gesture.flags, 57 gesture.flags,
56 gesture.time - base::TimeTicks(), 58 gesture.time - base::TimeTicks(),
57 details)); 59 details));
58 60
59 if (!handling_event_) { 61 if (!handling_event_) {
60 // Dispatching event caused by timer. 62 // Dispatching event caused by timer.
61 client_->OnGestureEvent(event.get()); 63 client_->OnGestureEvent(event.get());
62 } else { 64 } else {
63 // Memory managed by ScopedVector pending_gestures_. 65 // Memory managed by ScopedVector pending_gestures_.
64 pending_gestures_.push_back(event.Pass()); 66 pending_gestures_.push_back(std::move(event));
65 } 67 }
66 } 68 }
67 69
68 ScopedVector<GestureEvent>* GestureProviderAura::GetAndResetPendingGestures() { 70 ScopedVector<GestureEvent>* GestureProviderAura::GetAndResetPendingGestures() {
69 if (pending_gestures_.empty()) 71 if (pending_gestures_.empty())
70 return NULL; 72 return NULL;
71 // Caller is responsible for deleting old_pending_gestures. 73 // Caller is responsible for deleting old_pending_gestures.
72 ScopedVector<GestureEvent>* old_pending_gestures = 74 ScopedVector<GestureEvent>* old_pending_gestures =
73 new ScopedVector<GestureEvent>(); 75 new ScopedVector<GestureEvent>();
74 old_pending_gestures->swap(pending_gestures_); 76 old_pending_gestures->swap(pending_gestures_);
75 return old_pending_gestures; 77 return old_pending_gestures;
76 } 78 }
77 79
78 } // namespace content 80 } // namespace content
OLDNEW
« no previous file with comments | « ui/events/gestures/blink/web_gesture_curve_impl.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698