| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 const Manifest* manifest, | 225 const Manifest* manifest, |
| 226 bool should_report_uma, | 226 bool should_report_uma, |
| 227 pp::CompletionCallback init_done_cb, | 227 pp::CompletionCallback init_done_cb, |
| 228 pp::CompletionCallback crash_cb); | 228 pp::CompletionCallback crash_cb); |
| 229 // The destructor terminates the sel_ldr process. | 229 // The destructor terminates the sel_ldr process. |
| 230 ~ServiceRuntime(); | 230 ~ServiceRuntime(); |
| 231 | 231 |
| 232 // Spawn the sel_ldr instance. On success, returns true. | 232 // Spawn the sel_ldr instance. On success, returns true. |
| 233 // On failure, returns false and |error_string| is set to something | 233 // On failure, returns false and |error_string| is set to something |
| 234 // describing the error. | 234 // describing the error. |
| 235 bool StartSelLdr(const SelLdrStartParams& params); | 235 void StartSelLdr(const SelLdrStartParams& params, |
| 236 PP_CompletionCallback callback); |
| 236 | 237 |
| 237 // If starting sel_ldr from a background thread, wait for sel_ldr to | 238 // If starting sel_ldr from a background thread, wait for sel_ldr to |
| 238 // actually start. | 239 // actually start. |
| 239 void WaitForSelLdrStart(); | 240 void WaitForSelLdrStart(); |
| 240 | 241 |
| 241 // Signal to waiting threads that StartSelLdr is complete. | 242 // Signal to waiting threads that StartSelLdr is complete. |
| 242 // Done externally, in case external users want to write to shared | 243 // Done externally, in case external users want to write to shared |
| 243 // memory that is yet to be fenced. | 244 // memory that is yet to be fenced. |
| 244 void SignalStartSelLdrDone(); | 245 void SignalStartSelLdrDone(); |
| 245 | 246 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 286 |
| 286 PluginReverseInterface* rev_interface_; | 287 PluginReverseInterface* rev_interface_; |
| 287 | 288 |
| 288 // Mutex to protect exit_status_. | 289 // Mutex to protect exit_status_. |
| 289 // Also, in conjunction with cond_ it is used to signal when | 290 // Also, in conjunction with cond_ it is used to signal when |
| 290 // StartSelLdr is complete with either success or error. | 291 // StartSelLdr is complete with either success or error. |
| 291 NaClMutex mu_; | 292 NaClMutex mu_; |
| 292 NaClCondVar cond_; | 293 NaClCondVar cond_; |
| 293 int exit_status_; | 294 int exit_status_; |
| 294 bool start_sel_ldr_done_; | 295 bool start_sel_ldr_done_; |
| 296 |
| 297 PP_Var start_sel_ldr_error_message_; |
| 295 }; | 298 }; |
| 296 | 299 |
| 297 } // namespace plugin | 300 } // namespace plugin |
| 298 | 301 |
| 299 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 302 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
| OLD | NEW |