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 "remoting/host/basic_desktop_environment.h" | 8 #include "remoting/host/basic_desktop_environment.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
(...skipping 17 matching lines...) Expand all Loading... |
28 friend class Me2MeDesktopEnvironmentFactory; | 28 friend class Me2MeDesktopEnvironmentFactory; |
29 Me2MeDesktopEnvironment( | 29 Me2MeDesktopEnvironment( |
30 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 30 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
31 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 31 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
32 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); | 32 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
33 | 33 |
34 // Initializes security features of the desktop environment (the curtain mode | 34 // Initializes security features of the desktop environment (the curtain mode |
35 // and in-session UI). | 35 // and in-session UI). |
36 bool InitializeSecurity( | 36 bool InitializeSecurity( |
37 base::WeakPtr<ClientSessionControl> client_session_control, | 37 base::WeakPtr<ClientSessionControl> client_session_control, |
38 const UiStrings& ui_strings, | |
39 bool curtain_enabled); | 38 bool curtain_enabled); |
40 | 39 |
41 private: | 40 private: |
42 // "Curtains" the session making sure it is disconnected from the local | 41 // "Curtains" the session making sure it is disconnected from the local |
43 // console. | 42 // console. |
44 scoped_ptr<CurtainMode> curtain_; | 43 scoped_ptr<CurtainMode> curtain_; |
45 | 44 |
46 // Presents the disconnect window to the local user. | 45 // Presents the disconnect window to the local user. |
47 scoped_ptr<HostWindow> disconnect_window_; | 46 scoped_ptr<HostWindow> disconnect_window_; |
48 | 47 |
49 // Notifies the client session about the local mouse movements. | 48 // Notifies the client session about the local mouse movements. |
50 scoped_ptr<LocalInputMonitor> local_input_monitor_; | 49 scoped_ptr<LocalInputMonitor> local_input_monitor_; |
51 | 50 |
52 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment); | 51 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment); |
53 }; | 52 }; |
54 | 53 |
55 // Used to create |Me2MeDesktopEnvironment| instances. | 54 // Used to create |Me2MeDesktopEnvironment| instances. |
56 class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { | 55 class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { |
57 public: | 56 public: |
58 Me2MeDesktopEnvironmentFactory( | 57 Me2MeDesktopEnvironmentFactory( |
59 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 58 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
60 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 59 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
61 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 60 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
62 const UiStrings& ui_strings); | |
63 virtual ~Me2MeDesktopEnvironmentFactory(); | 61 virtual ~Me2MeDesktopEnvironmentFactory(); |
64 | 62 |
65 // DesktopEnvironmentFactory interface. | 63 // DesktopEnvironmentFactory interface. |
66 virtual scoped_ptr<DesktopEnvironment> Create( | 64 virtual scoped_ptr<DesktopEnvironment> Create( |
67 base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE; | 65 base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE; |
68 virtual void SetEnableCurtaining(bool enable) OVERRIDE; | 66 virtual void SetEnableCurtaining(bool enable) OVERRIDE; |
69 | 67 |
70 protected: | 68 protected: |
71 bool curtain_enabled() const { return curtain_enabled_; } | 69 bool curtain_enabled() const { return curtain_enabled_; } |
72 | 70 |
73 private: | 71 private: |
74 // True if curtain mode is enabled. | 72 // True if curtain mode is enabled. |
75 bool curtain_enabled_; | 73 bool curtain_enabled_; |
76 | 74 |
77 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory); | 75 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory); |
78 }; | 76 }; |
79 | 77 |
80 } // namespace remoting | 78 } // namespace remoting |
81 | 79 |
82 #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ | 80 #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |