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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10837086: Change PluginInstance so it shuts down the NaCl Plugin when it uses the IPC PPAPI proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/ppapi_plugin_instance.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/ppapi_plugin_instance.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 149708)
+++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy)
@@ -315,6 +315,7 @@
: delegate_(delegate),
module_(module),
instance_interface_(instance_interface),
+ nacl_plugin_instance_interface_(NULL),
dmichael (off chromium) 2012/08/03 02:42:05 nit: I don't usually explicitly initialize scoped_
bbudge 2012/08/03 17:51:20 Done.
pp_instance_(0),
container_(NULL),
full_frame_(false),
@@ -403,6 +404,8 @@
// destructor of the instance object tries to use the instance.
message_channel_->SetPassthroughObject(NULL);
instance_interface_->DidDestroy(pp_instance());
+ if (nacl_plugin_instance_interface_.get())
+ nacl_plugin_instance_interface_->DidDestroy(pp_instance());
if (fullscreen_container_) {
fullscreen_container_->Destroy();
@@ -2135,6 +2138,11 @@
}
bool PluginInstance::ResetAsProxied() {
+ // Remember the existing instance interface, so we can call DidDestroy in
+ // our Delete() method. This will delete the NaCl plugin instance, which
+ // will shut down the NaCl process.
+ nacl_plugin_instance_interface_.reset(instance_interface_.release());
+
base::Callback<const void*(const char*)> get_plugin_interface_func =
base::Bind(&PluginModule::GetPluginInterface, module_.get());
PPP_Instance_Combined* ppp_instance_combined =
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698