Revert of Remove OneClickSigninHelper since it is no longer used. (patchset #5 id...
[chromium-blink-merge.git] / remoting / host / fake_desktop_environment.h
blob061a2d33979d4b4a3d8b3184320e918604e8d80d
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 InjectTouchEvent(const protocol::TouchEvent& event) override;
26 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override;
29 class FakeScreenControls : public ScreenControls {
30 public:
31 FakeScreenControls();
32 ~FakeScreenControls() override;
34 // ScreenControls implementation.
35 void SetScreenResolution(const ScreenResolution& resolution) override;
38 class FakeDesktopEnvironment : public DesktopEnvironment {
39 public:
40 FakeDesktopEnvironment();
41 ~FakeDesktopEnvironment() override;
43 // Sets frame generator to be used for FakeDesktopCapturer created by
44 // FakeDesktopEnvironment.
45 void set_frame_generator(
46 FakeDesktopCapturer::FrameGenerator frame_generator) {
47 frame_generator_ = frame_generator;
50 // DesktopEnvironment implementation.
51 scoped_ptr<AudioCapturer> CreateAudioCapturer() override;
52 scoped_ptr<InputInjector> CreateInputInjector() override;
53 scoped_ptr<ScreenControls> CreateScreenControls() override;
54 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override;
55 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() override;
56 std::string GetCapabilities() const override;
57 void SetCapabilities(const std::string& capabilities) override;
58 scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
59 protocol::ClientStub* client_stub) override;
61 private:
62 FakeDesktopCapturer::FrameGenerator frame_generator_;
64 DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironment);
67 class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
68 public:
69 FakeDesktopEnvironmentFactory();
70 ~FakeDesktopEnvironmentFactory() override;
72 // Sets frame generator to be used for FakeDesktopCapturer created by
73 // FakeDesktopEnvironment.
74 void set_frame_generator(
75 FakeDesktopCapturer::FrameGenerator frame_generator) {
76 frame_generator_ = frame_generator;
79 // DesktopEnvironmentFactory implementation.
80 scoped_ptr<DesktopEnvironment> Create(
81 base::WeakPtr<ClientSessionControl> client_session_control) override;
82 void SetEnableCurtaining(bool enable) override;
83 bool SupportsAudioCapture() const override;
84 void SetEnableGnubbyAuth(bool enable) override;
86 private:
87 FakeDesktopCapturer::FrameGenerator frame_generator_;
89 DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironmentFactory);
92 } // namespace remoting
94 #endif // REMOTING_HOST_FAKE_DESKTOP_ENVIRONMENT_H_