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> |
| 8 |
7 #include "remoting/host/audio_capturer.h" | 9 #include "remoting/host/audio_capturer.h" |
8 #include "remoting/host/gnubby_auth_handler.h" | 10 #include "remoting/host/gnubby_auth_handler.h" |
9 #include "remoting/host/input_injector.h" | 11 #include "remoting/host/input_injector.h" |
10 #include "remoting/proto/event.pb.h" | 12 #include "remoting/proto/event.pb.h" |
11 #include "remoting/protocol/fake_desktop_capturer.h" | 13 #include "remoting/protocol/fake_desktop_capturer.h" |
12 | 14 |
13 namespace remoting { | 15 namespace remoting { |
14 | 16 |
15 FakeInputInjector::FakeInputInjector() {} | 17 FakeInputInjector::FakeInputInjector() {} |
16 FakeInputInjector::~FakeInputInjector() {} | 18 FakeInputInjector::~FakeInputInjector() {} |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 FakeDesktopEnvironment::~FakeDesktopEnvironment() {} | 59 FakeDesktopEnvironment::~FakeDesktopEnvironment() {} |
58 | 60 |
59 // DesktopEnvironment implementation. | 61 // DesktopEnvironment implementation. |
60 scoped_ptr<AudioCapturer> FakeDesktopEnvironment::CreateAudioCapturer() { | 62 scoped_ptr<AudioCapturer> FakeDesktopEnvironment::CreateAudioCapturer() { |
61 return nullptr; | 63 return nullptr; |
62 } | 64 } |
63 | 65 |
64 scoped_ptr<InputInjector> FakeDesktopEnvironment::CreateInputInjector() { | 66 scoped_ptr<InputInjector> FakeDesktopEnvironment::CreateInputInjector() { |
65 scoped_ptr<FakeInputInjector> result(new FakeInputInjector()); | 67 scoped_ptr<FakeInputInjector> result(new FakeInputInjector()); |
66 last_input_injector_ = result->AsWeakPtr(); | 68 last_input_injector_ = result->AsWeakPtr(); |
67 return result.Pass(); | 69 return std::move(result); |
68 } | 70 } |
69 | 71 |
70 scoped_ptr<ScreenControls> FakeDesktopEnvironment::CreateScreenControls() { | 72 scoped_ptr<ScreenControls> FakeDesktopEnvironment::CreateScreenControls() { |
71 return make_scoped_ptr(new FakeScreenControls()); | 73 return make_scoped_ptr(new FakeScreenControls()); |
72 } | 74 } |
73 | 75 |
74 scoped_ptr<webrtc::DesktopCapturer> | 76 scoped_ptr<webrtc::DesktopCapturer> |
75 FakeDesktopEnvironment::CreateVideoCapturer() { | 77 FakeDesktopEnvironment::CreateVideoCapturer() { |
76 scoped_ptr<protocol::FakeDesktopCapturer> result( | 78 scoped_ptr<protocol::FakeDesktopCapturer> result( |
77 new protocol::FakeDesktopCapturer()); | 79 new protocol::FakeDesktopCapturer()); |
78 if (!frame_generator_.is_null()) | 80 if (!frame_generator_.is_null()) |
79 result->set_frame_generator(frame_generator_); | 81 result->set_frame_generator(frame_generator_); |
80 return result.Pass(); | 82 return std::move(result); |
81 } | 83 } |
82 | 84 |
83 scoped_ptr<webrtc::MouseCursorMonitor> | 85 scoped_ptr<webrtc::MouseCursorMonitor> |
84 FakeDesktopEnvironment::CreateMouseCursorMonitor() { | 86 FakeDesktopEnvironment::CreateMouseCursorMonitor() { |
85 return make_scoped_ptr(new FakeMouseCursorMonitor()); | 87 return make_scoped_ptr(new FakeMouseCursorMonitor()); |
86 } | 88 } |
87 | 89 |
88 std::string FakeDesktopEnvironment::GetCapabilities() const { | 90 std::string FakeDesktopEnvironment::GetCapabilities() const { |
89 return std::string(); | 91 return std::string(); |
90 } | 92 } |
91 | 93 |
92 void FakeDesktopEnvironment::SetCapabilities(const std::string& capabilities) {} | 94 void FakeDesktopEnvironment::SetCapabilities(const std::string& capabilities) {} |
93 | 95 |
94 scoped_ptr<GnubbyAuthHandler> FakeDesktopEnvironment::CreateGnubbyAuthHandler( | 96 scoped_ptr<GnubbyAuthHandler> FakeDesktopEnvironment::CreateGnubbyAuthHandler( |
95 protocol::ClientStub* client_stub) { | 97 protocol::ClientStub* client_stub) { |
96 return nullptr; | 98 return nullptr; |
97 } | 99 } |
98 | 100 |
99 FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() {} | 101 FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() {} |
100 FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {} | 102 FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {} |
101 | 103 |
102 // DesktopEnvironmentFactory implementation. | 104 // DesktopEnvironmentFactory implementation. |
103 scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create( | 105 scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create( |
104 base::WeakPtr<ClientSessionControl> client_session_control) { | 106 base::WeakPtr<ClientSessionControl> client_session_control) { |
105 scoped_ptr<FakeDesktopEnvironment> result(new FakeDesktopEnvironment()); | 107 scoped_ptr<FakeDesktopEnvironment> result(new FakeDesktopEnvironment()); |
106 result->set_frame_generator(frame_generator_); | 108 result->set_frame_generator(frame_generator_); |
107 last_desktop_environment_ = result->AsWeakPtr(); | 109 last_desktop_environment_ = result->AsWeakPtr(); |
108 return result.Pass(); | 110 return std::move(result); |
109 } | 111 } |
110 | 112 |
111 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {} | 113 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {} |
112 | 114 |
113 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const { | 115 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const { |
114 return false; | 116 return false; |
115 } | 117 } |
116 | 118 |
117 void FakeDesktopEnvironmentFactory::SetEnableGnubbyAuth(bool enable) {} | 119 void FakeDesktopEnvironmentFactory::SetEnableGnubbyAuth(bool enable) {} |
118 | 120 |
119 | 121 |
120 } // namespace remoting | 122 } // namespace remoting |
OLD | NEW |