| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Upon completion |callback| is invoked with status code. | 196 // Upon completion |callback| is invoked with status code. |
| 197 // This function must be called on the main thread. |
| 197 void LoadNexeAndStart(PP_NaClFileInfo file_info, | 198 void LoadNexeAndStart(PP_NaClFileInfo file_info, |
| 198 const pp::CompletionCallback& callback); | 199 const pp::CompletionCallback& callback); |
| 199 | 200 |
| 200 // Starts the application channel to the nexe. | 201 // Starts the application channel to the nexe. |
| 201 SrpcClient* SetupAppChannel(); | 202 SrpcClient* SetupAppChannel(); |
| 202 | 203 |
| 203 bool Log(int severity, const nacl::string& msg); | 204 bool Log(int severity, const nacl::string& msg); |
| 204 Plugin* plugin() const { return plugin_; } | 205 Plugin* plugin() const { return plugin_; } |
| 205 void Shutdown(); | 206 void Shutdown(); |
| 206 | 207 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // Mutex and CondVar to protect start_sel_ldr_done_ and nexe_started_. | 244 // Mutex and CondVar to protect start_sel_ldr_done_ and nexe_started_. |
| 244 NaClMutex mu_; | 245 NaClMutex mu_; |
| 245 NaClCondVar cond_; | 246 NaClCondVar cond_; |
| 246 bool start_sel_ldr_done_; | 247 bool start_sel_ldr_done_; |
| 247 bool nexe_started_; | 248 bool nexe_started_; |
| 248 }; | 249 }; |
| 249 | 250 |
| 250 } // namespace plugin | 251 } // namespace plugin |
| 251 | 252 |
| 252 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 253 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
| OLD | NEW |