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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // On Android |process| must have been started by ChildProcessLauncher for | 119 // On Android |process| must have been started by ChildProcessLauncher for |
120 // this method to work. | 120 // this method to work. |
121 static bool TerminateProcess(const base::Process& process, | 121 static bool TerminateProcess(const base::Process& process, |
122 int exit_code, | 122 int exit_code, |
123 bool wait); | 123 bool wait); |
124 | 124 |
125 // Replaces the ChildProcessLauncher::Client for testing purposes. Returns the | 125 // Replaces the ChildProcessLauncher::Client for testing purposes. Returns the |
126 // previous client. | 126 // previous client. |
127 Client* ReplaceClientForTest(Client* client); | 127 Client* ReplaceClientForTest(Client* client); |
128 | 128 |
| 129 // Sets the files that should be mapped when a new child process is created |
| 130 // for the service |service_name|. |
| 131 static void SetRegisteredFilesForService( |
| 132 const std::string& service_name, |
| 133 catalog::RequiredFileMap required_files); |
| 134 |
129 private: | 135 private: |
130 friend class internal::ChildProcessLauncherHelper; | 136 friend class internal::ChildProcessLauncherHelper; |
131 | 137 |
132 void UpdateTerminationStatus(bool known_dead); | 138 void UpdateTerminationStatus(bool known_dead); |
133 | 139 |
134 // Notifies the client about the result of the operation. | 140 // Notifies the client about the result of the operation. |
135 void Notify(internal::ChildProcessLauncherHelper::Process process, | 141 void Notify(internal::ChildProcessLauncherHelper::Process process, |
136 mojo::edk::ScopedPlatformHandle server_handle, | 142 mojo::edk::ScopedPlatformHandle server_handle, |
137 int error_code); | 143 int error_code); |
138 | 144 |
(...skipping 17 matching lines...) Expand all Loading... |
156 scoped_refptr<internal::ChildProcessLauncherHelper> helper_; | 162 scoped_refptr<internal::ChildProcessLauncherHelper> helper_; |
157 | 163 |
158 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_; | 164 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_; |
159 | 165 |
160 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 166 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
161 }; | 167 }; |
162 | 168 |
163 } // namespace content | 169 } // namespace content |
164 | 170 |
165 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 171 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
OLD | NEW |