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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 int* launch_result); | 115 int* launch_result); |
116 | 116 |
117 // Called right after the process has been launched, whether it was created | 117 // Called right after the process has been launched, whether it was created |
118 // yet or not. | 118 // yet or not. |
119 // Platform specific. | 119 // Platform specific. |
120 void AfterLaunchOnLauncherThread( | 120 void AfterLaunchOnLauncherThread( |
121 const ChildProcessLauncherHelper::Process& process, | 121 const ChildProcessLauncherHelper::Process& process, |
122 const base::LaunchOptions& options); | 122 const base::LaunchOptions& options); |
123 | 123 |
124 // Called once the process has been created, successfully or not. | 124 // Called once the process has been created, successfully or not. |
| 125 // If |post_launch_on_client_thread_called| is false, |
| 126 // this calls PostLaunchOnClientThread on the client thread. |
125 void PostLaunchOnLauncherThread(ChildProcessLauncherHelper::Process process, | 127 void PostLaunchOnLauncherThread(ChildProcessLauncherHelper::Process process, |
126 int launch_result); | 128 int launch_result, |
| 129 bool post_launch_on_client_thread_called); |
127 | 130 |
128 // Posted by PostLaunchOnLauncherThread onto the client thread. | 131 // Note that this could be called before PostLaunchOnLauncherThread() is |
| 132 // called. |
129 void PostLaunchOnClientThread(ChildProcessLauncherHelper::Process process, | 133 void PostLaunchOnClientThread(ChildProcessLauncherHelper::Process process, |
130 int error_code); | 134 int error_code); |
131 | 135 |
132 int client_thread_id() const { return client_thread_id_; } | 136 int client_thread_id() const { return client_thread_id_; } |
133 | 137 |
134 // Returns the termination status and sets |exit_code| if non null. | 138 // Returns the termination status and sets |exit_code| if non null. |
135 // See ChildProcessLauncher::GetChildTerminationStatus for more info. | 139 // See ChildProcessLauncher::GetChildTerminationStatus for more info. |
136 base::TerminationStatus GetTerminationStatus( | 140 base::TerminationStatus GetTerminationStatus( |
137 const ChildProcessLauncherHelper::Process& process, | 141 const ChildProcessLauncherHelper::Process& process, |
138 bool known_dead, | 142 bool known_dead, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 #if defined(OS_ANDROID) | 204 #if defined(OS_ANDROID) |
201 base::android::ScopedJavaGlobalRef<jobject> java_peer_; | 205 base::android::ScopedJavaGlobalRef<jobject> java_peer_; |
202 #endif | 206 #endif |
203 }; | 207 }; |
204 | 208 |
205 } // namespace internal | 209 } // namespace internal |
206 | 210 |
207 } // namespace content | 211 } // namespace content |
208 | 212 |
209 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ | 213 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_HELPER_H_ |
OLD | NEW |