Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / remoting / host / fake_desktop_environment.h
blob91fd9bb47f68909e049ca234f5a640ca216b7ff6
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 #ifndef REMOTING_HOST_FAKE_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_FAKE_DESKTOP_ENVIRONMENT_H_
8 #include "remoting/host/desktop_environment.h"
9 #include "remoting/host/fake_desktop_capturer.h"
10 #include "remoting/host/fake_mouse_cursor_monitor.h"
11 #include "remoting/host/input_injector.h"
12 #include "remoting/host/screen_controls.h"
14 namespace remoting {
16 class FakeInputInjector : public InputInjector {
17 public:
18 FakeInputInjector();
19 virtual ~FakeInputInjector();
21 virtual void Start(
22 scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
23 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE;
24 virtual void InjectTextEvent(const protocol::TextEvent& event) OVERRIDE;
25 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
26 virtual void InjectClipboardEvent(
27 const protocol::ClipboardEvent& event) OVERRIDE;
30 class FakeScreenControls : public ScreenControls {
31 public:
32 FakeScreenControls();
33 virtual ~FakeScreenControls();
35 // ScreenControls implementation.
36 virtual void SetScreenResolution(const ScreenResolution& resolution) OVERRIDE;
39 class FakeDesktopEnvironment : public DesktopEnvironment {
40 public:
41 FakeDesktopEnvironment();
42 virtual ~FakeDesktopEnvironment();
44 // Sets frame generator to be used for FakeDesktopCapturer created by
45 // FakeDesktopEnvironment.
46 void set_frame_generator(
47 FakeDesktopCapturer::FrameGenerator frame_generator) {
48 frame_generator_ = frame_generator;
51 // DesktopEnvironment implementation.
52 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE;
53 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE;
54 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE;
55 virtual scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() OVERRIDE;
56 virtual scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor()
57 OVERRIDE;
58 virtual std::string GetCapabilities() const OVERRIDE;
59 virtual void SetCapabilities(const std::string& capabilities) OVERRIDE;
60 virtual scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
61 protocol::ClientStub* client_stub) OVERRIDE;
63 private:
64 FakeDesktopCapturer::FrameGenerator frame_generator_;
66 DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironment);
69 class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
70 public:
71 FakeDesktopEnvironmentFactory();
72 virtual ~FakeDesktopEnvironmentFactory();
74 // Sets frame generator to be used for FakeDesktopCapturer created by
75 // FakeDesktopEnvironment.
76 void set_frame_generator(
77 FakeDesktopCapturer::FrameGenerator frame_generator) {
78 frame_generator_ = frame_generator;
81 // DesktopEnvironmentFactory implementation.
82 virtual scoped_ptr<DesktopEnvironment> Create(
83 base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE;
84 virtual void SetEnableCurtaining(bool enable) OVERRIDE;
85 virtual bool SupportsAudioCapture() const OVERRIDE;
86 virtual void SetEnableGnubbyAuth(bool enable) OVERRIDE;
88 private:
89 FakeDesktopCapturer::FrameGenerator frame_generator_;
91 DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironmentFactory);
94 } // namespace remoting
96 #endif // REMOTING_HOST_FAKE_DESKTOP_ENVIRONMENT_H_