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