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