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

Unified Diff: src/shared/ppapi_proxy/plugin_globals.cc

Issue 7605029: Extend IRT with nacl_irt_resource_open interface (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: remove empty lines Created 9 years, 4 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 | src/shared/ppapi_proxy/ppruntime.h » ('j') | src/untrusted/irt/irt_manifest.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/ppapi_proxy/plugin_globals.cc
===================================================================
--- src/shared/ppapi_proxy/plugin_globals.cc (revision 6384)
+++ src/shared/ppapi_proxy/plugin_globals.cc (working copy)
@@ -155,6 +155,26 @@
thread_funcs = *new_funcs;
}
+int PpapiPluginPreInit() {
+ if (!NaClSrpcModuleInit()) {
+ return 1;
+ }
+ NaClLogModuleInit(); // Enable NaClLog'ing used by CHECK().
+ PpapiPluginRegisterDefaultThreadCreator();
+ // Designate this as the main thread for PPB_Core::IsMainThread().
+ ppapi_proxy::PluginCore::MarkMainThread();
+ return 0;
+}
+
+int PpapiPluginPostInit() {
+ if (!NaClSrpcAcceptClientConnection(PppRpcs::srpc_methods)) {
+ return 1;
+ }
+ NaClSrpcModuleFini();
+
+ return 0;
+}
+
int PpapiPluginMain() {
if (getenv("NACL_LD_ACCEPTS_PLUGIN_CONNECTION") != NULL) {
// Send a message to the page to ask it to reinitialise the
« no previous file with comments | « no previous file | src/shared/ppapi_proxy/ppruntime.h » ('j') | src/untrusted/irt/irt_manifest.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698