| 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_WORKER_PROCESS_LAUNCHER_H_ | 5 #ifndef REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_ |
| 6 #define REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_ | 6 #define REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 // Keeps the exit code of the worker process after it was closed. The exit | 133 // Keeps the exit code of the worker process after it was closed. The exit |
| 134 // code is used to determine whether the process has to be restarted. | 134 // code is used to determine whether the process has to be restarted. |
| 135 DWORD exit_code_; | 135 DWORD exit_code_; |
| 136 | 136 |
| 137 // True if IPC messages should be passed to |ipc_handler_|. | 137 // True if IPC messages should be passed to |ipc_handler_|. |
| 138 bool ipc_enabled_; | 138 bool ipc_enabled_; |
| 139 | 139 |
| 140 // The timer used to delay termination of the worker process when an IPC error | 140 // The timer used to delay termination of the worker process when an IPC error |
| 141 // occured or when Crash() request is pending | 141 // occured or when Crash() request is pending |
| 142 base::OneShotTimer<WorkerProcessLauncher> kill_process_timer_; | 142 base::OneShotTimer kill_process_timer_; |
| 143 | 143 |
| 144 // The default timeout for |kill_process_timer_|. | 144 // The default timeout for |kill_process_timer_|. |
| 145 base::TimeDelta kill_process_timeout_; | 145 base::TimeDelta kill_process_timeout_; |
| 146 | 146 |
| 147 // State used to backoff worker launch attempts on failure. | 147 // State used to backoff worker launch attempts on failure. |
| 148 net::BackoffEntry launch_backoff_; | 148 net::BackoffEntry launch_backoff_; |
| 149 | 149 |
| 150 // Timer used to schedule the next attempt to launch the process. | 150 // Timer used to schedule the next attempt to launch the process. |
| 151 base::OneShotTimer<WorkerProcessLauncher> launch_timer_; | 151 base::OneShotTimer launch_timer_; |
| 152 | 152 |
| 153 // Monitors |worker_process_| to detect when the launched process | 153 // Monitors |worker_process_| to detect when the launched process |
| 154 // terminates. | 154 // terminates. |
| 155 base::win::ObjectWatcher process_watcher_; | 155 base::win::ObjectWatcher process_watcher_; |
| 156 | 156 |
| 157 // Timer used to detect whether a launch attempt was successful or not, and to | 157 // Timer used to detect whether a launch attempt was successful or not, and to |
| 158 // cancel the launch attempt if it is taking too long. | 158 // cancel the launch attempt if it is taking too long. |
| 159 base::OneShotTimer<WorkerProcessLauncher> launch_result_timer_; | 159 base::OneShotTimer launch_result_timer_; |
| 160 | 160 |
| 161 // The handle of the worker process, if launched. | 161 // The handle of the worker process, if launched. |
| 162 base::win::ScopedHandle worker_process_; | 162 base::win::ScopedHandle worker_process_; |
| 163 | 163 |
| 164 DISALLOW_COPY_AND_ASSIGN(WorkerProcessLauncher); | 164 DISALLOW_COPY_AND_ASSIGN(WorkerProcessLauncher); |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 } // namespace remoting | 167 } // namespace remoting |
| 168 | 168 |
| 169 #endif // REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_ | 169 #endif // REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_ |
| OLD | NEW |