Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.h

Issue 149403005: Pepper: Make StartSelLdr asynchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CompletionCallback cleanup in service_runtime Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/nacl_entry_points.h ('k') | ppapi/native_client/src/trusted/plugin/plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698