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

Unified Diff: components/nacl/renderer/plugin/plugin.h

Issue 1128943003: Move PNaCl process startup back to the main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused field Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/nacl/renderer/plugin/plugin.cc » ('j') | components/nacl/renderer/plugin/plugin.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/plugin/plugin.h
diff --git a/components/nacl/renderer/plugin/plugin.h b/components/nacl/renderer/plugin/plugin.h
index 7e9a323d086f44e730dcc5811c2b73f293afc1ce..a8274cb9976b402e667d6491f5659adc09abe60f 100644
--- a/components/nacl/renderer/plugin/plugin.h
+++ b/components/nacl/renderer/plugin/plugin.h
@@ -86,12 +86,13 @@ class Plugin : public pp::Instance {
// Load support.
// A helper SRPC NaCl module can be loaded given a PP_NaClFileInfo.
- // Blocks until the helper module signals initialization is done.
// Does not update nacl_module_origin().
- // Returns NULL or the NaClSubprocess of the new helper NaCl module.
- NaClSubprocess* LoadHelperNaClModule(const std::string& helper_url,
- PP_NaClFileInfo file_info,
- ErrorInfo* error_info);
+ // Uses the given NaClSubprocess to contain the new SelLdr process.
+ // The given callback is called when the loading is complete.
+ void LoadHelperNaClModule(const std::string& helper_url,
+ PP_NaClFileInfo file_info,
+ NaClSubprocess* subprocess_to_init,
+ pp::CompletionCallback callback);
// Report an error that was encountered while loading a module.
void ReportLoadError(const ErrorInfo& error_info);
@@ -110,29 +111,19 @@ class Plugin : public pp::Instance {
// in this order, for the main nacl subprocess.
void ShutDownSubprocesses();
- // Loads and starts a helper (e.g. llc, ld) NaCl module.
- // Only to be used from a background (non-main) thread for the PNaCl
- // translator. This will fully initialize the |subprocess| if the load was
- // successful.
- bool LoadHelperNaClModuleInternal(NaClSubprocess* subprocess,
- const SelLdrStartParams& params);
-
- // Start sel_ldr from the main thread, given the start params.
- // |pp_error| is set by CallOnMainThread (should be PP_OK).
- void StartSelLdrOnMainThread(int32_t pp_error,
- ServiceRuntime* service_runtime,
- const SelLdrStartParams& params,
- pp::CompletionCallback callback);
-
- // Signals that StartSelLdr has finished.
- // This is invoked on the main thread.
- void SignalStartSelLdrDone(int32_t pp_error,
- bool* started,
- ServiceRuntime* service_runtime);
+ // Start sel_ldr given the start params. This is invoked on the main thread.
+ void StartSelLdr(ServiceRuntime* service_runtime,
+ const SelLdrStartParams& params,
+ pp::CompletionCallback callback);
// This is invoked on the main thread.
void StartNexe(int32_t pp_error, ServiceRuntime* service_runtime);
+ // Continuation for LoadHelperNaClModule. This is invoked on the main thread.
+ void StartHelperNexe(int32_t pp_error,
+ NaClSubprocess* subprocess_to_init,
+ pp::CompletionCallback callback);
+
// Callback used when getting the URL for the .nexe file. If the URL loading
// is successful, the file descriptor is opened and can be passed to sel_ldr
// with the sandbox on.
« no previous file with comments | « no previous file | components/nacl/renderer/plugin/plugin.cc » ('j') | components/nacl/renderer/plugin/plugin.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698