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_WTS_CONSOLE_SESSION_PROCESS_DRIVER_H_ | 5 #ifndef REMOTING_HOST_WIN_WTS_CONSOLE_SESSION_PROCESS_DRIVER_H_ |
6 #define REMOTING_HOST_WIN_WTS_CONSOLE_SESSION_PROCESS_DRIVER_H_ | 6 #define REMOTING_HOST_WIN_WTS_CONSOLE_SESSION_PROCESS_DRIVER_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "remoting/base/stoppable.h" | 12 #include "remoting/base/stoppable.h" |
13 #include "remoting/host/win/wts_console_observer.h" | 13 #include "remoting/host/win/wts_console_observer.h" |
14 #include "remoting/host/worker_process_ipc_delegate.h" | 14 #include "remoting/host/worker_process_ipc_delegate.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class SingleThreadTaskRunner; | 17 class SingleThreadTaskRunner; |
18 } // namespace base | 18 } // namespace base |
19 | 19 |
20 namespace remoting { | 20 namespace remoting { |
21 | 21 |
| 22 class SasInjector; |
22 class WorkerProcessLauncher; | 23 class WorkerProcessLauncher; |
23 class WtsConsoleMonitor; | 24 class WtsConsoleMonitor; |
24 | 25 |
25 // Launches the host in the session attached to the console. When a new session | 26 // Launches the host in the session attached to the console. When a new session |
26 // attaches to the console relaunches the host in it. | 27 // attaches to the console relaunches the host in it. |
27 class WtsConsoleSessionProcessDriver | 28 class WtsConsoleSessionProcessDriver |
28 : public Stoppable, | 29 : public Stoppable, |
29 public WorkerProcessIpcDelegate, | 30 public WorkerProcessIpcDelegate, |
30 public WtsConsoleObserver { | 31 public WtsConsoleObserver { |
31 public: | 32 public: |
(...skipping 16 matching lines...) Expand all Loading... |
48 virtual void OnPermanentError() OVERRIDE; | 49 virtual void OnPermanentError() OVERRIDE; |
49 | 50 |
50 // WtsConsoleObserver implementation. | 51 // WtsConsoleObserver implementation. |
51 virtual void OnSessionAttached(uint32 session_id) OVERRIDE; | 52 virtual void OnSessionAttached(uint32 session_id) OVERRIDE; |
52 virtual void OnSessionDetached() OVERRIDE; | 53 virtual void OnSessionDetached() OVERRIDE; |
53 | 54 |
54 protected: | 55 protected: |
55 // Stoppable implementation. | 56 // Stoppable implementation. |
56 virtual void DoStop() OVERRIDE; | 57 virtual void DoStop() OVERRIDE; |
57 | 58 |
| 59 // Sends Secure Attention Sequence to the console session. |
| 60 void OnSendSasToConsole(); |
| 61 |
58 private: | 62 private: |
59 // Task runner on which public methods of this class must be called. | 63 // Task runner on which public methods of this class must be called. |
60 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; | 64 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; |
61 | 65 |
62 // Message loop used by the IPC channel. | 66 // Message loop used by the IPC channel. |
63 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 67 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
64 | 68 |
65 // Launches and monitors the worker process. | 69 // Launches and monitors the worker process. |
66 scoped_ptr<WorkerProcessLauncher> launcher_; | 70 scoped_ptr<WorkerProcessLauncher> launcher_; |
67 | 71 |
68 // Used to unsubscribe from session attach and detach events. | 72 // Used to unsubscribe from session attach and detach events. |
69 WtsConsoleMonitor* monitor_; | 73 WtsConsoleMonitor* monitor_; |
70 | 74 |
| 75 scoped_ptr<SasInjector> sas_injector_; |
| 76 |
71 DISALLOW_COPY_AND_ASSIGN(WtsConsoleSessionProcessDriver); | 77 DISALLOW_COPY_AND_ASSIGN(WtsConsoleSessionProcessDriver); |
72 }; | 78 }; |
73 | 79 |
74 } // namespace remoting | 80 } // namespace remoting |
75 | 81 |
76 #endif // REMOTING_HOST_WIN_WTS_CONSOLE_SESSION_PROCESS_DRIVER_H_ | 82 #endif // REMOTING_HOST_WIN_WTS_CONSOLE_SESSION_PROCESS_DRIVER_H_ |
OLD | NEW |