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.
5 #include "remoting/host/fake_desktop_environment.h"
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"
14 FakeInputInjector::FakeInputInjector() {}
15 FakeInputInjector::~FakeInputInjector() {}
17 void FakeInputInjector::Start(
18 scoped_ptr
<protocol::ClipboardStub
> client_clipboard
) {
21 void FakeInputInjector::InjectKeyEvent(const protocol::KeyEvent
& event
) {
24 void FakeInputInjector::InjectTextEvent(const protocol::TextEvent
& event
) {
27 void FakeInputInjector::InjectMouseEvent(const protocol::MouseEvent
& event
) {
30 void FakeInputInjector::InjectClipboardEvent(
31 const protocol::ClipboardEvent
& event
) {
34 FakeScreenControls::FakeScreenControls() {}
35 FakeScreenControls::~FakeScreenControls() {}
37 void FakeScreenControls::SetScreenResolution(
38 const ScreenResolution
& resolution
) {
41 FakeDesktopEnvironment::FakeDesktopEnvironment() {}
43 FakeDesktopEnvironment::~FakeDesktopEnvironment() {}
45 // DesktopEnvironment implementation.
46 scoped_ptr
<AudioCapturer
> FakeDesktopEnvironment::CreateAudioCapturer() {
50 scoped_ptr
<InputInjector
> FakeDesktopEnvironment::CreateInputInjector() {
51 return make_scoped_ptr(new FakeInputInjector());
54 scoped_ptr
<ScreenControls
> FakeDesktopEnvironment::CreateScreenControls() {
55 return make_scoped_ptr(new FakeScreenControls());
58 scoped_ptr
<webrtc::DesktopCapturer
>
59 FakeDesktopEnvironment::CreateVideoCapturer() {
60 scoped_ptr
<FakeDesktopCapturer
> result(new FakeDesktopCapturer());
61 if (!frame_generator_
.is_null())
62 result
->set_frame_generator(frame_generator_
);
66 scoped_ptr
<webrtc::MouseCursorMonitor
>
67 FakeDesktopEnvironment::CreateMouseCursorMonitor() {
68 return make_scoped_ptr(new FakeMouseCursorMonitor());
71 std::string
FakeDesktopEnvironment::GetCapabilities() const {
75 void FakeDesktopEnvironment::SetCapabilities(const std::string
& capabilities
) {}
77 scoped_ptr
<GnubbyAuthHandler
> FakeDesktopEnvironment::CreateGnubbyAuthHandler(
78 protocol::ClientStub
* client_stub
) {
82 FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() {}
83 FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {}
85 // DesktopEnvironmentFactory implementation.
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_
);
93 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable
) {}
95 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const {
99 void FakeDesktopEnvironmentFactory::SetEnableGnubbyAuth(bool enable
) {}
102 } // namespace remoting