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

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

Issue 609923004: Cleanup usage of scoped_ptr<> in remoting for C++11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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/basic_desktop_environment.h" 5 #include "remoting/host/basic_desktop_environment.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "remoting/host/audio_capturer.h" 10 #include "remoting/host/audio_capturer.h"
(...skipping 19 matching lines...) Expand all
30 30
31 scoped_ptr<InputInjector> BasicDesktopEnvironment::CreateInputInjector() { 31 scoped_ptr<InputInjector> BasicDesktopEnvironment::CreateInputInjector() {
32 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 32 DCHECK(caller_task_runner_->BelongsToCurrentThread());
33 33
34 return InputInjector::Create(input_task_runner(), ui_task_runner()); 34 return InputInjector::Create(input_task_runner(), ui_task_runner());
35 } 35 }
36 36
37 scoped_ptr<ScreenControls> BasicDesktopEnvironment::CreateScreenControls() { 37 scoped_ptr<ScreenControls> BasicDesktopEnvironment::CreateScreenControls() {
38 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 38 DCHECK(caller_task_runner_->BelongsToCurrentThread());
39 39
40 return scoped_ptr<ScreenControls>(); 40 return nullptr;
41 } 41 }
42 42
43 scoped_ptr<webrtc::MouseCursorMonitor> 43 scoped_ptr<webrtc::MouseCursorMonitor>
44 BasicDesktopEnvironment::CreateMouseCursorMonitor() { 44 BasicDesktopEnvironment::CreateMouseCursorMonitor() {
45 return scoped_ptr<webrtc::MouseCursorMonitor>( 45 return scoped_ptr<webrtc::MouseCursorMonitor>(
46 webrtc::MouseCursorMonitor::CreateForScreen( 46 webrtc::MouseCursorMonitor::CreateForScreen(
47 *desktop_capture_options_, 47 *desktop_capture_options_,
48 webrtc::kFullDesktopScreenId)); 48 webrtc::kFullDesktopScreenId));
49 } 49 }
50 50
51 std::string BasicDesktopEnvironment::GetCapabilities() const { 51 std::string BasicDesktopEnvironment::GetCapabilities() const {
52 return std::string(); 52 return std::string();
53 } 53 }
54 54
55 void BasicDesktopEnvironment::SetCapabilities(const std::string& capabilities) { 55 void BasicDesktopEnvironment::SetCapabilities(const std::string& capabilities) {
56 } 56 }
57 57
58 scoped_ptr<GnubbyAuthHandler> BasicDesktopEnvironment::CreateGnubbyAuthHandler( 58 scoped_ptr<GnubbyAuthHandler> BasicDesktopEnvironment::CreateGnubbyAuthHandler(
59 protocol::ClientStub* client_stub) { 59 protocol::ClientStub* client_stub) {
60 return scoped_ptr<GnubbyAuthHandler>(); 60 return nullptr;
61 } 61 }
62 62
63 scoped_ptr<webrtc::DesktopCapturer> 63 scoped_ptr<webrtc::DesktopCapturer>
64 BasicDesktopEnvironment::CreateVideoCapturer() { 64 BasicDesktopEnvironment::CreateVideoCapturer() {
65 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 65 DCHECK(caller_task_runner_->BelongsToCurrentThread());
66 66
67 // The basic desktop environment does not use X DAMAGE, since it is 67 // The basic desktop environment does not use X DAMAGE, since it is
68 // broken on many systems - see http://crbug.com/73423. 68 // broken on many systems - see http://crbug.com/73423.
69 return scoped_ptr<webrtc::DesktopCapturer>( 69 return scoped_ptr<webrtc::DesktopCapturer>(
70 webrtc::ScreenCapturer::Create(*desktop_capture_options_)); 70 webrtc::ScreenCapturer::Create(*desktop_capture_options_));
(...skipping 24 matching lines...) Expand all
95 BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() { 95 BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() {
96 } 96 }
97 97
98 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const { 98 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const {
99 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 99 DCHECK(caller_task_runner_->BelongsToCurrentThread());
100 100
101 return AudioCapturer::IsSupported(); 101 return AudioCapturer::IsSupported();
102 } 102 }
103 103
104 } // namespace remoting 104 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698