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

Side by Side Diff: remoting/host/touch_injector_win.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "remoting/host/touch_injector_win.h" 5 #include "remoting/host/touch_injector_win.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/native_library.h" 9 #include "base/native_library.h"
10 #include "remoting/proto/event.pb.h" 10 #include "remoting/proto/event.pb.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 CancelTouchPoints(event); 182 CancelTouchPoints(event);
183 break; 183 break;
184 default: 184 default:
185 NOTREACHED(); 185 NOTREACHED();
186 return; 186 return;
187 } 187 }
188 } 188 }
189 189
190 void TouchInjectorWin::SetInjectorDelegateForTest( 190 void TouchInjectorWin::SetInjectorDelegateForTest(
191 scoped_ptr<TouchInjectorWinDelegate> functions) { 191 scoped_ptr<TouchInjectorWinDelegate> functions) {
192 delegate_ = functions.Pass(); 192 delegate_ = std::move(functions);
193 } 193 }
194 194
195 void TouchInjectorWin::AddNewTouchPoints(const TouchEvent& event) { 195 void TouchInjectorWin::AddNewTouchPoints(const TouchEvent& event) {
196 DCHECK_EQ(event.event_type(), TouchEvent::TOUCH_POINT_START); 196 DCHECK_EQ(event.event_type(), TouchEvent::TOUCH_POINT_START);
197 197
198 std::vector<POINTER_TOUCH_INFO> touches; 198 std::vector<POINTER_TOUCH_INFO> touches;
199 // Must inject already touching points as move events. 199 // Must inject already touching points as move events.
200 AppendMapValuesToVector(&touches_in_contact_, &touches); 200 AppendMapValuesToVector(&touches_in_contact_, &touches);
201 201
202 for (const TouchEventPoint& touch_point : event.touch_points()) { 202 for (const TouchEventPoint& touch_point : event.touch_points()) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 touches.push_back(pointer_touch_info); 271 touches.push_back(pointer_touch_info);
272 } 272 }
273 273
274 AppendMapValuesToVector(&touches_in_contact_, &touches); 274 AppendMapValuesToVector(&touches_in_contact_, &touches);
275 if (delegate_->InjectTouchInput(touches.size(), touches.data()) == 0) { 275 if (delegate_->InjectTouchInput(touches.size(), touches.data()) == 0) {
276 PLOG(ERROR) << "Failed to inject a touch cancel event."; 276 PLOG(ERROR) << "Failed to inject a touch cancel event.";
277 } 277 }
278 } 278 }
279 279
280 } // namespace remoting 280 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698