Index: src/shared/ppapi_proxy/plugin_globals.cc |
=================================================================== |
--- src/shared/ppapi_proxy/plugin_globals.cc (revision 3312) |
+++ src/shared/ppapi_proxy/plugin_globals.cc (working copy) |
@@ -12,6 +12,7 @@ |
NaClSrpcChannel* main_srpc_channel; |
NaClSrpcChannel* upcall_srpc_channel; |
+PP_Module module_id_for_plugin; |
} // namespace; |
@@ -31,6 +32,19 @@ |
upcall_srpc_channel = channel; |
} |
+void SetModuleIdForSrpcChannel(NaClSrpcChannel* channel, PP_Module module_id) { |
+ module_id_for_plugin = module_id; |
+} |
+ |
+void UnsetModuleIdForSrpcChannel(NaClSrpcChannel* channel) { |
+ // Zero is an invalid module id. |
+ module_id_for_plugin = 0; |
+} |
+ |
+PP_Module LookupModuleIdForSrpcChannel(NaClSrpcChannel* channel) { |
+ return module_id_for_plugin; |
+} |
+ |
const PPB_Core* CoreInterface() { |
return reinterpret_cast<const PPB_Core*>(PluginCore::GetInterface()); |
} |