OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ | 5 #ifndef REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ |
6 #define REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ | 6 #define REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "remoting/host/basic_desktop_environment.h" | 9 #include "remoting/host/basic_desktop_environment.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 // DesktopEnvironment interface. | 23 // DesktopEnvironment interface. |
24 scoped_ptr<ScreenControls> CreateScreenControls() override; | 24 scoped_ptr<ScreenControls> CreateScreenControls() override; |
25 std::string GetCapabilities() const override; | 25 std::string GetCapabilities() const override; |
26 scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( | 26 scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( |
27 protocol::ClientStub* client_stub) override; | 27 protocol::ClientStub* client_stub) override; |
28 | 28 |
29 protected: | 29 protected: |
30 friend class Me2MeDesktopEnvironmentFactory; | 30 friend class Me2MeDesktopEnvironmentFactory; |
31 Me2MeDesktopEnvironment( | 31 Me2MeDesktopEnvironment( |
32 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 32 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 33 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
33 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 34 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
34 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 35 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
35 bool supports_touch_events); | 36 bool supports_touch_events); |
36 | 37 |
37 // Initializes security features of the desktop environment (the curtain mode | 38 // Initializes security features of the desktop environment (the curtain mode |
38 // and in-session UI). | 39 // and in-session UI). |
39 bool InitializeSecurity( | 40 bool InitializeSecurity( |
40 base::WeakPtr<ClientSessionControl> client_session_control, | 41 base::WeakPtr<ClientSessionControl> client_session_control, |
41 bool curtain_enabled); | 42 bool curtain_enabled); |
42 | 43 |
43 void SetEnableGnubbyAuth(bool gnubby_auth_enabled); | 44 void SetEnableGnubbyAuth(bool gnubby_auth_enabled); |
44 | 45 |
45 private: | 46 private: |
46 // "Curtains" the session making sure it is disconnected from the local | 47 // "Curtains" the session making sure it is disconnected from the local |
47 // console. | 48 // console. |
48 scoped_ptr<CurtainMode> curtain_; | 49 scoped_ptr<CurtainMode> curtain_; |
49 | 50 |
50 // Presents the disconnect window to the local user. | 51 // Presents the disconnect window to the local user. |
51 scoped_ptr<HostWindow> disconnect_window_; | 52 scoped_ptr<HostWindow> disconnect_window_; |
52 | 53 |
53 // Notifies the client session about the local mouse movements. | 54 // Notifies the client session about the local mouse movements. |
54 scoped_ptr<LocalInputMonitor> local_input_monitor_; | 55 scoped_ptr<LocalInputMonitor> local_input_monitor_; |
55 | 56 |
56 // True if gnubby auth is enabled. | 57 // True if gnubby auth is enabled. |
57 bool gnubby_auth_enabled_; | 58 bool gnubby_auth_enabled_ = false; |
58 | 59 |
59 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment); | 60 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment); |
60 }; | 61 }; |
61 | 62 |
62 // Used to create |Me2MeDesktopEnvironment| instances. | 63 // Used to create |Me2MeDesktopEnvironment| instances. |
63 class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { | 64 class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { |
64 public: | 65 public: |
65 Me2MeDesktopEnvironmentFactory( | 66 Me2MeDesktopEnvironmentFactory( |
66 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 67 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 68 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
67 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 69 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
68 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); | 70 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
69 ~Me2MeDesktopEnvironmentFactory() override; | 71 ~Me2MeDesktopEnvironmentFactory() override; |
70 | 72 |
71 // DesktopEnvironmentFactory interface. | 73 // DesktopEnvironmentFactory interface. |
72 scoped_ptr<DesktopEnvironment> Create( | 74 scoped_ptr<DesktopEnvironment> Create( |
73 base::WeakPtr<ClientSessionControl> client_session_control) override; | 75 base::WeakPtr<ClientSessionControl> client_session_control) override; |
74 void SetEnableCurtaining(bool enable) override; | 76 void SetEnableCurtaining(bool enable) override; |
75 void SetEnableGnubbyAuth(bool enable) override; | 77 void SetEnableGnubbyAuth(bool enable) override; |
76 | 78 |
77 protected: | 79 protected: |
78 bool curtain_enabled() const { return curtain_enabled_; } | 80 bool curtain_enabled() const { return curtain_enabled_; } |
79 | 81 |
80 private: | 82 private: |
81 // True if curtain mode is enabled. | 83 // True if curtain mode is enabled. |
82 bool curtain_enabled_; | 84 bool curtain_enabled_ = false; |
83 | 85 |
84 // True if gnubby auth is enabled. | 86 // True if gnubby auth is enabled. |
85 bool gnubby_auth_enabled_; | 87 bool gnubby_auth_enabled_ = false; |
86 | 88 |
87 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory); | 89 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory); |
88 }; | 90 }; |
89 | 91 |
90 } // namespace remoting | 92 } // namespace remoting |
91 | 93 |
92 #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ | 94 #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |