diff options
| author | Konstantin Tokarev <annulen@yandex.ru> | 2016-08-25 19:20:41 +0300 |
|---|---|---|
| committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:30:55 +0000 |
| commit | 6882a04fb36642862b11efe514251d32070c3d65 (patch) | |
| tree | b7959826000b061fd5ccc7512035c7478742f7b0 /Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp | |
| parent | ab6df191029eeeb0b0f16f127d553265659f739e (diff) | |
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp')
| -rw-r--r-- | Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp | 53 |
1 files changed, 17 insertions, 36 deletions
diff --git a/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp b/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp index 3726401f6..cfe9bd7b4 100644 --- a/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp +++ b/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp @@ -32,50 +32,20 @@ #include "PluginInfoStore.h" #include "NetscapePluginModule.h" -#include "PluginDatabase.h" +#include "PluginSearchPath.h" #include <WebCore/FileSystem.h> +#if PLATFORM(GTK) +#include "PluginInfoCache.h" +#endif + using namespace WebCore; namespace WebKit { Vector<String> PluginInfoStore::pluginsDirectories() { - Vector<String> result; - - result.append(homeDirectoryPath() + "/.mozilla/plugins"); - result.append(homeDirectoryPath() + "/.netscape/plugins"); - result.append("/usr/lib/browser/plugins"); - result.append("/usr/local/lib/mozilla/plugins"); - result.append("/usr/lib/firefox/plugins"); - result.append("/usr/lib64/browser-plugins"); - result.append("/usr/lib/browser-plugins"); - result.append("/usr/lib/mozilla/plugins"); - result.append("/usr/local/netscape/plugins"); - result.append("/opt/mozilla/plugins"); - result.append("/opt/mozilla/lib/plugins"); - result.append("/opt/netscape/plugins"); - result.append("/opt/netscape/communicator/plugins"); - result.append("/usr/lib/netscape/plugins"); - result.append("/usr/lib/netscape/plugins-libc5"); - result.append("/usr/lib/netscape/plugins-libc6"); - result.append("/usr/lib64/netscape/plugins"); - result.append("/usr/lib64/mozilla/plugins"); - result.append("/usr/lib/nsbrowser/plugins"); - result.append("/usr/lib64/nsbrowser/plugins"); - - String mozillaHome(getenv("MOZILLA_HOME")); - if (!mozillaHome.isEmpty()) - result.append(mozillaHome + "/plugins"); - - String mozillaPaths(getenv("MOZ_PLUGIN_PATH")); - if (!mozillaPaths.isEmpty()) { - Vector<String> paths; - mozillaPaths.split(UChar(':'), /* allowEmptyEntries */ false, paths); - result.appendVector(paths); - } - - return result; + return WebKit::pluginsDirectories(); } Vector<String> PluginInfoStore::pluginPathsInDirectory(const String& directory) @@ -98,7 +68,18 @@ Vector<String> PluginInfoStore::individualPluginPaths() bool PluginInfoStore::getPluginInfo(const String& pluginPath, PluginModuleInfo& plugin) { +#if PLATFORM(GTK) + if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin)) + return true; + + if (NetscapePluginModule::getPluginInfo(pluginPath, plugin)) { + PluginInfoCache::singleton().updatePluginInfo(pluginPath, plugin); + return true; + } + return false; +#else return NetscapePluginModule::getPluginInfo(pluginPath, plugin); +#endif } bool PluginInfoStore::shouldUsePlugin(Vector<PluginModuleInfo>& /*alreadyLoadedPlugins*/, const PluginModuleInfo& /*plugin*/) |
