Bug 1108035 - Add a preference that allows us to disable Flash protected mode from within Firefox. We do this by hooking CreateFileW and replacing the Flash config file with our own. r=aklotz

This commit is contained in:
Benjamin Smedberg
2014-12-12 10:19:06 -05:00
parent a8acbbe22a
commit c5bf7a3d77
7 changed files with 138 additions and 3 deletions

View File

@@ -31,6 +31,7 @@
#include "nsPrintfCString.h"
#include "prsystem.h"
#include "GeckoProfiler.h"
#include "nsPluginTags.h"
#ifdef XP_WIN
#include "PluginHangUIParent.h"
@@ -153,7 +154,8 @@ PluginModuleContentParent::Create(mozilla::ipc::Transport* aTransport,
// static
PluginLibrary*
PluginModuleChromeParent::LoadModule(const char* aFilePath, uint32_t aPluginId)
PluginModuleChromeParent::LoadModule(const char* aFilePath, uint32_t aPluginId,
nsPluginTag* aPluginTag)
{
PLUGIN_LOG_DEBUG_FUNCTION;
@@ -192,6 +194,13 @@ PluginModuleChromeParent::LoadModule(const char* aFilePath, uint32_t aPluginId)
#endif
#endif
#ifdef XP_WIN
if (aPluginTag->mIsFlashPlugin &&
Preferences::GetBool("dom.ipc.plugins.flash.disable-protected-mode", false)) {
parent->SendDisableFlashProtectedMode();
}
#endif
return parent.forget();
}