OLD | NEW |
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/fake_desktop_environment.h" | 5 #include "remoting/host/fake_desktop_environment.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "remoting/host/audio_capturer.h" | 10 #include "remoting/host/audio_capturer.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return nullptr; | 62 return nullptr; |
63 } | 63 } |
64 | 64 |
65 std::unique_ptr<InputInjector> FakeDesktopEnvironment::CreateInputInjector() { | 65 std::unique_ptr<InputInjector> FakeDesktopEnvironment::CreateInputInjector() { |
66 std::unique_ptr<FakeInputInjector> result(new FakeInputInjector()); | 66 std::unique_ptr<FakeInputInjector> result(new FakeInputInjector()); |
67 last_input_injector_ = result->AsWeakPtr(); | 67 last_input_injector_ = result->AsWeakPtr(); |
68 return std::move(result); | 68 return std::move(result); |
69 } | 69 } |
70 | 70 |
71 std::unique_ptr<ScreenControls> FakeDesktopEnvironment::CreateScreenControls() { | 71 std::unique_ptr<ScreenControls> FakeDesktopEnvironment::CreateScreenControls() { |
72 return base::WrapUnique(new FakeScreenControls()); | 72 return base::MakeUnique<FakeScreenControls>(); |
73 } | 73 } |
74 | 74 |
75 std::unique_ptr<webrtc::DesktopCapturer> | 75 std::unique_ptr<webrtc::DesktopCapturer> |
76 FakeDesktopEnvironment::CreateVideoCapturer() { | 76 FakeDesktopEnvironment::CreateVideoCapturer() { |
77 std::unique_ptr<protocol::FakeDesktopCapturer> result( | 77 std::unique_ptr<protocol::FakeDesktopCapturer> result( |
78 new protocol::FakeDesktopCapturer()); | 78 new protocol::FakeDesktopCapturer()); |
79 if (!frame_generator_.is_null()) | 79 if (!frame_generator_.is_null()) |
80 result->set_frame_generator(frame_generator_); | 80 result->set_frame_generator(frame_generator_); |
81 return std::move(result); | 81 return std::move(result); |
82 } | 82 } |
83 | 83 |
84 std::unique_ptr<webrtc::MouseCursorMonitor> | 84 std::unique_ptr<webrtc::MouseCursorMonitor> |
85 FakeDesktopEnvironment::CreateMouseCursorMonitor() { | 85 FakeDesktopEnvironment::CreateMouseCursorMonitor() { |
86 return base::WrapUnique(new FakeMouseCursorMonitor()); | 86 return base::MakeUnique<FakeMouseCursorMonitor>(); |
87 } | 87 } |
88 | 88 |
89 std::string FakeDesktopEnvironment::GetCapabilities() const { | 89 std::string FakeDesktopEnvironment::GetCapabilities() const { |
90 return std::string(); | 90 return std::string(); |
91 } | 91 } |
92 | 92 |
93 void FakeDesktopEnvironment::SetCapabilities(const std::string& capabilities) {} | 93 void FakeDesktopEnvironment::SetCapabilities(const std::string& capabilities) {} |
94 | 94 |
95 uint32_t FakeDesktopEnvironment::GetDesktopSessionId() const { | 95 uint32_t FakeDesktopEnvironment::GetDesktopSessionId() const { |
96 return UINT32_MAX; | 96 return UINT32_MAX; |
(...skipping 11 matching lines...) Expand all Loading... |
108 return std::move(result); | 108 return std::move(result); |
109 } | 109 } |
110 | 110 |
111 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {} | 111 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {} |
112 | 112 |
113 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const { | 113 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const { |
114 return false; | 114 return false; |
115 } | 115 } |
116 | 116 |
117 } // namespace remoting | 117 } // namespace remoting |
OLD | NEW |