| 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_SESSION_PROCESS_LAUNCHER_H_ | 5 #ifndef REMOTING_HOST_WIN_WTS_SESSION_PROCESS_LAUNCHER_H_ |
| 6 #define REMOTING_HOST_WIN_WTS_SESSION_PROCESS_LAUNCHER_H_ | 6 #define REMOTING_HOST_WIN_WTS_SESSION_PROCESS_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class SingleThreadTaskRunner; | 25 class SingleThreadTaskRunner; |
| 26 } // namespace base | 26 } // namespace base |
| 27 | 27 |
| 28 namespace IPC { | 28 namespace IPC { |
| 29 class ChannelProxy; | 29 class ChannelProxy; |
| 30 class Message; | 30 class Message; |
| 31 } // namespace IPC | 31 } // namespace IPC |
| 32 | 32 |
| 33 namespace remoting { | 33 namespace remoting { |
| 34 | 34 |
| 35 class SasInjector; | |
| 36 class WtsConsoleMonitor; | 35 class WtsConsoleMonitor; |
| 37 | 36 |
| 38 class WtsSessionProcessLauncher | 37 class WtsSessionProcessLauncher |
| 39 : public base::MessagePumpForIO::IOHandler, | 38 : public base::MessagePumpForIO::IOHandler, |
| 40 public Stoppable, | 39 public Stoppable, |
| 41 public WorkerProcessLauncher::Delegate, | 40 public WorkerProcessLauncher::Delegate, |
| 42 public WtsConsoleObserver { | 41 public WtsConsoleObserver { |
| 43 public: | 42 public: |
| 44 // Constructs a WtsSessionProcessLauncher object. |stopped_callback| and | 43 // Constructs a WtsSessionProcessLauncher object. |stopped_callback| and |
| 45 // |main_message_loop| are passed to the undelying |Stoppable| implementation. | 44 // |main_message_loop| are passed to the undelying |Stoppable| implementation. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void OnJobNotification(DWORD message, DWORD pid); | 91 void OnJobNotification(DWORD message, DWORD pid); |
| 93 | 92 |
| 94 // Attempts to launch the host process in the current console session. | 93 // Attempts to launch the host process in the current console session. |
| 95 // Schedules next launch attempt if creation of the process fails for any | 94 // Schedules next launch attempt if creation of the process fails for any |
| 96 // reason. | 95 // reason. |
| 97 void LaunchProcess(); | 96 void LaunchProcess(); |
| 98 | 97 |
| 99 // Called when the launcher reports the process to be stopped. | 98 // Called when the launcher reports the process to be stopped. |
| 100 void OnLauncherStopped(); | 99 void OnLauncherStopped(); |
| 101 | 100 |
| 102 // Sends the Secure Attention Sequence to the session represented by | |
| 103 // |session_token_|. | |
| 104 void OnSendSasToConsole(); | |
| 105 | |
| 106 // |true| if this object is currently attached to the console session. | 101 // |true| if this object is currently attached to the console session. |
| 107 bool attached_; | 102 bool attached_; |
| 108 | 103 |
| 109 // Time of the last launch attempt. | 104 // Time of the last launch attempt. |
| 110 base::Time launch_time_; | 105 base::Time launch_time_; |
| 111 | 106 |
| 112 // Current backoff delay. | 107 // Current backoff delay. |
| 113 base::TimeDelta launch_backoff_; | 108 base::TimeDelta launch_backoff_; |
| 114 | 109 |
| 115 // Timer used to schedule the next attempt to launch the process. | 110 // Timer used to schedule the next attempt to launch the process. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 140 kJobStopped | 135 kJobStopped |
| 141 }; | 136 }; |
| 142 | 137 |
| 143 JobState job_state_; | 138 JobState job_state_; |
| 144 | 139 |
| 145 base::win::ScopedHandle worker_process_; | 140 base::win::ScopedHandle worker_process_; |
| 146 | 141 |
| 147 // The token to be used to launch a process in a different session. | 142 // The token to be used to launch a process in a different session. |
| 148 base::win::ScopedHandle session_token_; | 143 base::win::ScopedHandle session_token_; |
| 149 | 144 |
| 150 scoped_ptr<SasInjector> sas_injector_; | |
| 151 | |
| 152 DISALLOW_COPY_AND_ASSIGN(WtsSessionProcessLauncher); | 145 DISALLOW_COPY_AND_ASSIGN(WtsSessionProcessLauncher); |
| 153 }; | 146 }; |
| 154 | 147 |
| 155 } // namespace remoting | 148 } // namespace remoting |
| 156 | 149 |
| 157 #endif // REMOTING_HOST_WIN_WTS_SESSION_PROCESS_LAUNCHER_H_ | 150 #endif // REMOTING_HOST_WIN_WTS_SESSION_PROCESS_LAUNCHER_H_ |
| OLD | NEW |