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_WIN_SESSION_DESKTOP_ENVIRONMENT_H_ | 5 #ifndef REMOTING_HOST_WIN_SESSION_DESKTOP_ENVIRONMENT_H_ |
6 #define REMOTING_HOST_WIN_SESSION_DESKTOP_ENVIRONMENT_H_ | 6 #define REMOTING_HOST_WIN_SESSION_DESKTOP_ENVIRONMENT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 std::unique_ptr<InputInjector> CreateInputInjector() override; | 23 std::unique_ptr<InputInjector> CreateInputInjector() override; |
24 | 24 |
25 private: | 25 private: |
26 friend class SessionDesktopEnvironmentFactory; | 26 friend class SessionDesktopEnvironmentFactory; |
27 SessionDesktopEnvironment( | 27 SessionDesktopEnvironment( |
28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
29 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, | 29 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
30 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 30 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
31 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 31 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
32 const base::Closure& inject_sas, | 32 const base::Closure& inject_sas, |
| 33 const base::Closure& lock_workstation, |
33 bool supports_touch_events); | 34 bool supports_touch_events); |
34 | 35 |
35 // Used to ask the daemon to inject Secure Attention Sequence. | 36 // Used to ask the daemon to inject Secure Attention Sequence. |
36 base::Closure inject_sas_; | 37 base::Closure inject_sas_; |
37 | 38 |
| 39 // Used to lock the workstation for the current session. |
| 40 base::Closure lock_workstation_; |
| 41 |
38 DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironment); | 42 DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironment); |
39 }; | 43 }; |
40 | 44 |
41 // Used to create |SessionDesktopEnvironment| instances. | 45 // Used to create |SessionDesktopEnvironment| instances. |
42 class SessionDesktopEnvironmentFactory : public Me2MeDesktopEnvironmentFactory { | 46 class SessionDesktopEnvironmentFactory : public Me2MeDesktopEnvironmentFactory { |
43 public: | 47 public: |
44 SessionDesktopEnvironmentFactory( | 48 SessionDesktopEnvironmentFactory( |
45 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 49 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
46 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, | 50 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
47 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 51 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
48 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 52 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
49 const base::Closure& inject_sas); | 53 const base::Closure& inject_sas, |
| 54 const base::Closure& lock_workstation); |
50 ~SessionDesktopEnvironmentFactory() override; | 55 ~SessionDesktopEnvironmentFactory() override; |
51 | 56 |
52 // DesktopEnvironmentFactory implementation. | 57 // DesktopEnvironmentFactory implementation. |
53 std::unique_ptr<DesktopEnvironment> Create( | 58 std::unique_ptr<DesktopEnvironment> Create( |
54 base::WeakPtr<ClientSessionControl> client_session_control) override; | 59 base::WeakPtr<ClientSessionControl> client_session_control) override; |
55 | 60 |
56 private: | 61 private: |
57 // Used to ask the daemon to inject Secure Attention Sequence. | 62 // Used to ask the daemon to inject Secure Attention Sequence. |
58 base::Closure inject_sas_; | 63 base::Closure inject_sas_; |
59 | 64 |
| 65 // Used to lock the workstation for the current session. |
| 66 base::Closure lock_workstation_; |
| 67 |
60 DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironmentFactory); | 68 DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironmentFactory); |
61 }; | 69 }; |
62 | 70 |
63 } // namespace remoting | 71 } // namespace remoting |
64 | 72 |
65 #endif // REMOTING_HOST_WIN_SESSION_DESKTOP_ENVIRONMENT_H_ | 73 #endif // REMOTING_HOST_WIN_SESSION_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |