Standardize usage of virtual/override/final specifiers in crypto/.
[chromium-blink-merge.git] / remoting / host / me2me_desktop_environment.h
blob40ba28217f18dd8a13dad622ca91964ba07b94d6
1 // Copyright (c) 2012 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_ME2ME_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_
8 #include "remoting/host/basic_desktop_environment.h"
10 namespace remoting {
12 class CurtainMode;
13 class HostWindow;
14 class LocalInputMonitor;
16 // Same as BasicDesktopEnvironment but supports desktop resizing and X DAMAGE
17 // notifications on Linux.
18 class Me2MeDesktopEnvironment : public BasicDesktopEnvironment {
19 public:
20 ~Me2MeDesktopEnvironment() override;
22 // DesktopEnvironment interface.
23 scoped_ptr<ScreenControls> CreateScreenControls() override;
24 std::string GetCapabilities() const override;
25 scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
26 protocol::ClientStub* client_stub) override;
28 protected:
29 friend class Me2MeDesktopEnvironmentFactory;
30 Me2MeDesktopEnvironment(
31 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
32 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
33 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
35 // Initializes security features of the desktop environment (the curtain mode
36 // and in-session UI).
37 bool InitializeSecurity(
38 base::WeakPtr<ClientSessionControl> client_session_control,
39 bool curtain_enabled);
41 void SetEnableGnubbyAuth(bool gnubby_auth_enabled);
43 private:
44 // "Curtains" the session making sure it is disconnected from the local
45 // console.
46 scoped_ptr<CurtainMode> curtain_;
48 // Presents the disconnect window to the local user.
49 scoped_ptr<HostWindow> disconnect_window_;
51 // Notifies the client session about the local mouse movements.
52 scoped_ptr<LocalInputMonitor> local_input_monitor_;
54 // True if gnubby auth is enabled.
55 bool gnubby_auth_enabled_;
57 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment);
60 // Used to create |Me2MeDesktopEnvironment| instances.
61 class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory {
62 public:
63 Me2MeDesktopEnvironmentFactory(
64 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
65 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
66 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
67 ~Me2MeDesktopEnvironmentFactory() override;
69 // DesktopEnvironmentFactory interface.
70 scoped_ptr<DesktopEnvironment> Create(
71 base::WeakPtr<ClientSessionControl> client_session_control) override;
72 void SetEnableCurtaining(bool enable) override;
73 void SetEnableGnubbyAuth(bool enable) override;
75 protected:
76 bool curtain_enabled() const { return curtain_enabled_; }
78 private:
79 // True if curtain mode is enabled.
80 bool curtain_enabled_;
82 // True if gnubby auth is enabled.
83 bool gnubby_auth_enabled_;
85 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory);
88 } // namespace remoting
90 #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_