summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-07-31 11:52:57 +1000
committerWarwick Allison <warwick.allison@nokia.com>2009-07-31 11:52:57 +1000
commitaa9cf406d62004519ad54596e1c391f9a6439210 (patch)
treedd562b9c296981f2761b76623911be8496c7af84 /src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h
parent987aec28b950e1c9817a20a9dd71afc071cd93ea (diff)
parent56b6a5924008ab5cdbae36e9662eddba923acd5e (diff)
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h')
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h b/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h
index 58839a295..b8d2bfe5a 100644
--- a/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h
+++ b/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2008 Collabora, Ltd. All rights reserved.
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,12 +43,18 @@ namespace WebCore {
class PluginPackage;
typedef HashSet<RefPtr<PluginPackage>, PluginPackageHash> PluginSet;
-
+
class PluginDatabase {
public:
- static PluginDatabase* installedPlugins();
+ // The first call to installedPlugins creates the plugin database
+ // and by default populates it with the plugins installed on the system.
+ // For testing purposes, it is possible to not populate the database
+ // automatically, as the plugins might affect the DRT results by
+ // writing to a.o. stderr.
+ static PluginDatabase* installedPlugins(bool populate = true);
bool refresh();
+ void clear();
Vector<PluginPackage*> plugins() const;
bool isMIMETypeRegistered(const String& mimeType);
void addExtraPluginDirectory(const String&);
@@ -57,9 +64,13 @@ namespace WebCore {
PluginPackage* findPlugin(const KURL&, String& mimeType);
- private:
- void setPluginDirectories(const Vector<String>& directories) { m_pluginDirectories = directories; }
+ void setPluginDirectories(const Vector<String>& directories)
+ {
+ clear();
+ m_pluginDirectories = directories;
+ }
+ private:
void getPluginPathsInDirectories(HashSet<String>&) const;
void getDeletedPlugins(PluginSet&) const;