| 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 "remoting/host/audio_capturer.h" | 7 #include "remoting/host/audio_capturer.h" |
| 8 #include "remoting/host/fake_desktop_capturer.h" | 8 #include "remoting/host/fake_desktop_capturer.h" |
| 9 #include "remoting/host/gnubby_auth_handler.h" | 9 #include "remoting/host/gnubby_auth_handler.h" |
| 10 #include "remoting/host/input_injector.h" | 10 #include "remoting/host/input_injector.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 void FakeScreenControls::SetScreenResolution( | 37 void FakeScreenControls::SetScreenResolution( |
| 38 const ScreenResolution& resolution) { | 38 const ScreenResolution& resolution) { |
| 39 } | 39 } |
| 40 | 40 |
| 41 FakeDesktopEnvironment::FakeDesktopEnvironment() {} | 41 FakeDesktopEnvironment::FakeDesktopEnvironment() {} |
| 42 | 42 |
| 43 FakeDesktopEnvironment::~FakeDesktopEnvironment() {} | 43 FakeDesktopEnvironment::~FakeDesktopEnvironment() {} |
| 44 | 44 |
| 45 // DesktopEnvironment implementation. | 45 // DesktopEnvironment implementation. |
| 46 scoped_ptr<AudioCapturer> FakeDesktopEnvironment::CreateAudioCapturer() { | 46 scoped_ptr<AudioCapturer> FakeDesktopEnvironment::CreateAudioCapturer() { |
| 47 return scoped_ptr<AudioCapturer>(); | 47 return nullptr; |
| 48 } | 48 } |
| 49 | 49 |
| 50 scoped_ptr<InputInjector> FakeDesktopEnvironment::CreateInputInjector() { | 50 scoped_ptr<InputInjector> FakeDesktopEnvironment::CreateInputInjector() { |
| 51 return scoped_ptr<InputInjector>(new FakeInputInjector()); | 51 return scoped_ptr<InputInjector>(new FakeInputInjector()); |
| 52 } | 52 } |
| 53 | 53 |
| 54 scoped_ptr<ScreenControls> FakeDesktopEnvironment::CreateScreenControls() { | 54 scoped_ptr<ScreenControls> FakeDesktopEnvironment::CreateScreenControls() { |
| 55 return scoped_ptr<ScreenControls>(new FakeScreenControls()); | 55 return scoped_ptr<ScreenControls>(new FakeScreenControls()); |
| 56 } | 56 } |
| 57 | 57 |
| 58 scoped_ptr<webrtc::DesktopCapturer> | 58 scoped_ptr<webrtc::DesktopCapturer> |
| 59 FakeDesktopEnvironment::CreateVideoCapturer() { | 59 FakeDesktopEnvironment::CreateVideoCapturer() { |
| 60 scoped_ptr<FakeDesktopCapturer> result(new FakeDesktopCapturer()); | 60 scoped_ptr<FakeDesktopCapturer> result(new FakeDesktopCapturer()); |
| 61 if (!frame_generator_.is_null()) | 61 if (!frame_generator_.is_null()) |
| 62 result->set_frame_generator(frame_generator_); | 62 result->set_frame_generator(frame_generator_); |
| 63 return result.PassAs<webrtc::DesktopCapturer>(); | 63 return result.Pass(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 scoped_ptr<webrtc::MouseCursorMonitor> | 66 scoped_ptr<webrtc::MouseCursorMonitor> |
| 67 FakeDesktopEnvironment::CreateMouseCursorMonitor() { | 67 FakeDesktopEnvironment::CreateMouseCursorMonitor() { |
| 68 return scoped_ptr<webrtc::MouseCursorMonitor>(new FakeMouseCursorMonitor()); | 68 return scoped_ptr<webrtc::MouseCursorMonitor>(new FakeMouseCursorMonitor()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 std::string FakeDesktopEnvironment::GetCapabilities() const { | 71 std::string FakeDesktopEnvironment::GetCapabilities() const { |
| 72 return std::string(); | 72 return std::string(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void FakeDesktopEnvironment::SetCapabilities(const std::string& capabilities) {} | 75 void FakeDesktopEnvironment::SetCapabilities(const std::string& capabilities) {} |
| 76 | 76 |
| 77 scoped_ptr<GnubbyAuthHandler> FakeDesktopEnvironment::CreateGnubbyAuthHandler( | 77 scoped_ptr<GnubbyAuthHandler> FakeDesktopEnvironment::CreateGnubbyAuthHandler( |
| 78 protocol::ClientStub* client_stub) { | 78 protocol::ClientStub* client_stub) { |
| 79 return scoped_ptr<GnubbyAuthHandler>(); | 79 return nullptr; |
| 80 } | 80 } |
| 81 | 81 |
| 82 FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() {} | 82 FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() {} |
| 83 FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {} | 83 FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {} |
| 84 | 84 |
| 85 // DesktopEnvironmentFactory implementation. | 85 // DesktopEnvironmentFactory implementation. |
| 86 scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create( | 86 scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create( |
| 87 base::WeakPtr<ClientSessionControl> client_session_control) { | 87 base::WeakPtr<ClientSessionControl> client_session_control) { |
| 88 scoped_ptr<FakeDesktopEnvironment> result(new FakeDesktopEnvironment()); | 88 scoped_ptr<FakeDesktopEnvironment> result(new FakeDesktopEnvironment()); |
| 89 result->set_frame_generator(frame_generator_); | 89 result->set_frame_generator(frame_generator_); |
| 90 return result.PassAs<DesktopEnvironment>(); | 90 return result.Pass(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {} | 93 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {} |
| 94 | 94 |
| 95 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const { | 95 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const { |
| 96 return false; | 96 return false; |
| 97 } | 97 } |
| 98 | 98 |
| 99 void FakeDesktopEnvironmentFactory::SetEnableGnubbyAuth(bool enable) {} | 99 void FakeDesktopEnvironmentFactory::SetEnableGnubbyAuth(bool enable) {} |
| 100 | 100 |
| 101 | 101 |
| 102 } // namespace remoting | 102 } // namespace remoting |
| OLD | NEW |