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 static void SetRegisteredFilesForService( |
| 130 const std::string& service_name, |
| 131 std::unique_ptr<catalog::RequiredFileMap> required_files); |
| 132 |
129 private: | 133 private: |
130 friend class internal::ChildProcessLauncherHelper; | 134 friend class internal::ChildProcessLauncherHelper; |
131 | 135 |
132 void UpdateTerminationStatus(bool known_dead); | 136 void UpdateTerminationStatus(bool known_dead); |
133 | 137 |
134 // Notifies the client about the result of the operation. | 138 // Notifies the client about the result of the operation. |
135 void Notify(internal::ChildProcessLauncherHelper::Process process, | 139 void Notify(internal::ChildProcessLauncherHelper::Process process, |
136 mojo::edk::ScopedPlatformHandle server_handle, | 140 mojo::edk::ScopedPlatformHandle server_handle, |
137 int error_code); | 141 int error_code); |
138 | 142 |
(...skipping 18 matching lines...) Expand all Loading... |
157 scoped_refptr<internal::ChildProcessLauncherHelper> helper_; | 161 scoped_refptr<internal::ChildProcessLauncherHelper> helper_; |
158 | 162 |
159 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_; | 163 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_; |
160 | 164 |
161 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 165 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
162 }; | 166 }; |
163 | 167 |
164 } // namespace content | 168 } // namespace content |
165 | 169 |
166 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 170 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
OLD | NEW |