Diff
Modified: trunk/Source/WebKit2/ChangeLog (88818 => 88819)
--- trunk/Source/WebKit2/ChangeLog 2011-06-14 17:34:06 UTC (rev 88818)
+++ trunk/Source/WebKit2/ChangeLog 2011-06-14 17:37:25 UTC (rev 88819)
@@ -1,3 +1,28 @@
+2011-06-14 Anders Carlsson <[email protected]>
+
+ Reviewed by Darin Adler.
+
+ Add PluginModuleInfo header and prepare for renaming of PluginInfoStore::Plugin to PluginModuleInfo
+ https://bugs.webkit.org/show_bug.cgi?id=62647
+
+ Make PluginModuleInfo a typedef of PluginInfoStore::Plugin for now; eventually it should be its own class,
+ and PluginInfoStore::Plugin should go away.
+
+ * GNUmakefile.am:
+ * Shared/Plugins/Netscape/NetscapePluginModule.h:
+ * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
+ (WebKit::getPluginArchitecture):
+ (WebKit::getMIMETypesFromPluginBundle):
+ (WebKit::getPluginInfoFromPropertyLists):
+ (WebKit::getPluginInfoFromCarbonResources):
+ (WebKit::NetscapePluginModule::getPluginInfo):
+ (WebKit::NetscapePluginModule::determineQuirks):
+ * Shared/Plugins/PluginModuleInfo.cpp: Added.
+ * Shared/Plugins/PluginModuleInfo.h: Added.
+ * WebKit2.pro:
+ * WebKit2.xcodeproj/project.pbxproj:
+ * win/WebKit2.vcproj:
+
2011-06-14 Carlos Garcia Campos <[email protected]>
Reviewed by Martin Robinson.
Modified: trunk/Source/WebKit2/GNUmakefile.am (88818 => 88819)
--- trunk/Source/WebKit2/GNUmakefile.am 2011-06-14 17:34:06 UTC (rev 88818)
+++ trunk/Source/WebKit2/GNUmakefile.am 2011-06-14 17:37:25 UTC (rev 88819)
@@ -230,6 +230,8 @@
Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.h \
Source/WebKit2/Shared/Plugins/NPVariantData.cpp \
Source/WebKit2/Shared/Plugins/NPVariantData.h \
+ Source/WebKit2/Shared/Plugins/PluginModuleInfo.cpp \
+ Source/WebKit2/Shared/Plugins/PluginModuleInfo.h \
Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp \
Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h \
Source/WebKit2/Shared/Plugins/PluginQuirks.h \
Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.h (88818 => 88819)
--- trunk/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.h 2011-06-14 17:34:06 UTC (rev 88818)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.h 2011-06-14 17:37:25 UTC (rev 88819)
@@ -27,16 +27,12 @@
#define NetscapePluginModule_h
#include "Module.h"
+#include "PluginModuleInfo.h"
#include "PluginQuirks.h"
#include <WebCore/npruntime_internal.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
-// FIXME: We should not include PluginInfoStore.h here. Instead,
-// PluginInfoStore::Plugin should be moved out into its own header which we can
-// put in Shared/Plugins.
-#include "PluginInfoStore.h"
-
namespace WebKit {
class NetscapePluginModule : public RefCounted<NetscapePluginModule> {
@@ -49,7 +45,7 @@
void incrementLoadCount();
void decrementLoadCount();
- static bool getPluginInfo(const String& pluginPath, PluginInfoStore::Plugin&);
+ static bool getPluginInfo(const String& pluginPath, PluginModuleInfo&);
const PluginQuirks& pluginQuirks() const { return m_pluginQuirks; }
Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm (88818 => 88819)
--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm 2011-06-14 17:34:06 UTC (rev 88818)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm 2011-06-14 17:37:25 UTC (rev 88819)
@@ -35,7 +35,7 @@
namespace WebKit {
-static bool getPluginArchitecture(CFBundleRef bundle, PluginInfoStore::Plugin& plugin)
+static bool getPluginArchitecture(CFBundleRef bundle, PluginModuleInfo& plugin)
{
RetainPtr<CFArrayRef> pluginArchitecturesArray(AdoptCF, CFBundleCopyExecutableArchitectures(bundle));
if (!pluginArchitecturesArray)
@@ -108,7 +108,7 @@
return RetainPtr<CFDictionaryRef>(AdoptCF, static_cast<CFDictionaryRef>(propertyList.leakRef()));
}
-static RetainPtr<CFDictionaryRef> getMIMETypesFromPluginBundle(CFBundleRef bundle, const PluginInfoStore::Plugin& plugin)
+static RetainPtr<CFDictionaryRef> getMIMETypesFromPluginBundle(CFBundleRef bundle, const PluginModuleInfo& plugin)
{
CFStringRef propertyListFilename = static_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("WebPluginMIMETypesFilename")));
if (propertyListFilename) {
@@ -131,7 +131,7 @@
return static_cast<CFDictionaryRef>(CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("WebPluginMIMETypes")));
}
-static bool getPluginInfoFromPropertyLists(CFBundleRef bundle, PluginInfoStore::Plugin& plugin)
+static bool getPluginInfoFromPropertyLists(CFBundleRef bundle, PluginModuleInfo& plugin)
{
RetainPtr<CFDictionaryRef> mimeTypes = getMIMETypesFromPluginBundle(bundle, plugin);
if (!mimeTypes || CFGetTypeID(mimeTypes.get()) != CFDictionaryGetTypeID())
@@ -288,7 +288,7 @@
static const ResID MIMEDescriptionStringNumber = 127;
static const ResID MIMEListStringStringNumber = 128;
-static bool getPluginInfoFromCarbonResources(CFBundleRef bundle, PluginInfoStore::Plugin& plugin)
+static bool getPluginInfoFromCarbonResources(CFBundleRef bundle, PluginModuleInfo& plugin)
{
ResourceMap resourceMap(bundle);
if (!resourceMap.isValid())
@@ -342,7 +342,7 @@
return true;
}
-bool NetscapePluginModule::getPluginInfo(const String& pluginPath, PluginInfoStore::Plugin& plugin)
+bool NetscapePluginModule::getPluginInfo(const String& pluginPath, PluginModuleInfo& plugin)
{
RetainPtr<CFStringRef> bundlePath(AdoptCF, pluginPath.createCFString());
RetainPtr<CFURLRef> bundleURL(AdoptCF, CFURLCreateWithFileSystemPath(kCFAllocatorDefault, bundlePath.get(), kCFURLPOSIXPathStyle, false));
@@ -449,7 +449,7 @@
void NetscapePluginModule::determineQuirks()
{
- PluginInfoStore::Plugin plugin;
+ PluginModuleInfo plugin;
if (!getPluginInfo(m_pluginPath, plugin))
return;
Added: trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.cpp (0 => 88819)
--- trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.cpp (rev 0)
+++ trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.cpp 2011-06-14 17:37:25 UTC (rev 88819)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2011 Apple Inc. 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 "PluginModuleInfo.h"
+
+namespace WebKit {
+
+
+}
Added: trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h (0 => 88819)
--- trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h (rev 0)
+++ trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h 2011-06-14 17:37:25 UTC (rev 88819)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2011 Apple Inc. 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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.
+ */
+
+#ifndef PluginModuleInfo_h
+#define PluginModuleInfo_h
+
+// FIXME: Remove this include and move PluginInfoStore::Plugin here and rename it to PluginModuleInfo.
+#include "PluginInfoStore.h"
+
+namespace WebKit {
+
+typedef PluginInfoStore::Plugin PluginModuleInfo;
+
+} // namespace WebKit
+
+#endif // PluginModuleInfo_h
Modified: trunk/Source/WebKit2/WebKit2.pro (88818 => 88819)
--- trunk/Source/WebKit2/WebKit2.pro 2011-06-14 17:34:06 UTC (rev 88818)
+++ trunk/Source/WebKit2/WebKit2.pro 2011-06-14 17:37:25 UTC (rev 88819)
@@ -167,6 +167,7 @@
Shared/Plugins/NPObjectMessageReceiver.h \
Shared/Plugins/NPObjectProxy.h \
Shared/Plugins/NPVariantData.h \
+ Shared/Plugins/PluginModuleInfo.h \
Shared/Plugins/PluginProcessCreationParameters.h \
Shared/Plugins/PluginQuirks.h \
Shared/qt/PlatformCertificateInfo.h \
@@ -334,6 +335,7 @@
Shared/Plugins/NPObjectMessageReceiver.cpp \
Shared/Plugins/NPObjectProxy.cpp \
Shared/Plugins/NPVariantData.cpp \
+ Shared/Plugins/PluginModuleInfo.cpp \
Shared/Plugins/PluginProcessCreationParameters.cpp \
Shared/ChildProcess.cpp \
Shared/DictionaryPopupInfo.cpp \
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (88818 => 88819)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2011-06-14 17:34:06 UTC (rev 88818)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2011-06-14 17:37:25 UTC (rev 88819)
@@ -100,6 +100,8 @@
1A30EAC6115D7DA30053E937 /* ConnectionMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A30EAC5115D7DA30053E937 /* ConnectionMac.cpp */; };
1A3979F61332983A00E00300 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; };
1A3979F71332983F00E00300 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */; };
+ 1A3D610113A7CC2A00F95D4E /* PluginModuleInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3D60FF13A7CC2A00F95D4E /* PluginModuleInfo.cpp */; };
+ 1A3D610213A7CC2A00F95D4E /* PluginModuleInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3D610013A7CC2A00F95D4E /* PluginModuleInfo.h */; };
1A3DD1FD125E59F3004515E6 /* WebFindClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3DD1FC125E59F3004515E6 /* WebFindClient.cpp */; };
1A3DD202125E5A1F004515E6 /* WebFindClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3DD201125E5A1F004515E6 /* WebFindClient.h */; };
1A3DD206125E5A2F004515E6 /* APIClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3DD205125E5A2F004515E6 /* APIClient.h */; };
@@ -1006,6 +1008,8 @@
1A2D956E12848564001EB962 /* ChildProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChildProcess.cpp; sourceTree = "<group>"; };
1A30066C1110F4F70031937C /* ResponsivenessTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResponsivenessTimer.h; sourceTree = "<group>"; };
1A30EAC5115D7DA30053E937 /* ConnectionMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConnectionMac.cpp; sourceTree = "<group>"; };
+ 1A3D60FF13A7CC2A00F95D4E /* PluginModuleInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginModuleInfo.cpp; sourceTree = "<group>"; };
+ 1A3D610013A7CC2A00F95D4E /* PluginModuleInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginModuleInfo.h; sourceTree = "<group>"; };
1A3DD1FC125E59F3004515E6 /* WebFindClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebFindClient.cpp; sourceTree = "<group>"; };
1A3DD201125E5A1F004515E6 /* WebFindClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFindClient.h; sourceTree = "<group>"; };
1A3DD205125E5A2F004515E6 /* APIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIClient.h; sourceTree = "<group>"; };
@@ -2244,6 +2248,8 @@
isa = PBXGroup;
children = (
1A4A9C5212B816CF008FE984 /* Netscape */,
+ 1A3D60FF13A7CC2A00F95D4E /* PluginModuleInfo.cpp */,
+ 1A3D610013A7CC2A00F95D4E /* PluginModuleInfo.h */,
1A2D90D11281C966001EB962 /* PluginProcessCreationParameters.cpp */,
1A2D90D01281C966001EB962 /* PluginProcessCreationParameters.h */,
1A4A9F3112B844E2008FE984 /* PluginQuirks.h */,
@@ -3817,6 +3823,7 @@
512DF701138C254600A22FC6 /* SecKeychainItemResponseData.h in Headers */,
512DF70B138C26C700A22FC6 /* KeychainAttribute.h in Headers */,
93C01DAC139AC91700ED51D7 /* CoreIPCClientRunLoop.h in Headers */,
+ 1A3D610213A7CC2A00F95D4E /* PluginModuleInfo.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -4485,6 +4492,7 @@
512DF700138C254600A22FC6 /* SecKeychainItemResponseData.cpp in Sources */,
512DF70A138C26C700A22FC6 /* KeychainAttribute.cpp in Sources */,
93C01DAD139AC91700ED51D7 /* CoreIPCClientRunLoop.mm in Sources */,
+ 1A3D610113A7CC2A00F95D4E /* PluginModuleInfo.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: trunk/Source/WebKit2/win/WebKit2.vcproj (88818 => 88819)
--- trunk/Source/WebKit2/win/WebKit2.vcproj 2011-06-14 17:34:06 UTC (rev 88818)
+++ trunk/Source/WebKit2/win/WebKit2.vcproj 2011-06-14 17:37:25 UTC (rev 88819)
@@ -1430,6 +1430,14 @@
Name="Plugins"
>
<File
+ RelativePath="..\Shared\Plugins\PluginModuleInfo.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Shared\Plugins\PluginModuleInfo.h"
+ >
+ </File>
+ <File
RelativePath="..\Shared\Plugins\PluginQuirks.h"
>
</File>