summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/plugin_list.cc11
-rw-r--r--webkit/glue/plugins/plugin_list.h6
2 files changed, 17 insertions, 0 deletions
diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc
index f7643b4..3994f15 100644
--- a/webkit/glue/plugins/plugin_list.cc
+++ b/webkit/glue/plugins/plugin_list.cc
@@ -58,6 +58,17 @@ void PluginList::RegisterInternalPlugin(const PluginVersionInfo& info) {
internal_plugins_.push_back(info);
}
+void PluginList::UnregisterInternalPlugin(const FilePath& path) {
+ AutoLock lock(lock_);
+ for (size_t i = 0; i < internal_plugins_.size(); i++) {
+ if (internal_plugins_[i].path == path) {
+ internal_plugins_.erase(internal_plugins_.begin() + i);
+ return;
+ }
+ }
+ NOTREACHED();
+}
+
bool PluginList::ReadPluginInfo(const FilePath &filename,
WebPluginInfo* info,
const PluginEntryPoints** entry_points) {
diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h
index dea1ab9..c920397 100644
--- a/webkit/glue/plugins/plugin_list.h
+++ b/webkit/glue/plugins/plugin_list.h
@@ -91,6 +91,12 @@ class PluginList {
// be loaded using PluginList::LoadPlugin().
void RegisterInternalPlugin(const PluginVersionInfo& info);
+ // Removes a specified internal plugin from the list. The search will match
+ // on the path from the version info previously registered.
+ //
+ // This is generally only necessary for tests.
+ void UnregisterInternalPlugin(const FilePath& path);
+
// Creates a WebPluginInfo structure given a plugin's path. On success
// returns true, with the information being put into "info". If it's an
// internal plugin, "entry_points" is filled in as well with a