Commit 81bf662c authored by mrowe@apple.com's avatar mrowe@apple.com

2008-02-25 Rodney Dawes <dobey@wayofthemonkey.com>

        Reviewed by Jon Honeycutt.

        http://bugs.webkit.org/show_bug.cgi?id=16924
        Bug 16924: Shared PluginDatabase, PluginPackage, and PlugInInfoStore implementations

        Add PluginInfoStore.cpp and new PluginDatabase.cpp to GTK+ and Qt ports.
        Remove old PlugInInfoStoreQt.cpp as it is obsoleted by shared code.
        Add PluginInfoStore, PluginDatabase, and PluginStream files to Wx build.
        Add new PluginDatabase.cpp to Windows build.
        Add temporary stubs for new PluginDatabase and PluginPackage.
        shared classes to GTK+, Qt, and Wx ports.
        Copy PluginDatabaseWin.cpp to PluginDatabase.cpp to preserve history.
        Remove shared code from PluginDatabaseWin.cpp.
        Remove Windows-specific code from PluginDatabase.cpp.
        Use PlatformModule and PlatformFileTime instead of HMODULE and FILETIME.
        Remove extraneous PluginPackage:: from hash() class method prototype.
        Subsume storeFileVersion into PluginPackage::fetchInfo.
        Add cross-platform PlatformModuleVersion type definition.
        Use PlatformModuleVersion to store the module version.
        Rename m_fileVersion[ML]S to m_moduleVersion.
        Change compareFileVersion to use PlatformModuleVersion as the argument.
        Move PluginView::determineQuirks and m_quirks to PluginPackage.
        Updated determineQuirks for the PlatformModuleVersion.

        * GNUmakefile.am:
        * WebCore.pro:
        * WebCoreSources.bkl:
        * webcore-base.bkl:
        * WebCore.vcproj/WebCore.vcproj:
        * Platform/FileSystem.h:
        * platform/qt/PlugInInfoStoreQt.cpp:
        * platform/gtk/TemporaryLinkStubs.cpp:
        * platform/qt/TemporaryLinkStubs.cpp:
        * platform/wx/TemporaryLinkStubs.cpp:
        * plugins/PluginDatabase.cpp:
        * plugins/PluginDatabase.h:
        * plugins/win/PluginDatabaseWin.cpp:
        * plugins/PluginPackage.h:
        * plugins/win/PluginPackageWin.cpp:
        * plugins/PluginView.h:
        * plugins/win/PluginViewWin.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 63d5b8ed
2008-02-25 Rodney Dawes <dobey@wayofthemonkey.com>
Reviewed by Jon Honeycutt.
http://bugs.webkit.org/show_bug.cgi?id=16924
Bug 16924: Shared PluginDatabase, PluginPackage, and PlugInInfoStore implementations
Add PluginInfoStore.cpp and new PluginDatabase.cpp to GTK+ and Qt ports.
Remove old PlugInInfoStoreQt.cpp as it is obsoleted by shared code.
Add PluginInfoStore, PluginDatabase, and PluginStream files to Wx build.
Add new PluginDatabase.cpp to Windows build.
Add temporary stubs for new PluginDatabase and PluginPackage.
shared classes to GTK+, Qt, and Wx ports.
Copy PluginDatabaseWin.cpp to PluginDatabase.cpp to preserve history.
Remove shared code from PluginDatabaseWin.cpp.
Remove Windows-specific code from PluginDatabase.cpp.
Use PlatformModule and PlatformFileTime instead of HMODULE and FILETIME.
Remove extraneous PluginPackage:: from hash() class method prototype.
Subsume storeFileVersion into PluginPackage::fetchInfo.
Add cross-platform PlatformModuleVersion type definition.
Use PlatformModuleVersion to store the module version.
Rename m_fileVersion[ML]S to m_moduleVersion.
Change compareFileVersion to use PlatformModuleVersion as the argument.
Move PluginView::determineQuirks and m_quirks to PluginPackage.
Updated determineQuirks for the PlatformModuleVersion.
* GNUmakefile.am:
* WebCore.pro:
* WebCoreSources.bkl:
* webcore-base.bkl:
* WebCore.vcproj/WebCore.vcproj:
* Platform/FileSystem.h:
* platform/qt/PlugInInfoStoreQt.cpp:
* platform/gtk/TemporaryLinkStubs.cpp:
* platform/qt/TemporaryLinkStubs.cpp:
* platform/wx/TemporaryLinkStubs.cpp:
* plugins/PluginDatabase.cpp:
* plugins/PluginDatabase.h:
* plugins/win/PluginDatabaseWin.cpp:
* plugins/PluginPackage.h:
* plugins/win/PluginPackageWin.cpp:
* plugins/PluginView.h:
* plugins/win/PluginViewWin.cpp:
2008-02-25 Anders Carlsson <andersca@apple.com>
Reviewed by Darin.
......@@ -849,6 +849,8 @@ webcore_sources += \
WebCore/platform/Timer.cpp \
WebCore/platform/text/UnicodeRange.cpp \
WebCore/platform/Widget.cpp \
WebCore/plugins/PluginDatabase.cpp \
WebCore/plugins/PluginInfoStore.cpp \
WebCore/plugins/PluginStream.cpp \
WebCore/rendering/AutoTableLayout.cpp \
WebCore/rendering/bidi.cpp \
......
......@@ -789,6 +789,8 @@ SOURCES += \
platform/Timer.cpp \
platform/text/UnicodeRange.cpp \
platform/Widget.cpp \
plugins/PluginDatabase.cpp \
plugins/PluginInfoStore.cpp \
plugins/PluginStream.cpp \
rendering/AutoTableLayout.cpp \
rendering/bidi.cpp \
......@@ -939,7 +941,6 @@ qt-port {
platform/qt/PlatformMouseEventQt.cpp \
platform/qt/PlatformScreenQt.cpp \
platform/qt/PlatformScrollBarQt.cpp \
platform/qt/PlugInInfoStoreQt.cpp \
platform/qt/PopupMenuQt.cpp \
platform/qt/QWebPopup.cpp \
platform/qt/RenderThemeQt.cpp \
......
......@@ -7976,6 +7976,10 @@
RelativePath="..\plugins\npfunctions.h"
>
</File>
<File
RelativePath="..\plugins\PluginDatabase.cpp"
>
</File>
<File
RelativePath="..\plugins\PluginDatabase.h"
>
......
......@@ -633,6 +633,12 @@ This file contains the list of files needed to build WebCore.
platform/sql/SQLValue.cpp
</set>
<set append="1" var="WEBCORE_SOURCES_PLUGINS">
plugins/PluginDatabase.cpp
plugins/PluginInfoStore.cpp
plugins/PluginStream.cpp
</set>
<set append="1" var="WEBCORE_SOURCES_GIF">
platform/image-decoders/gif/GIFImageDecoder.cpp
platform/image-decoders/gif/GIFImageReader.cpp
......
......@@ -50,6 +50,24 @@ typedef HANDLE PlatformFileHandle;
typedef FILETIME PlatformFileTime;
typedef HMODULE PlatformModule;
const PlatformFileHandle invalidPlatformFileHandle = INVALID_HANDLE_VALUE;
struct PlatformModuleVersion {
unsigned leastSig;
unsigned mostSig;
PlatformModuleVersion(unsigned)
: leastSig(0)
, mostSig(0)
{
}
PlatformModuleVersion(unsigned lsb, unsigned msb)
: leastSig(lsb)
, mostSig(msb)
{
}
};
#else
typedef int PlatformFileHandle;
typedef time_t PlatformFileTime;
......@@ -59,6 +77,8 @@ typedef GModule* PlatformModule;
typedef void* PlatformModule;
#endif
const PlatformFileHandle invalidPlatformFileHandle = -1;
typedef unsigned PlatformModuleVersion;
#endif
bool fileExists(const String&);
......
......@@ -34,7 +34,8 @@
#include "GlobalHistory.h"
#include "KURL.h"
#include "NotImplemented.h"
#include "PluginInfoStore.h"
#include "PluginDatabase.h"
#include "PluginPackage.h"
#include "SharedBuffer.h"
using namespace WebCore;
......@@ -59,12 +60,14 @@ Vector<char> loadResourceIntoArray(const char* resourceName)
bool WebCore::historyContains(const UChar*, unsigned) { return false; }
PluginInfo* PluginInfoStore::createPluginInfoForPluginAtIndex(unsigned) { notImplemented(); return 0;}
unsigned PluginInfoStore::pluginCount() const { notImplemented(); return 0; }
String PluginInfoStore::pluginNameForMIMEType(const String& mimeType) { notImplemented(); return String(); }
bool WebCore::PluginInfoStore::supportsMIMEType(const WebCore::String&) { notImplemented(); return false; }
void WebCore::refreshPlugins(bool) { notImplemented(); }
PluginSet PluginDatabase::getPluginsInPaths() const { notImplemented(); return PluginSet(); }
Vector<String> PluginDatabase::defaultPluginPaths() { notImplemented(); return Vector<String>(); }
bool PluginDatabase::isPreferredPluginPath(const String&) const { notImplemented(); return false; }
bool PluginPackage::fetchInfo() { notImplemented(); return false; }
unsigned PluginPackage::hash() const { notImplemented(); return 0; }
bool PluginPackage::equal(const PluginPackage&, const PluginPackage&) { notImplemented(); return false; }
bool PluginPackage::load() { notImplemented(); return false; }
PluginPackage::~PluginPackage() { notImplemented(); }
Color WebCore::focusRingColor() { return 0xFF0000FF; }
void WebCore::setFocusRingColorChangeFunction(void (*)()) { }
......
/*
Copyright (C) 2007 Trolltech ASA
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
This class provides all functionality needed for loading images, style sheets and html
pages from the web. It has a memory cache for these objects.
*/
#include "PluginInfoStore.h"
#include "qdebug.h"
#if QT_VERSION < 0x040400
#include "qwebobjectplugin_p.h"
#endif
#include "NotImplemented.h"
namespace WebCore {
PluginInfo* PluginInfoStore::createPluginInfoForPluginAtIndex(unsigned i)
{
//qDebug() << ">>>>>>>>>>> PluginInfoStore::createPluginInfoForPluginAtIndex(" << i << ")";
#if QT_VERSION < 0x040400
QWebFactoryLoader *loader = QWebFactoryLoader::self();
if (i > loader->m_pluginInfo.count())
return 0;
const QWebFactoryLoader::Info &qinfo = loader->m_pluginInfo.at(i);
PluginInfo *info = new PluginInfo;
info->name = qinfo.name;
info->desc = qinfo.description;
foreach (const QWebFactoryLoader::MimeInfo &m, qinfo.mimes) {
MimeClassInfo *mime = new MimeClassInfo;
mime->type = m.type;
mime->plugin = info;
foreach (QString ext, m.extensions)
mime->suffixes.append(ext);
info->mimes.append(mime);
}
return info;
#else
return 0; // ### FIXME
#endif
}
unsigned PluginInfoStore::pluginCount() const
{
#if QT_VERSION < 0x040400
//qDebug() << ">>>>>>>>>>> PluginInfoStore::count =" << QWebFactoryLoader::self()->keys().count();
return QWebFactoryLoader::self()->keys().count();
#else
return 0;
#endif
}
String PluginInfoStore::pluginNameForMIMEType(const String& mimeType)
{
// FIXME: This method is stubbed out and should really return the name of a plug-in package for
// a given MIME type.
return String();
}
bool PluginInfoStore::supportsMIMEType(const WebCore::String& string)
{
#if QT_VERSION < 0x040400
bool supports = QWebFactoryLoader::self()->supportsMimeType(string);
#else
bool supports = false;
#endif
//qDebug() << ">>>>>>>>>>> PluginInfoStore::supportsMIMEType(" << string << ") =" << supports;
return supports;
}
void refreshPlugins(bool) {
notImplemented();
}
}
......@@ -4,6 +4,7 @@
* Copyright (C) 2006 George Staikos <staikos@kde.org>
* Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
* Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
* Copyright (C) 2008 Collabora, Ltd.
*
* All rights reserved.
*
......@@ -59,7 +60,8 @@
#include "NotImplemented.h"
#include "Path.h"
#include "PlatformMouseEvent.h"
#include "PluginInfoStore.h"
#include "PluginDatabase.h"
#include "PluginPackage.h"
#include "RenderTheme.h"
#include "SharedBuffer.h"
#include "SystemTime.h"
......@@ -70,6 +72,15 @@
using namespace WebCore;
PluginSet PluginDatabase::getPluginsInPaths() const { notImplemented(); return PluginSet(); }
Vector<String> PluginDatabase::defaultPluginPaths() { notImplemented(); return Vector<String>(); }
bool PluginDatabase::isPreferredPluginPath(const String&) const { notImplemented(); return false; }
bool PluginPackage::fetchInfo() { notImplemented(); return false; }
unsigned PluginPackage::hash() const { notImplemented(); return 0; }
bool PluginPackage::equal(const PluginPackage&, const PluginPackage&) { notImplemented(); return false; }
bool PluginPackage::load() { notImplemented(); return false; }
PluginPackage::~PluginPackage() { notImplemented(); }
namespace WebCore {
Vector<String> supportedKeySizes() { notImplemented(); return Vector<String>(); }
......
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2008 Collabora, Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -63,7 +64,8 @@
#include "PlatformMenuDescription.h"
#include "PlatformMouseEvent.h"
#include "PlatformScrollBar.h"
#include "PluginInfoStore.h"
#include "PluginDatabase.h"
#include "PluginPackage.h"
#include "PopupMenu.h"
#include "RenderTheme.h"
#include "ResourceHandle.h"
......@@ -117,11 +119,14 @@ namespace WebCore {
void WebCore::findWordBoundary(UChar const* str,int len,int position,int* start, int* end) { notImplemented(); *start=position; *end=position; }
PluginInfo*PluginInfoStore::createPluginInfoForPluginAtIndex(unsigned) { notImplemented(); return 0;}
unsigned PluginInfoStore::pluginCount() const { notImplemented(); return 0; }
bool WebCore::PluginInfoStore::supportsMIMEType(const WebCore::String&) { notImplemented(); return false; }
String PluginInfoStore::pluginNameForMIMEType(const String& mimeType) { notImplemented(); return String(); }
void WebCore::refreshPlugins(bool) { notImplemented(); }
PluginSet PluginDatabase::getPluginsInPaths() const { notImplemented(); return PluginSet(); }
Vector<String> PluginDatabase::defaultPluginPaths() { notImplemented(); return Vector<String>(); }
bool PluginDatabase::isPreferredPluginPath(const String&) const { notImplemented(); return false; }
bool PluginPackage::fetchInfo() { notImplemented(); return false; }
unsigned PluginPackage::hash() const { notImplemented(); return 0; }
bool PluginPackage::equal(const PluginPackage&, const PluginPackage&) { notImplemented(); return false; }
bool PluginPackage::load() { notImplemented(); return false; }
PluginPackage::~PluginPackage() { notImplemented(); }
void Widget::setIsSelected(bool) { notImplemented(); }
......
/*
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2008 Collabora, Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "PluginDatabase.h"
#include "KURL.h"
#include "Frame.h"
#include "PluginPackage.h"
namespace WebCore {
PluginDatabase* PluginDatabase::installedPlugins()
{
static PluginDatabase* plugins = 0;
if (!plugins) {
plugins = new PluginDatabase;
plugins->setPluginPaths(PluginDatabase::defaultPluginPaths());
plugins->refresh();
}
return plugins;
}
bool PluginDatabase::isMIMETypeRegistered(const String& mimeType)
{
if (mimeType.isNull())
return false;
if (m_registeredMIMETypes.contains(mimeType))
return true;
// No plugin was found, try refreshing the database and searching again
return (refresh() && m_registeredMIMETypes.contains(mimeType));
}
void PluginDatabase::addExtraPluginPath(const String& path)
{
m_pluginPaths.append(path);
refresh();
}
bool PluginDatabase::refresh()
{
PluginSet newPlugins;
bool pluginSetChanged = false;
// Create a new set of plugins
newPlugins = getPluginsInPaths();
if (!m_plugins.isEmpty()) {
m_registeredMIMETypes.clear();
PluginSet pluginsToUnload = m_plugins;
PluginSet::const_iterator end = newPlugins.end();
for (PluginSet::const_iterator it = newPlugins.begin(); it != end; ++it)
pluginsToUnload.remove(*it);
end = m_plugins.end();
for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it)
newPlugins.remove(*it);
// Unload plugins
end = pluginsToUnload.end();
for (PluginSet::const_iterator it = pluginsToUnload.begin(); it != end; ++it)
m_plugins.remove(*it);
// Add new plugins
end = newPlugins.end();
for (PluginSet::const_iterator it = newPlugins.begin(); it != end; ++it)
m_plugins.add(*it);
pluginSetChanged = !pluginsToUnload.isEmpty() || !newPlugins.isEmpty();
} else {
m_plugins = newPlugins;
PluginSet::const_iterator end = newPlugins.end();
for (PluginSet::const_iterator it = newPlugins.begin(); it != end; ++it)
m_plugins.add(*it);
pluginSetChanged = !newPlugins.isEmpty();
}
// Register plug-in MIME types
PluginSet::const_iterator end = m_plugins.end();
for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it) {
// Get MIME types
MIMEToDescriptionsMap::const_iterator map_end = (*it)->mimeToDescriptions().end();
for (MIMEToDescriptionsMap::const_iterator map_it = (*it)->mimeToDescriptions().begin(); map_it != map_end; ++map_it) {
m_registeredMIMETypes.add(map_it->first);
}
}
return pluginSetChanged;
}
Vector<PluginPackage*> PluginDatabase::plugins() const
{
Vector<PluginPackage*> result;
PluginSet::const_iterator end = m_plugins.end();
for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it)
result.append((*it).get());
return result;
}
PluginPackage* PluginDatabase::pluginForMIMEType(const String& mimeType)
{
if (mimeType.isEmpty())
return 0;
String key = mimeType.lower();
PluginPackage* plugin = 0;
PluginSet::const_iterator end = m_plugins.end();
for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it) {
if ((*it)->mimeToDescriptions().contains(key)) {
plugin = (*it).get();
if (isPreferredPluginPath(plugin->parentDirectory()))
break;
}
}
return plugin;
}
String PluginDatabase::MIMETypeForExtension(const String& extension) const
{
if (extension.isEmpty())
return String();
PluginSet::const_iterator end = m_plugins.end();
String mimeType;
PluginPackage* plugin = 0;
for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it) {
MIMEToExtensionsMap::const_iterator mime_end = (*it)->mimeToExtensions().end();
for (MIMEToExtensionsMap::const_iterator mime_it = (*it)->mimeToExtensions().begin(); mime_it != mime_end; ++mime_it) {
const Vector<String>& extensions = mime_it->second;
for (unsigned i = 0; i < extensions.size(); i++) {
if (equalIgnoringCase(extensions[i], extension)) {
mimeType = mime_it->first;
plugin = (*it).get();
if (isPreferredPluginPath(plugin->parentDirectory()))
break;
}
}
}
}
return mimeType;
}
PluginPackage* PluginDatabase::findPlugin(const KURL& url, String& mimeType)
{
PluginPackage* plugin = pluginForMIMEType(mimeType);
String filename = url.string();
if (!plugin) {
String filename = url.lastPathComponent();
if (!filename.endsWith("/")) {
int extensionPos = filename.reverseFind('.');
if (extensionPos != -1) {
String extension = filename.substring(extensionPos + 1);
mimeType = MIMETypeForExtension(extension);
plugin = pluginForMIMEType(mimeType);
}
}
}
// FIXME: if no plugin could be found, query Windows for the mime type
// corresponding to the extension.
return plugin;
}
}
/*
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2008 Collabora, Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -26,20 +27,19 @@
#ifndef PluginDatabase_H
#define PluginDatabase_H
#include <wtf/Vector.h>
#include <wtf/HashSet.h>
#include "PlatformString.h"
#include "PluginPackage.h"
#include "StringHash.h"
#include <wtf/Vector.h>
#include <wtf/HashSet.h>
namespace WebCore {
class Element;
class Frame;
class IntSize;
class KURL;
class PluginPackage;
class PluginView;
typedef HashSet<RefPtr<PluginPackage>, PluginPackageHash> PluginSet;
......@@ -51,8 +51,10 @@ namespace WebCore {
Vector<PluginPackage*> plugins() const;
bool isMIMETypeRegistered(const String& mimeType);
void addExtraPluginPath(const String&);
bool isPreferredPluginPath(const String& path) const;
PluginPackage* findPlugin(const KURL&, String& mimeType);
private:
void setPluginPaths(const Vector<String>& paths) { m_pluginPaths = paths; }
PluginSet getPluginsInPaths() const;
......
/*
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2008 Collabora, Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -26,12 +27,11 @@
#ifndef PluginPackage_H
#define PluginPackage_H
#include <winsock2.h>
#include <windows.h>
#include "Timer.h"
#include "StringHash.h"
#include "FileSystem.h"
#include "PlatformString.h"
#include "PluginQuirkSet.h"
#include "StringHash.h"
#include "Timer.h"
#include "npfunctions.h"
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
......@@ -43,7 +43,7 @@ namespace WebCore {
class PluginPackage : public RefCounted<PluginPackage> {
public:
~PluginPackage();
static PluginPackage* createPackage(const String& path, const FILETIME& lastModified);
static PluginPackage* createPackage(const String& path, const PlatformFileTime& lastModified);
String name() const { return m_name; }
String description() const { return m_description; }
......@@ -53,7 +53,7 @@ namespace WebCore {
const MIMEToDescriptionsMap& mimeToDescriptions() const { return m_mimeToDescriptions; }
const MIMEToExtensionsMap& mimeToExtensions() const { return m_mimeToExtensions; }
unsigned PluginPackage::hash() const;
unsigned hash() const;
static bool equal(const PluginPackage& a, const PluginPackage& b);
bool load();
......@@ -61,31 +61,31 @@ namespace WebCore {
void unloadWithoutShutdown();
const NPPluginFuncs* pluginFuncs() const { return &m_pluginFuncs; }
int compareFileVersion(const PlatformModuleVersion&) const;
PluginQuirkSet quirks() const { return m_quirks; }
int compareFileVersion(unsigned compareVersionMS, unsigned compareVersionLS) const;
private:
PluginPackage(const String& path, const FILETIME& lastModified);
PluginPackage(const String& path, const PlatformFileTime& lastModified);
bool fetchInfo();
void storeFileVersion(LPVOID versionInfoData);
bool isPluginBlacklisted();
void determineQuirks(const String& mimeType);
bool m_isLoaded;
int m_loadCount;
DWORD m_fileVersionMS;
DWORD m_fileVersionLS;
String m_description;