GN + Android: extract android_standalone_library rule.
[chromium-blink-merge.git] / remoting / host / fake_desktop_environment.h
blob043f33fa26504940d6487fd943880666f5089415
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 ~FakeInputInjector() override;
21 void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override;
22 void InjectKeyEvent(const protocol::KeyEvent& event) override;
23 void InjectTextEvent(const protocol::TextEvent& event) override;
24 void InjectMouseEvent(const protocol::MouseEvent& event) override;
25 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override;
28 class FakeScreenControls : public ScreenControls {
29 public:
30 FakeScreenControls();
31 ~FakeScreenControls() override;
33 // ScreenControls implementation.
34 void SetScreenResolution(const ScreenResolution& resolution) override;
37 class FakeDesktopEnvironment : public DesktopEnvironment {
38 public:
39 FakeDesktopEnvironment();
40 ~FakeDesktopEnvironment() override;
42 // Sets frame generator to be used for FakeDesktopCapturer created by
43 // FakeDesktopEnvironment.
44 void set_frame_generator(
45 FakeDesktopCapturer::FrameGenerator frame_generator) {
46 frame_generator_ = frame_generator;
49 // DesktopEnvironment implementation.
50 scoped_ptr<AudioCapturer> CreateAudioCapturer() override;
51 scoped_ptr<InputInjector> CreateInputInjector() override;
52 scoped_ptr<ScreenControls> CreateScreenControls() override;
53 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override;
54 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() override;
55 std::string GetCapabilities() const override;
56 void SetCapabilities(const std::string& capabilities) override;
57 scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
58 protocol::ClientStub* client_stub) override;
60 private:
61 FakeDesktopCapturer::FrameGenerator frame_generator_;
63 DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironment);
66 class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
67 public:
68 FakeDesktopEnvironmentFactory();
69 ~FakeDesktopEnvironmentFactory() override;
71 // Sets frame generator to be used for FakeDesktopCapturer created by
72 // FakeDesktopEnvironment.
73 void set_frame_generator(
74 FakeDesktopCapturer::FrameGenerator frame_generator) {
75 frame_generator_ = frame_generator;
78 // DesktopEnvironmentFactory implementation.
79 scoped_ptr<DesktopEnvironment> Create(
80 base::WeakPtr<ClientSessionControl> client_session_control) override;
81 void SetEnableCurtaining(bool enable) override;
82 bool SupportsAudioCapture() const override;
83 void SetEnableGnubbyAuth(bool enable) override;
85 private:
86 FakeDesktopCapturer::FrameGenerator frame_generator_;
88 DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironmentFactory);
91 } // namespace remoting
93 #endif // REMOTING_HOST_FAKE_DESKTOP_ENVIRONMENT_H_