| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/files/scoped_file.h" | 9 #include "base/files/scoped_file.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 #endif | 100 #endif |
| 101 base::Process process); | 101 base::Process process); |
| 102 | 102 |
| 103 // Notifies the client about the result of the operation. | 103 // Notifies the client about the result of the operation. |
| 104 void Notify(bool zygote, | 104 void Notify(bool zygote, |
| 105 #if defined(OS_ANDROID) | 105 #if defined(OS_ANDROID) |
| 106 base::ScopedFD ipcfd, | 106 base::ScopedFD ipcfd, |
| 107 #endif | 107 #endif |
| 108 base::Process process); | 108 base::Process process); |
| 109 | 109 |
| 110 #if defined(MOJO_SHELL_CLIENT) |
| 111 // When this process is run from an external Mojo shell, this function will |
| 112 // create a channel and pass one end to the spawned process and register the |
| 113 // other end with the external shell, allowing the spawned process to bind an |
| 114 // Application request from the shell. |
| 115 void CreateMojoShellChannel(base::CommandLine* command_line, |
| 116 int child_process_id); |
| 117 #endif |
| 118 |
| 110 Client* client_; | 119 Client* client_; |
| 111 BrowserThread::ID client_thread_id_; | 120 BrowserThread::ID client_thread_id_; |
| 112 base::Process process_; | 121 base::Process process_; |
| 113 base::TerminationStatus termination_status_; | 122 base::TerminationStatus termination_status_; |
| 114 int exit_code_; | 123 int exit_code_; |
| 115 bool zygote_; | 124 bool zygote_; |
| 116 bool starting_; | 125 bool starting_; |
| 117 // Controls whether the child process should be terminated on browser | 126 // Controls whether the child process should be terminated on browser |
| 118 // shutdown. Default behavior is to terminate the child. | 127 // shutdown. Default behavior is to terminate the child. |
| 119 const bool terminate_child_on_shutdown_; | 128 const bool terminate_child_on_shutdown_; |
| 120 | 129 |
| 121 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_; | 130 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_; |
| 122 | 131 |
| 123 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 132 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
| 124 }; | 133 }; |
| 125 | 134 |
| 126 } // namespace content | 135 } // namespace content |
| 127 | 136 |
| 128 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 137 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
| OLD | NEW |