OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "remoting/host/fake_desktop_environment.h" |
| 6 |
| 7 #include "remoting/host/audio_capturer.h" |
| 8 #include "remoting/host/fake_screen_capturer.h" |
| 9 #include "remoting/host/gnubby_auth_handler.h" |
| 10 #include "remoting/host/input_injector.h" |
| 11 |
| 12 namespace remoting { |
| 13 |
| 14 FakeInputInjector::FakeInputInjector() {} |
| 15 FakeInputInjector::~FakeInputInjector() {} |
| 16 |
| 17 void FakeInputInjector::Start( |
| 18 scoped_ptr<protocol::ClipboardStub> client_clipboard) { |
| 19 } |
| 20 |
| 21 void FakeInputInjector::InjectKeyEvent(const protocol::KeyEvent& event) { |
| 22 } |
| 23 |
| 24 void FakeInputInjector::InjectTextEvent(const protocol::TextEvent& event) { |
| 25 } |
| 26 |
| 27 void FakeInputInjector::InjectMouseEvent(const protocol::MouseEvent& event) { |
| 28 } |
| 29 |
| 30 void FakeInputInjector::InjectClipboardEvent( |
| 31 const protocol::ClipboardEvent& event) { |
| 32 } |
| 33 |
| 34 FakeScreenControls::FakeScreenControls() {} |
| 35 FakeScreenControls::~FakeScreenControls() {} |
| 36 |
| 37 void FakeScreenControls::SetScreenResolution( |
| 38 const ScreenResolution& resolution) { |
| 39 } |
| 40 |
| 41 FakeDesktopEnvironment::FakeDesktopEnvironment() {} |
| 42 |
| 43 FakeDesktopEnvironment::~FakeDesktopEnvironment() {} |
| 44 |
| 45 // DesktopEnvironment implementation. |
| 46 scoped_ptr<AudioCapturer> FakeDesktopEnvironment::CreateAudioCapturer() { |
| 47 return scoped_ptr<AudioCapturer>(); |
| 48 } |
| 49 |
| 50 scoped_ptr<InputInjector> FakeDesktopEnvironment::CreateInputInjector() { |
| 51 return scoped_ptr<InputInjector>(new FakeInputInjector()); |
| 52 } |
| 53 |
| 54 scoped_ptr<ScreenControls> FakeDesktopEnvironment::CreateScreenControls() { |
| 55 return scoped_ptr<ScreenControls>(new FakeScreenControls()); |
| 56 } |
| 57 |
| 58 scoped_ptr<webrtc::ScreenCapturer> |
| 59 FakeDesktopEnvironment::CreateVideoCapturer() { |
| 60 scoped_ptr<FakeScreenCapturer> result(new FakeScreenCapturer()); |
| 61 if (!frame_generator_.is_null()) |
| 62 result->set_frame_generator(frame_generator_); |
| 63 return result.PassAs<webrtc::ScreenCapturer>(); |
| 64 } |
| 65 |
| 66 std::string FakeDesktopEnvironment::GetCapabilities() const { |
| 67 return std::string(); |
| 68 } |
| 69 |
| 70 void FakeDesktopEnvironment::SetCapabilities(const std::string& capabilities) {} |
| 71 |
| 72 scoped_ptr<GnubbyAuthHandler> FakeDesktopEnvironment::CreateGnubbyAuthHandler( |
| 73 protocol::ClientStub* client_stub) { |
| 74 return scoped_ptr<GnubbyAuthHandler>(); |
| 75 } |
| 76 |
| 77 FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() {} |
| 78 FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {} |
| 79 |
| 80 // DesktopEnvironmentFactory implementation. |
| 81 scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create( |
| 82 base::WeakPtr<ClientSessionControl> client_session_control) { |
| 83 scoped_ptr<FakeDesktopEnvironment> result(new FakeDesktopEnvironment()); |
| 84 result->set_frame_generator(frame_generator_); |
| 85 return result.PassAs<DesktopEnvironment>(); |
| 86 } |
| 87 |
| 88 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {} |
| 89 |
| 90 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const { |
| 91 return false; |
| 92 } |
| 93 |
| 94 void FakeDesktopEnvironmentFactory::SetEnableGnubbyAuth(bool enable) {} |
| 95 |
| 96 |
| 97 } // namespace remoting |
OLD | NEW |