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 CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 5 #ifndef CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
6 #define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 6 #define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
7 | 7 |
8 #include "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 int error_code); | 135 int error_code); |
136 | 136 |
137 // Notifies the client about the result of the operation. | 137 // Notifies the client about the result of the operation. |
138 void Notify(ZygoteHandle zygote, | 138 void Notify(ZygoteHandle zygote, |
139 #if defined(OS_ANDROID) | 139 #if defined(OS_ANDROID) |
140 base::ScopedFD ipcfd, | 140 base::ScopedFD ipcfd, |
141 #endif | 141 #endif |
142 base::Process process, | 142 base::Process process, |
143 int error_code); | 143 int error_code); |
144 | 144 |
145 #if defined(MOJO_SHELL_CLIENT) | |
146 // When this process is run from an external Mojo shell, this function will | |
147 // create a channel and pass one end to the spawned process and register the | |
148 // other end with the external shell, allowing the spawned process to bind an | |
149 // Application request from the shell. | |
150 void CreateMojoShellChannel(base::CommandLine* command_line, | |
151 int child_process_id); | |
152 #endif | |
153 | |
154 Client* client_; | 145 Client* client_; |
155 BrowserThread::ID client_thread_id_; | 146 BrowserThread::ID client_thread_id_; |
156 base::Process process_; | 147 base::Process process_; |
157 base::TerminationStatus termination_status_; | 148 base::TerminationStatus termination_status_; |
158 int exit_code_; | 149 int exit_code_; |
159 ZygoteHandle zygote_; | 150 ZygoteHandle zygote_; |
160 bool starting_; | 151 bool starting_; |
161 const mojo::edk::ProcessErrorCallback process_error_callback_; | 152 const mojo::edk::ProcessErrorCallback process_error_callback_; |
162 | 153 |
163 // Controls whether the child process should be terminated on browser | 154 // Controls whether the child process should be terminated on browser |
164 // shutdown. Default behavior is to terminate the child. | 155 // shutdown. Default behavior is to terminate the child. |
165 const bool terminate_child_on_shutdown_; | 156 const bool terminate_child_on_shutdown_; |
166 | 157 |
167 // Host side platform handle to establish Mojo IPC. | 158 // Host side platform handle to establish Mojo IPC. |
168 mojo::edk::ScopedPlatformHandle mojo_host_platform_handle_; | 159 mojo::edk::ScopedPlatformHandle mojo_host_platform_handle_; |
169 const std::string mojo_child_token_; | 160 const std::string mojo_child_token_; |
170 | 161 |
171 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_; | 162 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_; |
172 | 163 |
173 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 164 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
174 }; | 165 }; |
175 | 166 |
176 } // namespace content | 167 } // namespace content |
177 | 168 |
178 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 169 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
OLD | NEW |