| OLD | NEW |
| 1 /* -*- c++ -*- */ | 1 /* -*- c++ -*- */ |
| 2 /* | 2 /* |
| 3 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 // A class containing information regarding a socket connection to a | 8 // A class containing information regarding a socket connection to a |
| 9 // service runtime instance. | 9 // service runtime instance. |
| 10 | 10 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // If starting the nexe from a background thread, wait for the nexe to | 186 // If starting the nexe from a background thread, wait for the nexe to |
| 187 // actually start. | 187 // actually start. |
| 188 void WaitForNexeStart(); | 188 void WaitForNexeStart(); |
| 189 | 189 |
| 190 // Signal to waiting threads that LoadNexeAndStart is complete (either | 190 // Signal to waiting threads that LoadNexeAndStart is complete (either |
| 191 // successfully or unsuccessfully). | 191 // successfully or unsuccessfully). |
| 192 void SignalNexeStarted(); | 192 void SignalNexeStarted(); |
| 193 | 193 |
| 194 // Establish an SrpcClient to the sel_ldr instance and load the nexe. | 194 // Establish an SrpcClient to the sel_ldr instance and load the nexe. |
| 195 // The nexe to be started is passed through |file_info|. | 195 // The nexe to be started is passed through |file_info|. |
| 196 // This function must be called on the main thread. |
| 196 void LoadNexeAndStart(PP_NaClFileInfo file_info, | 197 void LoadNexeAndStart(PP_NaClFileInfo file_info, |
| 197 const pp::CompletionCallback& started_cb, | 198 const pp::CompletionCallback& callback); |
| 198 const pp::CompletionCallback& crash_cb); | |
| 199 | 199 |
| 200 // Starts the application channel to the nexe. | 200 // Starts the application channel to the nexe. |
| 201 SrpcClient* SetupAppChannel(); | 201 SrpcClient* SetupAppChannel(); |
| 202 | 202 |
| 203 bool Log(int severity, const nacl::string& msg); | 203 bool Log(int severity, const nacl::string& msg); |
| 204 Plugin* plugin() const { return plugin_; } | 204 Plugin* plugin() const { return plugin_; } |
| 205 void Shutdown(); | 205 void Shutdown(); |
| 206 | 206 |
| 207 // exit_status is -1 when invalid; when we set it, we will ensure | 207 // exit_status is -1 when invalid; when we set it, we will ensure |
| 208 // that it is non-negative (the portion of the exit status from the | 208 // that it is non-negative (the portion of the exit status from the |
| (...skipping 27 matching lines...) Expand all Loading... |
| 236 // Mutex and CondVar to protect start_sel_ldr_done_ and nexe_started_. | 236 // Mutex and CondVar to protect start_sel_ldr_done_ and nexe_started_. |
| 237 NaClMutex mu_; | 237 NaClMutex mu_; |
| 238 NaClCondVar cond_; | 238 NaClCondVar cond_; |
| 239 bool start_sel_ldr_done_; | 239 bool start_sel_ldr_done_; |
| 240 bool nexe_started_; | 240 bool nexe_started_; |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 } // namespace plugin | 243 } // namespace plugin |
| 244 | 244 |
| 245 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 245 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
| OLD | NEW |