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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 ZygoteHandle zygote = nullptr; | 72 ZygoteHandle zygote = nullptr; |
73 #endif | 73 #endif |
74 }; | 74 }; |
75 | 75 |
76 ChildProcessLauncherHelper( | 76 ChildProcessLauncherHelper( |
77 int child_process_id, | 77 int child_process_id, |
78 BrowserThread::ID client_thread_id, | 78 BrowserThread::ID client_thread_id, |
79 std::unique_ptr<base::CommandLine> command_line, | 79 std::unique_ptr<base::CommandLine> command_line, |
80 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate, | 80 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate, |
81 const base::WeakPtr<ChildProcessLauncher>& child_process_launcher, | 81 const base::WeakPtr<ChildProcessLauncher>& child_process_launcher, |
82 bool terminate_on_shutdown); | 82 bool terminate_on_shutdown, |
| 83 int param_id); |
83 | 84 |
84 // The methods below are defined in the order they are called. | 85 // The methods below are defined in the order they are called. |
85 | 86 |
86 // Starts the flow of launching the process. | 87 // Starts the flow of launching the process. |
87 void StartLaunchOnClientThread(); | 88 void StartLaunchOnClientThread(); |
88 | 89 |
89 // Platform specific. | 90 // Platform specific. |
90 void BeforeLaunchOnClientThread(); | 91 void BeforeLaunchOnClientThread(); |
91 | 92 |
92 // Called in to give implementors a chance at creating a server pipe. | 93 // Called in to give implementors a chance at creating a server pipe. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 base::CommandLine* command_line() { return command_line_.get(); } | 186 base::CommandLine* command_line() { return command_line_.get(); } |
186 int child_process_id() const { return child_process_id_; } | 187 int child_process_id() const { return child_process_id_; } |
187 | 188 |
188 std::string GetProcessType(); | 189 std::string GetProcessType(); |
189 | 190 |
190 static void ForceNormalProcessTerminationSync( | 191 static void ForceNormalProcessTerminationSync( |
191 ChildProcessLauncherHelper::Process process); | 192 ChildProcessLauncherHelper::Process process); |
192 | 193 |
193 const int child_process_id_; | 194 const int child_process_id_; |
194 const BrowserThread::ID client_thread_id_; | 195 const BrowserThread::ID client_thread_id_; |
| 196 const int param_id_; |
195 base::TimeTicks begin_launch_time_; | 197 base::TimeTicks begin_launch_time_; |
196 std::unique_ptr<base::CommandLine> command_line_; | 198 std::unique_ptr<base::CommandLine> command_line_; |
197 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate_; | 199 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate_; |
198 base::WeakPtr<ChildProcessLauncher> child_process_launcher_; | 200 base::WeakPtr<ChildProcessLauncher> child_process_launcher_; |
199 mojo::edk::ScopedPlatformHandle mojo_client_handle_; | 201 mojo::edk::ScopedPlatformHandle mojo_client_handle_; |
200 mojo::edk::ScopedPlatformHandle mojo_server_handle_; | 202 mojo::edk::ScopedPlatformHandle mojo_server_handle_; |
201 bool terminate_on_shutdown_; | 203 bool terminate_on_shutdown_; |
202 | 204 |
203 #if defined(OS_ANDROID) | 205 #if defined(OS_ANDROID) |
204 base::android::ScopedJavaGlobalRef<jobject> java_peer_; | 206 base::android::ScopedJavaGlobalRef<jobject> java_peer_; |
205 #endif | 207 #endif |
206 }; | 208 }; |
207 | 209 |
208 } // namespace internal | 210 } // namespace internal |
209 | 211 |
210 } // namespace content | 212 } // namespace content |
211 | 213 |
212 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ | 214 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ |
OLD | NEW |