From 24a58d4585772b48e4f057a34ac71769e3ed0ff9 Mon Sep 17 00:00:00 2001 From: Josh Aas Date: Wed, 30 May 2012 10:23:03 -0400 Subject: [PATCH] Bug 758363: Implement NPN_ReloadPlugins for out-of-process plugins. r=bsmedberg --- dom/plugins/ipc/PPluginModule.ipdl | 2 ++ dom/plugins/ipc/PluginModuleChild.cpp | 3 ++- dom/plugins/ipc/PluginModuleParent.cpp | 9 +++++++++ dom/plugins/ipc/PluginModuleParent.h | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dom/plugins/ipc/PPluginModule.ipdl b/dom/plugins/ipc/PPluginModule.ipdl index 4e772400847..f6c388ca08e 100644 --- a/dom/plugins/ipc/PPluginModule.ipdl +++ b/dom/plugins/ipc/PPluginModule.ipdl @@ -128,6 +128,8 @@ parent: sync NPN_SetException(nullable PPluginScriptableObject actor, nsCString message); + + async NPN_ReloadPlugins(bool aReloadPages); }; } // namespace plugins diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp index 1bea5ae0bea..0379a385d7c 100644 --- a/dom/plugins/ipc/PluginModuleChild.cpp +++ b/dom/plugins/ipc/PluginModuleChild.cpp @@ -1263,7 +1263,8 @@ _reloadplugins(NPBool aReloadPages) { PLUGIN_LOG_DEBUG_FUNCTION; ENSURE_PLUGIN_THREAD_VOID(); - NS_WARNING("Not yet implemented!"); + + PluginModuleChild::current()->SendNPN_ReloadPlugins(!!aReloadPages); } void NP_CALLBACK diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp index 56faec5adc1..116809f6225 100644 --- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -1153,3 +1153,12 @@ PluginModuleParent::RecvNPN_SetException(PPluginScriptableObjectParent* aActor, mozilla::plugins::parent::_setexception(aNPObj, NullableStringGet(aMessage)); return true; } + +bool +PluginModuleParent::RecvNPN_ReloadPlugins(const bool& aReloadPages) +{ + PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION)); + + mozilla::plugins::parent::_reloadplugins(aReloadPages); + return true; +} diff --git a/dom/plugins/ipc/PluginModuleParent.h b/dom/plugins/ipc/PluginModuleParent.h index b32a55988ac..898054cef97 100644 --- a/dom/plugins/ipc/PluginModuleParent.h +++ b/dom/plugins/ipc/PluginModuleParent.h @@ -185,6 +185,9 @@ protected: RecvNPN_SetException(PPluginScriptableObjectParent* aActor, const nsCString& aMessage); + NS_OVERRIDE virtual bool + RecvNPN_ReloadPlugins(const bool& aReloadPages); + static PluginInstanceParent* InstCast(NPP instance); static BrowserStreamParent* StreamCast(NPP instance, NPStream* s);