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

Unified Diff: webkit/plugins/ppapi/plugin_module.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
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/plugin_module.cc
===================================================================
--- webkit/plugins/ppapi/plugin_module.cc (revision 143480)
+++ webkit/plugins/ppapi/plugin_module.cc (working copy)
@@ -419,7 +419,8 @@
library_(NULL),
name_(name),
path_(path),
- reserve_instance_id_(NULL) {
+ reserve_instance_id_(NULL),
+ nacl_ipc_proxy_(false) {
// Ensure the globals object is created.
if (!host_globals)
host_globals = new HostGlobals;
@@ -496,9 +497,13 @@
}
void PluginModule::InitAsProxiedNaCl(
- PluginDelegate::OutOfProcessProxy* out_of_process_proxy,
+ scoped_ptr<PluginDelegate::OutOfProcessProxy> out_of_process_proxy,
PP_Instance instance) {
- InitAsProxied(out_of_process_proxy);
+ // TODO(bbudge) We need to switch the mode of the PluginModule on a
+ // per-instance basis. Fix this so out_of_process_proxy and other
+ // state is stored in a map, indexed by instance.
+ nacl_ipc_proxy_ = true;
+ InitAsProxied(out_of_process_proxy.release());
// InitAsProxied (for the trusted/out-of-process case) initializes only the
// module, and one or more instances are added later. In this case, the
// PluginInstance was already created as in-process, so we missed the proxy
@@ -560,6 +565,11 @@
if (out_of_process_proxy_.get())
out_of_process_proxy_->RemoveInstance(instance->pp_instance());
instances_.erase(instance);
+
+ if (nacl_ipc_proxy_) {
+ out_of_process_proxy_.reset();
+ reserve_instance_id_ = NULL;
+ }
}
scoped_refptr< ::ppapi::CallbackTracker> PluginModule::GetCallbackTracker() {
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698