Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / remoting / host / fake_desktop_environment.cc
blobf399ae853103e46150dacc481b2543d5ae2d4f0b
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"
12 namespace remoting {
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() {
47 return scoped_ptr<AudioCapturer>();
50 scoped_ptr<InputInjector> FakeDesktopEnvironment::CreateInputInjector() {
51 return scoped_ptr<InputInjector>(new FakeInputInjector());
54 scoped_ptr<ScreenControls> FakeDesktopEnvironment::CreateScreenControls() {
55 return scoped_ptr<ScreenControls>(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_);
63 return result.PassAs<webrtc::DesktopCapturer>();
66 scoped_ptr<webrtc::MouseCursorMonitor>
67 FakeDesktopEnvironment::CreateMouseCursorMonitor() {
68 return scoped_ptr<webrtc::MouseCursorMonitor>(new FakeMouseCursorMonitor());
71 std::string FakeDesktopEnvironment::GetCapabilities() const {
72 return std::string();
75 void FakeDesktopEnvironment::SetCapabilities(const std::string& capabilities) {}
77 scoped_ptr<GnubbyAuthHandler> FakeDesktopEnvironment::CreateGnubbyAuthHandler(
78 protocol::ClientStub* client_stub) {
79 return scoped_ptr<GnubbyAuthHandler>();
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_);
90 return result.PassAs<DesktopEnvironment>();
93 void FakeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {}
95 bool FakeDesktopEnvironmentFactory::SupportsAudioCapture() const {
96 return false;
99 void FakeDesktopEnvironmentFactory::SetEnableGnubbyAuth(bool enable) {}
102 } // namespace remoting