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::InjectTouchEvent(const protocol::TouchEvent
& event
) {
33 void FakeInputInjector::InjectClipboardEvent(
34 const protocol::ClipboardEvent
& event
) {
37 FakeScreenControls::FakeScreenControls() {}
38 FakeScreenControls::~FakeScreenControls() {}
40 void FakeScreenControls::SetScreenResolution(
41 const ScreenResolution
& resolution
) {
44 FakeDesktopEnvironment::FakeDesktopEnvironment() {}
46 FakeDesktopEnvironment::~FakeDesktopEnvironment() {}
48 // DesktopEnvironment implementation.
49 scoped_ptr
<AudioCapturer
> FakeDesktopEnvironment::CreateAudioCapturer() {
53 scoped_ptr
<InputInjector
> FakeDesktopEnvironment::CreateInputInjector() {
54 return make_scoped_ptr(new FakeInputInjector());
57 scoped_ptr
<ScreenControls
> FakeDesktopEnvironment::CreateScreenControls() {
58 return make_scoped_ptr(new FakeScreenControls());
61 scoped_ptr
<webrtc::DesktopCapturer
>
62 FakeDesktopEnvironment::CreateVideoCapturer() {
63 scoped_ptr
<FakeDesktopCapturer
> result(new FakeDesktopCapturer());
64 if (!frame_generator_
.is_null())
65 result
->set_frame_generator(frame_generator_
);
69 scoped_ptr
<webrtc::MouseCursorMonitor
>
70 FakeDesktopEnvironment::CreateMouseCursorMonitor() {
71 return make_scoped_ptr(new FakeMouseCursorMonitor());
74 std::string
FakeDesktopEnvironment::GetCapabilities() const {
78 void FakeDesktopEnvironment::SetCapabilities(const std::string
& capabilities
) {}
80 scoped_ptr
<GnubbyAuthHandler
> FakeDesktopEnvironment::CreateGnubbyAuthHandler(
81 protocol::ClientStub
* client_stub
) {
85 FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() {}
86 FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {}
88 // DesktopEnvironmentFactory implementation.
89 scoped_ptr
<DesktopEnvironment
> FakeDesktopEnvironmentFactory::Create(
90 base::WeakPtr
<ClientSessionControl
> client_session_control
) {
91 scoped_ptr
<FakeDesktopEnvironment
> result(new FakeDesktopEnvironment());
92 result
->set_frame_generator(frame_generator_
);
96 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable
) {}
98 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const {
102 void FakeDesktopEnvironmentFactory::SetEnableGnubbyAuth(bool enable
) {}
105 } // namespace remoting