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

Side by Side Diff: remoting/host/win/session_desktop_environment.cc

Issue 2253233004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/win/session_desktop_environment.h" 5 #include "remoting/host/win/session_desktop_environment.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "remoting/host/audio_capturer.h" 12 #include "remoting/host/audio_capturer.h"
13 #include "remoting/host/input_injector.h" 13 #include "remoting/host/input_injector.h"
14 #include "remoting/host/screen_controls.h" 14 #include "remoting/host/screen_controls.h"
15 #include "remoting/host/win/session_input_injector.h" 15 #include "remoting/host/win/session_input_injector.h"
16 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" 16 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 SessionDesktopEnvironment::~SessionDesktopEnvironment() {} 20 SessionDesktopEnvironment::~SessionDesktopEnvironment() {}
21 21
22 std::unique_ptr<InputInjector> 22 std::unique_ptr<InputInjector>
23 SessionDesktopEnvironment::CreateInputInjector() { 23 SessionDesktopEnvironment::CreateInputInjector() {
24 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 24 DCHECK(caller_task_runner()->BelongsToCurrentThread());
25 25
26 return base::WrapUnique(new SessionInputInjectorWin( 26 return base::MakeUnique<SessionInputInjectorWin>(
27 input_task_runner(), 27 input_task_runner(),
28 InputInjector::Create(input_task_runner(), ui_task_runner()), 28 InputInjector::Create(input_task_runner(), ui_task_runner()),
29 ui_task_runner(), inject_sas_, lock_workstation_)); 29 ui_task_runner(), inject_sas_, lock_workstation_);
30 } 30 }
31 31
32 SessionDesktopEnvironment::SessionDesktopEnvironment( 32 SessionDesktopEnvironment::SessionDesktopEnvironment(
33 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 33 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
34 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 34 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
35 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 35 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
36 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 36 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
37 const base::Closure& inject_sas, 37 const base::Closure& inject_sas,
38 const base::Closure& lock_workstation, 38 const base::Closure& lock_workstation,
39 bool supports_touch_events) 39 bool supports_touch_events)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 supports_touch_events())); 74 supports_touch_events()));
75 if (!desktop_environment->InitializeSecurity(client_session_control, 75 if (!desktop_environment->InitializeSecurity(client_session_control,
76 curtain_enabled())) { 76 curtain_enabled())) {
77 return nullptr; 77 return nullptr;
78 } 78 }
79 79
80 return std::move(desktop_environment); 80 return std::move(desktop_environment);
81 } 81 }
82 82
83 } // namespace remoting 83 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/token_validator_factory_impl_unittest.cc ('k') | remoting/protocol/authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698