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

Side by Side Diff: remoting/host/single_window_desktop_environment.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 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
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 "remoting/host/single_window_desktop_environment.h" 5 #include "remoting/host/single_window_desktop_environment.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "remoting/host/single_window_input_injector.h" 9 #include "remoting/host/single_window_input_injector.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" 10 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 scoped_ptr<webrtc::DesktopCapturer> 43 scoped_ptr<webrtc::DesktopCapturer>
44 SingleWindowDesktopEnvironment::CreateVideoCapturer() { 44 SingleWindowDesktopEnvironment::CreateVideoCapturer() {
45 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 45 DCHECK(caller_task_runner()->BelongsToCurrentThread());
46 46
47 webrtc::DesktopCaptureOptions options = 47 webrtc::DesktopCaptureOptions options =
48 webrtc::DesktopCaptureOptions::CreateDefault(); 48 webrtc::DesktopCaptureOptions::CreateDefault();
49 options.set_use_update_notifications(true); 49 options.set_use_update_notifications(true);
50 50
51 scoped_ptr<webrtc::WindowCapturer>window_capturer( 51 scoped_ptr<webrtc::WindowCapturer> window_capturer(
52 webrtc::WindowCapturer::Create(options)); 52 webrtc::WindowCapturer::Create(options));
53 window_capturer->SelectWindow(window_id_); 53 window_capturer->SelectWindow(window_id_);
54 54
55 return window_capturer.Pass(); 55 return std::move(window_capturer);
56 } 56 }
57 57
58 scoped_ptr<InputInjector> 58 scoped_ptr<InputInjector>
59 SingleWindowDesktopEnvironment::CreateInputInjector() { 59 SingleWindowDesktopEnvironment::CreateInputInjector() {
60 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 60 DCHECK(caller_task_runner()->BelongsToCurrentThread());
61 61
62 scoped_ptr<InputInjector> input_injector( 62 scoped_ptr<InputInjector> input_injector(
63 InputInjector::Create(input_task_runner(), 63 InputInjector::Create(input_task_runner(),
64 ui_task_runner())); 64 ui_task_runner()));
65 return SingleWindowInputInjector::CreateForWindow( 65 return SingleWindowInputInjector::CreateForWindow(
66 window_id_, input_injector.Pass()).Pass(); 66 window_id_, std::move(input_injector));
67 } 67 }
68 68
69 SingleWindowDesktopEnvironment::SingleWindowDesktopEnvironment( 69 SingleWindowDesktopEnvironment::SingleWindowDesktopEnvironment(
70 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 70 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
71 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 71 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
72 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 72 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
73 webrtc::WindowId window_id, 73 webrtc::WindowId window_id,
74 bool supports_touch_events) 74 bool supports_touch_events)
75 : BasicDesktopEnvironment(caller_task_runner, 75 : BasicDesktopEnvironment(caller_task_runner,
76 input_task_runner, 76 input_task_runner,
(...skipping 20 matching lines...) Expand all
97 scoped_ptr<DesktopEnvironment> SingleWindowDesktopEnvironmentFactory::Create( 97 scoped_ptr<DesktopEnvironment> SingleWindowDesktopEnvironmentFactory::Create(
98 base::WeakPtr<ClientSessionControl> client_session_control) { 98 base::WeakPtr<ClientSessionControl> client_session_control) {
99 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 99 DCHECK(caller_task_runner()->BelongsToCurrentThread());
100 100
101 scoped_ptr<SingleWindowDesktopEnvironment> desktop_environment( 101 scoped_ptr<SingleWindowDesktopEnvironment> desktop_environment(
102 new SingleWindowDesktopEnvironment(caller_task_runner(), 102 new SingleWindowDesktopEnvironment(caller_task_runner(),
103 input_task_runner(), 103 input_task_runner(),
104 ui_task_runner(), 104 ui_task_runner(),
105 window_id_, 105 window_id_,
106 supports_touch_events())); 106 supports_touch_events()));
107 return desktop_environment.Pass(); 107 return std::move(desktop_environment);
108 } 108 }
109 109
110 } // namespace remoting 110 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698