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

Unified Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 10214007: Add an IPC channel between the NaCl loader process and the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
Index: ppapi/native_client/src/trusted/plugin/plugin.cc
===================================================================
--- ppapi/native_client/src/trusted/plugin/plugin.cc (revision 143037)
+++ ppapi/native_client/src/trusted/plugin/plugin.cc (working copy)
@@ -34,6 +34,7 @@
#include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
#include "native_client/src/trusted/nonnacl_util/sel_ldr_launcher.h"
#include "native_client/src/trusted/plugin/json_manifest.h"
+#include "native_client/src/trusted/plugin/nacl_entry_points.h"
#include "native_client/src/trusted/plugin/nacl_subprocess.h"
#include "native_client/src/trusted/plugin/nexe_arch.h"
#include "native_client/src/trusted/plugin/plugin_error.h"
@@ -609,6 +610,16 @@
if (!service_runtime_started) {
return false;
}
+ if (start_ppapi_proxy && start_ppapi_proxy(pp_instance())) {
+ started_ipc_proxy_ = true;
+ if (init_done_cb.pp_completion_callback().func != NULL) {
Mark Seaborn 2012/06/20 19:24:40 Is there is reason this isn't just CHECK(init_done
bbudge 2012/06/21 00:00:46 Done.
+ PLUGIN_PRINTF(("Plugin::LoadNaClModuleCommon, started ipc proxy.\n"));
+ pp::Module::Get()->core()->CallOnMainThread(0, init_done_cb, PP_OK);
+ } else {
+ PLUGIN_PRINTF(("Plugin::LoadNaClModuleCommon, init_done_cb invalid.\n"));
+ return false;
+ }
+ }
return true;
}
@@ -631,6 +642,9 @@
}
bool Plugin::LoadNaClModuleContinuationIntern(ErrorInfo* error_info) {
+ if (started_ipc_proxy_)
dmichael (off chromium) 2012/06/20 22:34:32 We should probably add a comment here about why we
bbudge 2012/06/21 00:00:46 Done.
+ return true;
+
if (!main_subprocess_.StartSrpcServices()) {
error_info->SetReport(ERROR_SRPC_CONNECTION_FAIL,
"SRPC connection failure for " +
@@ -862,7 +876,8 @@
init_time_(0),
ready_time_(0),
nexe_size_(0),
- time_of_last_progress_event_(0) {
+ time_of_last_progress_event_(0),
+ started_ipc_proxy_(false) {
PLUGIN_PRINTF(("Plugin::Plugin (this=%p, pp_instance=%"
NACL_PRId32")\n", static_cast<void*>(this), pp_instance));
callback_factory_.Initialize(this);

Powered by Google App Engine
This is Rietveld 408576698