| OLD | NEW |
| 1 // -*- c++ -*- | 1 // -*- c++ -*- |
| 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 // The portable representation of an instance and root scriptable object. | 6 // The portable representation of an instance and root scriptable object. |
| 7 // The PPAPI version of the plugin instantiates a subclass of this class. | 7 // The PPAPI version of the plugin instantiates a subclass of this class. |
| 8 | 8 |
| 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
| 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 292 |
| 293 // Load a nacl module from the file specified in wrapper. | 293 // Load a nacl module from the file specified in wrapper. |
| 294 // Only to be used from a background (non-main) thread. | 294 // Only to be used from a background (non-main) thread. |
| 295 // This will fully initialize the |subprocess| if the load was successful. | 295 // This will fully initialize the |subprocess| if the load was successful. |
| 296 bool LoadNaClModuleFromBackgroundThread(nacl::DescWrapper* wrapper, | 296 bool LoadNaClModuleFromBackgroundThread(nacl::DescWrapper* wrapper, |
| 297 NaClSubprocess* subprocess, | 297 NaClSubprocess* subprocess, |
| 298 const Manifest* manifest, | 298 const Manifest* manifest, |
| 299 const SelLdrStartParams& params); | 299 const SelLdrStartParams& params); |
| 300 | 300 |
| 301 // Start sel_ldr from the main thread, given the start params. | 301 // Start sel_ldr from the main thread, given the start params. |
| 302 // Sets |success| to true on success. | |
| 303 // |pp_error| is set by CallOnMainThread (should be PP_OK). | 302 // |pp_error| is set by CallOnMainThread (should be PP_OK). |
| 304 void StartSelLdrOnMainThread(int32_t pp_error, | 303 void StartSelLdrOnMainThread(int32_t pp_error, |
| 305 ServiceRuntime* service_runtime, | 304 ServiceRuntime* service_runtime, |
| 306 const SelLdrStartParams& params, | 305 const SelLdrStartParams& params, |
| 307 bool* success); | 306 pp::CompletionCallback callback); |
| 307 |
| 308 // Signals that StartSelLdr has finished. |
| 309 void SignalStartSelLdrDone(int32_t pp_error, |
| 310 bool* started, |
| 311 ServiceRuntime* service_runtime); |
| 312 |
| 313 void LoadNexeAndStart(int32_t pp_error, |
| 314 nacl::DescWrapper* wrapper, |
| 315 ServiceRuntime* service_runtime, |
| 316 const pp::CompletionCallback& crash_cb); |
| 308 | 317 |
| 309 // Callback used when getting the URL for the .nexe file. If the URL loading | 318 // Callback used when getting the URL for the .nexe file. If the URL loading |
| 310 // is successful, the file descriptor is opened and can be passed to sel_ldr | 319 // is successful, the file descriptor is opened and can be passed to sel_ldr |
| 311 // with the sandbox on. | 320 // with the sandbox on. |
| 312 void NexeFileDidOpen(int32_t pp_error); | 321 void NexeFileDidOpen(int32_t pp_error); |
| 313 void NexeFileDidOpenContinuation(int32_t pp_error); | 322 void NexeFileDidOpenContinuation(int32_t pp_error); |
| 314 | 323 |
| 315 // Callback used when the reverse channel closes. This is an | 324 // Callback used when the reverse channel closes. This is an |
| 316 // asynchronous event that might turn into a JavaScript error or | 325 // asynchronous event that might turn into a JavaScript error or |
| 317 // crash event -- this is controlled by the two state variables | 326 // crash event -- this is controlled by the two state variables |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 int64_t time_of_last_progress_event_; | 480 int64_t time_of_last_progress_event_; |
| 472 int exit_status_; | 481 int exit_status_; |
| 473 | 482 |
| 474 const PPB_NaCl_Private* nacl_interface_; | 483 const PPB_NaCl_Private* nacl_interface_; |
| 475 pp::UMAPrivate uma_interface_; | 484 pp::UMAPrivate uma_interface_; |
| 476 }; | 485 }; |
| 477 | 486 |
| 478 } // namespace plugin | 487 } // namespace plugin |
| 479 | 488 |
| 480 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 489 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
| OLD | NEW |