summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/Plugins')
-rw-r--r--Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp5
-rw-r--r--Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h5
-rw-r--r--Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm5
3 files changed, 14 insertions, 1 deletions
diff --git a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp b/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
index cef14dcf0..97775c626 100644
--- a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
+++ b/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
@@ -174,6 +174,11 @@ static inline String pathExtension(const KURL& url)
}
#if !PLATFORM(MAC)
+bool PluginInfoStore::shouldBlockPlugin(const PluginModuleInfo&) const
+{
+ return false;
+}
+
String PluginInfoStore::getMIMETypeForExtension(const String& extension)
{
return MIMETypeRegistry::getMIMETypeForExtension(extension);
diff --git a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h b/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h
index 4bfecb424..f30303c83 100644
--- a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h
+++ b/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h
@@ -53,8 +53,11 @@ public:
// Returns the info for the plug-in with the given path.
PluginModuleInfo infoForPluginWithPath(const String& pluginPath) const;
-private:
+ // Return whether this plug-in should be blocked from being instantiated.
+ // Note that the plug-in will still be seen by e.g. navigator.plugins
+ bool shouldBlockPlugin(const PluginModuleInfo&) const;
+private:
PluginModuleInfo findPluginForMIMEType(const String& mimeType) const;
PluginModuleInfo findPluginForExtension(const String& extension, String& mimeType) const;
diff --git a/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm b/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm
index 6c6040781..7a04b5355 100644
--- a/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm
+++ b/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm
@@ -89,6 +89,11 @@ bool PluginInfoStore::shouldUsePlugin(Vector<PluginModuleInfo>& alreadyLoadedPlu
return true;
}
+bool PluginInfoStore::shouldBlockPlugin(const PluginModuleInfo& plugin) const
+{
+ return WKShouldBlockPlugin(plugin.bundleIdentifier, plugin.versionString);
+}
+
String PluginInfoStore::getMIMETypeForExtension(const String& extension)
{
// FIXME: This should just call MIMETypeRegistry::getMIMETypeForExtension and be