OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ |
6 #define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ | 6 #define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 ZygoteHandle zygote = nullptr; | 68 ZygoteHandle zygote = nullptr; |
69 #endif | 69 #endif |
70 }; | 70 }; |
71 | 71 |
72 ChildProcessLauncherHelper( | 72 ChildProcessLauncherHelper( |
73 int child_process_id, | 73 int child_process_id, |
74 BrowserThread::ID client_thread_id, | 74 BrowserThread::ID client_thread_id, |
75 std::unique_ptr<base::CommandLine> command_line, | 75 std::unique_ptr<base::CommandLine> command_line, |
76 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate, | 76 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate, |
77 const base::WeakPtr<ChildProcessLauncher>& child_process_launcher, | 77 const base::WeakPtr<ChildProcessLauncher>& child_process_launcher, |
78 bool terminate_on_shutdown); | 78 bool terminate_on_shutdown, |
| 79 int param_id); |
79 | 80 |
80 // The methods below are defined in the order they are called. | 81 // The methods below are defined in the order they are called. |
81 | 82 |
82 // Starts the flow of launching the process. | 83 // Starts the flow of launching the process. |
83 void StartLaunchOnClientThread(); | 84 void StartLaunchOnClientThread(); |
84 | 85 |
85 // Platform specific. | 86 // Platform specific. |
86 void BeforeLaunchOnClientThread(); | 87 void BeforeLaunchOnClientThread(); |
87 | 88 |
88 // Called in to give implementors a chance at creating a server pipe. | 89 // Called in to give implementors a chance at creating a server pipe. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 base::CommandLine* command_line() { return command_line_.get(); } | 174 base::CommandLine* command_line() { return command_line_.get(); } |
174 int child_process_id() const { return child_process_id_; } | 175 int child_process_id() const { return child_process_id_; } |
175 | 176 |
176 std::string GetProcessType(); | 177 std::string GetProcessType(); |
177 | 178 |
178 static void ForceNormalProcessTerminationSync( | 179 static void ForceNormalProcessTerminationSync( |
179 ChildProcessLauncherHelper::Process process); | 180 ChildProcessLauncherHelper::Process process); |
180 | 181 |
181 const int child_process_id_; | 182 const int child_process_id_; |
182 const BrowserThread::ID client_thread_id_; | 183 const BrowserThread::ID client_thread_id_; |
| 184 const int param_id_; |
183 base::TimeTicks begin_launch_time_; | 185 base::TimeTicks begin_launch_time_; |
184 std::unique_ptr<base::CommandLine> command_line_; | 186 std::unique_ptr<base::CommandLine> command_line_; |
185 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate_; | 187 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate_; |
186 base::WeakPtr<ChildProcessLauncher> child_process_launcher_; | 188 base::WeakPtr<ChildProcessLauncher> child_process_launcher_; |
187 mojo::edk::ScopedPlatformHandle mojo_client_handle_; | 189 mojo::edk::ScopedPlatformHandle mojo_client_handle_; |
188 mojo::edk::ScopedPlatformHandle mojo_server_handle_; | 190 mojo::edk::ScopedPlatformHandle mojo_server_handle_; |
189 bool terminate_on_shutdown_; | 191 bool terminate_on_shutdown_; |
190 }; | 192 }; |
191 | 193 |
192 } // namespace internal | 194 } // namespace internal |
193 | 195 |
194 } // namespace content | 196 } // namespace content |
195 | 197 |
196 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ | 198 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ |
OLD | NEW |