Unify plug-in information dictionaries
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2013 20:46:12 +0000 (20:46 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2013 20:46:12 +0000 (20:46 +0000)
<rdar://problem/13852080>
https://bugs.webkit.org/show_bug.cgi?id=115891

Reviewed by Anders Carlsson.

This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.

All the old keys will continue to work, but have been deprecated in favor of new keys defined in
WKPluginInformation.h

* Shared/API/c/WKPluginInformation.cpp: Added.
* Shared/API/c/WKPluginInformation.h: Added.
Export new keys as SPI.

* Shared/Plugins/Netscape/PluginInformation.h: Added.
* Shared/Plugins/Netscape/PluginInformation.cpp: Added.
(WebKit::pluginInformationBundleIdentifierKey):
(WebKit::pluginInformationBundleVersionKey):
(WebKit::pluginInformationPathKey):
(WebKit::pluginInformationDisplayNameKey):
(WebKit::pluginInformationDefaultLoadPolicyKey):
(WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
(WebKit::pluginInformationHasSandboxProfileKey):
(WebKit::pluginInformationFrameURLKey):
(WebKit::pluginInformationMIMETypeKey):
(WebKit::pluginInformationPageURLKey):
(WebKit::pluginInformationPluginspageAttributeURLKey):
(WebKit::pluginInformationPluginURLKey):
Add new keys.

(WebKit::pluginModuleInformation):
(WebKit::createPluginInformationDictionary):
Add creation functions to simplify multiple sites.

* Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
(WebKit::platformPluginModuleInformation):
Add platform specific data to the dictionary.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetPluginInformationBundleIdentifierKey):
(WKPageGetPluginInformationBundleVersionKey):
(WKPageGetPluginInformationDisplayNameKey):
(WKPageGetPluginInformationFrameURLKey):
(WKPageGetPluginInformationMIMETypeKey):
(WKPageGetPluginInformationPageURLKey):
(WKPageGetPluginInformationPluginspageAttributeURLKey):
(WKPageGetPluginInformationPluginURLKey):
* UIProcess/API/C/WKPage.h:
Deprecate the old keys.

* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextCopyPlugInInfoForBundleIdentifier):
(WKContextGetInfoForInstalledPlugIns):
Simplify by using the new createPluginInformationDictionary functions.

(WKPlugInInfoPathKey):
(WKPlugInInfoBundleIdentifierKey):
(WKPlugInInfoVersionKey):
(WKPlugInInfoLoadPolicyKey):
(WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
(WKPlugInInfoIsSandboxedKey):
Deprecate the old keys.

* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didFailToInitializePlugin):
(WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
(WebKit::WebLoaderClient::pluginLoadPolicy):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::unavailablePluginButtonClicked):
* UIProcess/WebUIClient.h:
Optimize for the most recent callback type which takes a dictionary,
and pull out the necessary bits from it for deprecated callbacks as necessary.

* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::didFailToInitializePlugin):
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149904 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKPluginInformation.cpp [new file with mode: 0644]
Source/WebKit2/Shared/API/c/WKPluginInformation.h [new file with mode: 0644]
Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp [new file with mode: 0644]
Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h [new file with mode: 0644]
Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm [new file with mode: 0644]
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPage.h
Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h
Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm
Source/WebKit2/UIProcess/WebLoaderClient.cpp
Source/WebKit2/UIProcess/WebLoaderClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebUIClient.cpp
Source/WebKit2/UIProcess/WebUIClient.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

index 6098b4a..35941b1 100644 (file)
@@ -1,3 +1,93 @@
+2013-05-09  Sam Weinig  <sam@webkit.org>
+
+        Unify plug-in information dictionaries
+        <rdar://problem/13852080>
+        https://bugs.webkit.org/show_bug.cgi?id=115891
+
+        Reviewed by Anders Carlsson.
+
+        This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
+        and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.
+
+        All the old keys will continue to work, but have been deprecated in favor of new keys defined in 
+        WKPluginInformation.h
+
+        * Shared/API/c/WKPluginInformation.cpp: Added.
+        * Shared/API/c/WKPluginInformation.h: Added.
+        Export new keys as SPI.
+
+        * Shared/Plugins/Netscape/PluginInformation.h: Added.
+        * Shared/Plugins/Netscape/PluginInformation.cpp: Added.
+        (WebKit::pluginInformationBundleIdentifierKey):
+        (WebKit::pluginInformationBundleVersionKey):
+        (WebKit::pluginInformationPathKey):
+        (WebKit::pluginInformationDisplayNameKey):
+        (WebKit::pluginInformationDefaultLoadPolicyKey):
+        (WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
+        (WebKit::pluginInformationHasSandboxProfileKey):
+        (WebKit::pluginInformationFrameURLKey):
+        (WebKit::pluginInformationMIMETypeKey):
+        (WebKit::pluginInformationPageURLKey):
+        (WebKit::pluginInformationPluginspageAttributeURLKey):
+        (WebKit::pluginInformationPluginURLKey):
+        Add new keys.
+
+        (WebKit::pluginModuleInformation):
+        (WebKit::createPluginInformationDictionary):
+        Add creation functions to simplify multiple sites.
+
+        * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
+        (WebKit::platformPluginModuleInformation):
+        Add platform specific data to the dictionary.
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageGetPluginInformationBundleIdentifierKey):
+        (WKPageGetPluginInformationBundleVersionKey):
+        (WKPageGetPluginInformationDisplayNameKey):
+        (WKPageGetPluginInformationFrameURLKey):
+        (WKPageGetPluginInformationMIMETypeKey):
+        (WKPageGetPluginInformationPageURLKey):
+        (WKPageGetPluginInformationPluginspageAttributeURLKey):
+        (WKPageGetPluginInformationPluginURLKey):
+        * UIProcess/API/C/WKPage.h:
+        Deprecate the old keys.
+
+        * UIProcess/API/C/mac/WKContextPrivateMac.h:
+        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
+        (WKContextCopyPlugInInfoForBundleIdentifier):
+        (WKContextGetInfoForInstalledPlugIns):
+        Simplify by using the new createPluginInformationDictionary functions.
+
+        (WKPlugInInfoPathKey):
+        (WKPlugInInfoBundleIdentifierKey):
+        (WKPlugInInfoVersionKey):
+        (WKPlugInInfoLoadPolicyKey):
+        (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
+        (WKPlugInInfoIsSandboxedKey):
+        Deprecate the old keys.
+
+        * UIProcess/WebLoaderClient.cpp:
+        (WebKit::WebLoaderClient::didFailToInitializePlugin):
+        (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
+        (WebKit::WebLoaderClient::pluginLoadPolicy):
+        * UIProcess/WebLoaderClient.h:
+        * UIProcess/WebUIClient.cpp:
+        (WebKit::WebUIClient::unavailablePluginButtonClicked):
+        * UIProcess/WebUIClient.h:
+        Optimize for the most recent callback type which takes a dictionary,
+        and pull out the necessary bits from it for deprecated callbacks as necessary.
+
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::findPlugin):
+        (WebKit::WebPageProxy::unavailablePluginButtonClicked):
+        (WebKit::WebPageProxy::didFailToInitializePlugin):
+        (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
+        Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add new files.
+
 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
 
         Web Inspector: implement runOpenPanel callback for WebKit2 inspector
diff --git a/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp b/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp
new file mode 100644 (file)
index 0000000..ba67e4d
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2013 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 "WKPluginInformation.h"
+
+#include "PluginInformation.h"
+#include "WKSharedAPICast.h"
+#include "WebString.h"
+
+using namespace WebKit;
+
+WKStringRef WKPluginInformationBundleIdentifierKey()
+{
+    static WebString* key = WebString::create(pluginInformationBundleIdentifierKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationBundleVersionKey()
+{
+    static WebString* key = WebString::create(pluginInformationBundleVersionKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationPathKey()
+{
+    static WebString* key = WebString::create(pluginInformationPathKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationDisplayNameKey()
+{
+    static WebString* key = WebString::create(pluginInformationDisplayNameKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationDefaultLoadPolicyKey()
+{
+    static WebString* key = WebString::create(pluginInformationDefaultLoadPolicyKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey()
+{
+    static WebString* key = WebString::create(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationHasSandboxProfileKey()
+{
+    static WebString* key = WebString::create(pluginInformationHasSandboxProfileKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationFrameURLKey()
+{
+    static WebString* key = WebString::create(pluginInformationFrameURLKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationMIMETypeKey()
+{
+    static WebString* key = WebString::create(pluginInformationMIMETypeKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationPageURLKey()
+{
+    static WebString* key = WebString::create(pluginInformationPageURLKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationPluginspageAttributeURLKey()
+{
+    static WebString* key = WebString::create(pluginInformationPluginspageAttributeURLKey()).leakRef();
+    return toAPI(key);
+}
+
+WKStringRef WKPluginInformationPluginURLKey()
+{
+    static WebString* key = WebString::create(pluginInformationPluginURLKey()).leakRef();
+    return toAPI(key);
+}
diff --git a/Source/WebKit2/Shared/API/c/WKPluginInformation.h b/Source/WebKit2/Shared/API/c/WKPluginInformation.h
new file mode 100644 (file)
index 0000000..29b05ef
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2013 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 WKPluginInformation_h
+#define WKPluginInformation_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Plug-in module information keys */
+
+/* Value type: WKStringRef */
+WK_EXPORT WKStringRef WKPluginInformationBundleIdentifierKey();
+
+/* Value type: WKStringRef */
+WK_EXPORT WKStringRef WKPluginInformationBundleVersionKey();
+
+/* Value type: WKStringRef */
+WK_EXPORT WKStringRef WKPluginInformationPathKey();
+
+/* Value type: WKStringRef */
+WK_EXPORT WKStringRef WKPluginInformationDisplayNameKey();
+
+/* Value type: WKUInt64Ref */
+WK_EXPORT WKStringRef WKPluginInformationDefaultLoadPolicyKey();
+
+/* Value type: WKBooleanRef */
+WK_EXPORT WKStringRef WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey();
+
+/* Value type: WKBooleanRef */
+WK_EXPORT WKStringRef WKPluginInformationHasSandboxProfileKey();
+
+
+/* Plug-in load specific information keys */
+
+/* Value type: WKURLRef */
+WK_EXPORT WKStringRef WKPluginInformationFrameURLKey();
+
+/* Value type: WKStringRef */
+WK_EXPORT WKStringRef WKPluginInformationMIMETypeKey();
+
+/* Value type: WKURLRef */
+WK_EXPORT WKStringRef WKPluginInformationPageURLKey();
+
+/* Value type: WKURLRef */
+WK_EXPORT WKStringRef WKPluginInformationPluginspageAttributeURLKey();
+
+/* Value type: WKURLRef */
+WK_EXPORT WKStringRef WKPluginInformationPluginURLKey();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKPluginInformation_h */
diff --git a/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp b/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp
new file mode 100644 (file)
index 0000000..dc602d3
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2013 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 "PluginInformation.h"
+
+#include "PluginInfoStore.h"
+#include "PluginModuleInfo.h"
+#include "WKAPICast.h"
+#include "WebNumber.h"
+#include "WebString.h"
+#include "WebURL.h"
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+
+String pluginInformationBundleIdentifierKey()
+{
+    return ASCIILiteral("PluginInformationBundleIdentifier");
+}
+
+String pluginInformationBundleVersionKey()
+{
+    return ASCIILiteral("PluginInformationBundleVersion");
+}
+
+String pluginInformationPathKey()
+{
+    return ASCIILiteral("PluginInformationPath");
+}
+
+String pluginInformationDisplayNameKey()
+{
+    return ASCIILiteral("PluginInformationDisplayName");
+}
+
+String pluginInformationDefaultLoadPolicyKey()
+{
+    return ASCIILiteral("PluginInformationDefaultLoadPolicy");
+}
+
+String pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey()
+{
+    return ASCIILiteral("PluginInformationUpdatePastLastBlockedVersionIsKnownAvailable");
+}
+
+String pluginInformationHasSandboxProfileKey()
+{
+    return ASCIILiteral("PluginInformationHasSandboxProfile");
+}
+
+String pluginInformationFrameURLKey()
+{
+    return ASCIILiteral("PluginInformationFrameURL");
+}
+
+String pluginInformationMIMETypeKey()
+{
+    return ASCIILiteral("PluginInformationMIMEType");
+}
+
+String pluginInformationPageURLKey()
+{
+    return ASCIILiteral("PluginInformationPageURL");
+}
+
+String pluginInformationPluginspageAttributeURLKey()
+{
+    return ASCIILiteral("PluginInformationPluginspageAttributeURL");
+}
+
+String pluginInformationPluginURLKey()
+{
+    return ASCIILiteral("PluginInformationPluginURL");
+}
+
+void getPluginModuleInformation(const PluginModuleInfo& plugin, ImmutableDictionary::MapType& map)
+{
+    map.set(pluginInformationPathKey(), WebString::create(plugin.path));
+    map.set(pluginInformationDisplayNameKey(), WebString::create(plugin.info.name));
+    map.set(pluginInformationDefaultLoadPolicyKey(), WebUInt64::create(toWKPluginLoadPolicy(PluginInfoStore::policyForPlugin(plugin))));
+
+    getPlatformPluginModuleInformation(plugin, map);
+}
+
+PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin)
+{
+    ImmutableDictionary::MapType map;
+    getPluginModuleInformation(plugin, map);
+
+    return ImmutableDictionary::adopt(map);
+}
+
+PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString)
+{
+    ImmutableDictionary::MapType map;
+    getPluginModuleInformation(plugin, map);
+
+    if (!frameURLString.isEmpty())
+        map.set(pluginInformationFrameURLKey(), WebURL::create(frameURLString));
+    if (!mimeType.isEmpty())
+        map.set(pluginInformationMIMETypeKey(), WebString::create(mimeType));
+    if (!pageURLString.isEmpty())
+        map.set(pluginInformationPageURLKey(), WebURL::create(pageURLString));
+    if (!pluginspageAttributeURLString.isEmpty())
+        map.set(pluginInformationPluginspageAttributeURLKey(), WebURL::create(pluginspageAttributeURLString));
+    if (!pluginURLString.isEmpty())
+        map.set(pluginInformationPluginURLKey(), WebURL::create(pluginURLString));
+
+    return ImmutableDictionary::adopt(map);
+}
+
+PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString)
+{
+    ImmutableDictionary::MapType map;
+
+    if (!frameURLString.isEmpty())
+        map.set(pluginInformationFrameURLKey(), WebURL::create(frameURLString));
+    if (!mimeType.isEmpty())
+        map.set(pluginInformationMIMETypeKey(), WebString::create(mimeType));
+    if (!pageURLString.isEmpty())
+        map.set(pluginInformationPageURLKey(), WebURL::create(pageURLString));
+
+    return ImmutableDictionary::adopt(map);
+}
+
+#if !PLATFORM(MAC)
+void getPlatformPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&)
+{
+}
+#endif
+
+} // namespace WebKit
diff --git a/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h b/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h
new file mode 100644 (file)
index 0000000..74b0288
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2013 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 PluginInformation_h
+#define PluginInformation_h
+
+#include "ImmutableDictionary.h"
+#include <wtf/Forward.h>
+
+namespace WebKit {
+
+struct PluginModuleInfo;
+
+// Plug-in module information keys
+String pluginInformationBundleIdentifierKey();
+String pluginInformationBundleVersionKey();
+String pluginInformationPathKey();
+String pluginInformationDisplayNameKey();
+String pluginInformationDefaultLoadPolicyKey();
+String pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey();
+String pluginInformationHasSandboxProfileKey();
+
+// Plug-in load specific information keys
+String pluginInformationFrameURLKey();
+String pluginInformationMIMETypeKey();
+String pluginInformationPageURLKey();
+String pluginInformationPluginspageAttributeURLKey();
+String pluginInformationPluginURLKey();
+
+PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo&);
+PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo&, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString);
+PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString);
+
+
+void getPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&);
+void getPlatformPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&);
+
+} // namespace WebKit
+
+#endif // PluginInformation_h
diff --git a/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm b/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm
new file mode 100644 (file)
index 0000000..6cdbe3e
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2013 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.
+ */
+
+#import "config.h"
+#import "PluginInformation.h"
+
+#import "PluginModuleInfo.h"
+#import "PluginSandboxProfile.h"
+#import "StringUtilities.h"
+#import "WebNumber.h"
+#import "WebString.h"
+#import <WebKitSystemInterface.h>
+
+namespace WebKit {
+
+void getPlatformPluginModuleInformation(const PluginModuleInfo& plugin, ImmutableDictionary::MapType& map)
+{
+    map.set(pluginInformationBundleIdentifierKey(), WebString::create(plugin.bundleIdentifier));
+    map.set(pluginInformationBundleVersionKey(), WebString::create(plugin.versionString));
+    map.set(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey(), WebBoolean::create(WKIsPluginUpdateAvailable(nsStringFromWebCoreString(plugin.bundleIdentifier))));
+    map.set(pluginInformationHasSandboxProfileKey(), WebBoolean::create(pluginHasSandboxProfile(plugin.bundleIdentifier)));
+}
+
+} // namespace WebKit
index e9ae2a9..80aa5cb 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "PrintInfo.h"
 #include "WKAPICast.h"
+#include "WKPluginInformation.h"
 #include "WebBackForwardList.h"
 #include "WebData.h"
 #include "WebPageProxy.h"
@@ -826,6 +827,28 @@ void WKPageSetMayStartMediaWhenInWindow(WKPageRef pageRef, bool mayStartMedia)
     toImpl(pageRef)->setMayStartMediaWhenInWindow(mayStartMedia);
 }
 
+
+void WKPageSetOverridePrivateBrowsingEnabled(WKPageRef pageRef, bool enabled)
+{
+    toImpl(pageRef)->setOverridePrivateBrowsingEnabled(enabled);
+}
+
+bool WKPageGetOverridePrivateBrowsingEnabled(WKPageRef pageRef)
+{
+    return toImpl(pageRef)->overridePrivateBrowsingEnabled();
+}
+
+void WKPageSelectContextMenuItem(WKPageRef page, WKContextMenuItemRef item)
+{
+#if ENABLE(CONTEXT_MENUS)
+    toImpl(page)->contextMenuItemSelected(*(toImpl(item)->data()));
+#endif
+}
+
+
+
+// -- DEPRECATED --
+
 void WKPageSetInvalidMessageFunction(WKPageInvalidMessageFunction)
 {
     // FIXME: Remove this function when doing so won't break WebKit nightlies.
@@ -833,65 +856,43 @@ void WKPageSetInvalidMessageFunction(WKPageInvalidMessageFunction)
 
 WKStringRef WKPageGetPluginInformationBundleIdentifierKey()
 {
-    static WebString* key = WebString::create(WebPageProxy::pluginInformationBundleIdentifierKey()).leakRef();
-    return toAPI(key);
+    return WKPluginInformationBundleIdentifierKey();
 }
 
 WKStringRef WKPageGetPluginInformationBundleVersionKey()
 {
-    static WebString* key = WebString::create(WebPageProxy::pluginInformationBundleVersionKey()).leakRef();
-    return toAPI(key);
+    return WKPluginInformationBundleVersionKey();
 }
 
 WKStringRef WKPageGetPluginInformationDisplayNameKey()
 {
-    static WebString* key = WebString::create(WebPageProxy::pluginInformationDisplayNameKey()).leakRef();
-    return toAPI(key);
+    return WKPluginInformationBundleVersionKey();
 }
 
 WKStringRef WKPageGetPluginInformationFrameURLKey()
 {
-    static WebString* key = WebString::create(WebPageProxy::pluginInformationFrameURLKey()).leakRef();
-    return toAPI(key);
+    return WKPluginInformationFrameURLKey();
 }
 
 WKStringRef WKPageGetPluginInformationMIMETypeKey()
 {
-    static WebString* key = WebString::create(WebPageProxy::pluginInformationMIMETypeKey()).leakRef();
-    return toAPI(key);
+    return WKPluginInformationMIMETypeKey();
 }
 
 WKStringRef WKPageGetPluginInformationPageURLKey()
 {
-    static WebString* key = WebString::create(WebPageProxy::pluginInformationPageURLKey()).leakRef();
-    return toAPI(key);
+    return WKPluginInformationPageURLKey();
 }
 
 WKStringRef WKPageGetPluginInformationPluginspageAttributeURLKey()
 {
-    static WebString* key = WebString::create(WebPageProxy::pluginInformationPluginspageAttributeURLKey()).leakRef();
-    return toAPI(key);
+    return WKPluginInformationPluginspageAttributeURLKey();
 }
 
 WKStringRef WKPageGetPluginInformationPluginURLKey()
 {
-    static WebString* key = WebString::create(WebPageProxy::pluginInformationPluginURLKey()).leakRef();
-    return toAPI(key);
+    return WKPluginInformationPluginURLKey();
 }
 
-void WKPageSetOverridePrivateBrowsingEnabled(WKPageRef pageRef, bool enabled)
-{
-    toImpl(pageRef)->setOverridePrivateBrowsingEnabled(enabled);
-}
-
-bool WKPageGetOverridePrivateBrowsingEnabled(WKPageRef pageRef)
-{
-    return toImpl(pageRef)->overridePrivateBrowsingEnabled();
-}
+// -- DEPRECATED --
 
-void WKPageSelectContextMenuItem(WKPageRef page, WKContextMenuItemRef item)
-{
-#if ENABLE(CONTEXT_MENUS)
-    toImpl(page)->contextMenuItemSelected(*(toImpl(item)->data()));
-#endif
-}
index f26e3b9..96a7bbb 100644 (file)
@@ -531,6 +531,12 @@ WK_EXPORT void WKPageExecuteCommand(WKPageRef page, WKStringRef command);
 
 WK_EXPORT void WKPagePostMessageToInjectedBundle(WKPageRef page, WKStringRef messageName, WKTypeRef messageBody);
 
+WK_EXPORT void WKPageSelectContextMenuItem(WKPageRef page, WKContextMenuItemRef item);
+
+
+
+/* DEPRECATED -  Please use constants from WKPluginInformation instead. */
+
 /* Value type: WKStringRef */
 WK_EXPORT WKStringRef WKPageGetPluginInformationBundleIdentifierKey();
 
@@ -555,9 +561,6 @@ WK_EXPORT WKStringRef WKPageGetPluginInformationPluginspageAttributeURLKey();
 /* Value type: WKURLRef */
 WK_EXPORT WKStringRef WKPageGetPluginInformationPluginURLKey();
 
-WK_EXPORT void WKPageSelectContextMenuItem(WKPageRef page, WKContextMenuItemRef item);
-
-
 #ifdef __cplusplus
 }
 #endif
index 52238ce..49a791b 100644 (file)
@@ -37,6 +37,13 @@ WK_EXPORT void WKContextSetProcessSuppressionEnabled(WKContextRef context, bool
 
 WK_EXPORT bool WKContextIsPlugInUpdateAvailable(WKContextRef context, WKStringRef plugInBundleIdentifier);
 
+WK_EXPORT WKDictionaryRef WKContextCopyPlugInInfoForBundleIdentifier(WKContextRef context, WKStringRef plugInBundleIdentifier);
+
+typedef void (^WKContextGetInfoForInstalledPlugInsBlock)(WKArrayRef, WKErrorRef);
+WK_EXPORT void WKContextGetInfoForInstalledPlugIns(WKContextRef context, WKContextGetInfoForInstalledPlugInsBlock block);
+
+
+/* DEPRECATED -  Please use constants from WKPluginInformation instead. */
 
 /* Value type: WKStringRef */
 WK_EXPORT WKStringRef WKPlugInInfoPathKey();
@@ -56,11 +63,6 @@ WK_EXPORT WKStringRef WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKe
 /* Value type: WKBooleanRef */
 WK_EXPORT WKStringRef WKPlugInInfoIsSandboxedKey();
 
-WK_EXPORT WKDictionaryRef WKContextCopyPlugInInfoForBundleIdentifier(WKContextRef context, WKStringRef plugInBundleIdentifier);
-
-typedef void (^WKContextGetInfoForInstalledPlugInsBlock)(WKArrayRef, WKErrorRef);
-WK_EXPORT void WKContextGetInfoForInstalledPlugIns(WKContextRef context, WKContextGetInfoForInstalledPlugInsBlock block);
-
 #ifdef __cplusplus
 }
 #endif
index 9606fff..7dae40e 100644 (file)
 #import "ImmutableArray.h"
 #import "ImmutableDictionary.h"
 #import "PluginInfoStore.h"
+#import "PluginInformation.h"
 #import "PluginSandboxProfile.h"
 #import "StringUtilities.h"
 #import "WKAPICast.h"
+#import "WKPluginInformation.h"
 #import "WKSharedAPICast.h"
 #import "WKStringCF.h"
 #import "WebContext.h"
@@ -57,63 +59,13 @@ bool WKContextIsPlugInUpdateAvailable(WKContextRef contextRef, WKStringRef plugI
     return WKIsPluginUpdateAvailable((NSString *)adoptCF(WKStringCopyCFString(kCFAllocatorDefault, plugInBundleIdentifierRef)).get());
 }
 
-
-WKStringRef WKPlugInInfoPathKey()
-{
-    static WebString* key = WebString::createFromUTF8String("WKPlugInInfoPath").leakRef();
-    return toAPI(key);
-}
-
-WKStringRef WKPlugInInfoBundleIdentifierKey()
-{
-    static WebString* key = WebString::createFromUTF8String("WKPlugInInfoBundleIdentifier").leakRef();
-    return toAPI(key);
-}
-
-WKStringRef WKPlugInInfoVersionKey()
-{
-    static WebString* key = WebString::createFromUTF8String("WKPlugInInfoVersion").leakRef();
-    return toAPI(key);
-}
-
-WKStringRef WKPlugInInfoLoadPolicyKey()
-{
-    static WebString* key = WebString::createFromUTF8String("WKPlugInInfoLoadPolicy").leakRef();
-    return toAPI(key);
-}
-
-WKStringRef WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey()
-{
-    static WebString* key = WebString::createFromUTF8String("WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailable").leakRef();
-    return toAPI(key);
-}
-
-WKStringRef WKPlugInInfoIsSandboxedKey()
-{
-    static WebString* key = WebString::createFromUTF8String("WKPlugInInfoIsSandboxed").leakRef();
-    return toAPI(key);
-}
-
-static PassRefPtr<ImmutableDictionary> createInfoDictionary(const PluginModuleInfo& info)
-{
-    ImmutableDictionary::MapType map;
-    map.set(toWTFString(WKPlugInInfoPathKey()), WebString::create(info.path));
-    map.set(toWTFString(WKPlugInInfoBundleIdentifierKey()), WebString::create(info.bundleIdentifier));
-    map.set(toWTFString(WKPlugInInfoVersionKey()), WebString::create(info.versionString));
-    map.set(toWTFString(WKPlugInInfoLoadPolicyKey()), WebUInt64::create(toWKPluginLoadPolicy(PluginInfoStore::policyForPlugin(info))));
-    map.set(toWTFString(WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey()), WebBoolean::create(WKIsPluginUpdateAvailable(nsStringFromWebCoreString(info.bundleIdentifier))));
-    map.set(toWTFString(WKPlugInInfoIsSandboxedKey()), WebBoolean::create(pluginHasSandboxProfile(info.bundleIdentifier)));
-
-    return ImmutableDictionary::adopt(map);
-}
-
 WKDictionaryRef WKContextCopyPlugInInfoForBundleIdentifier(WKContextRef contextRef, WKStringRef plugInBundleIdentifierRef)
 {
     PluginModuleInfo plugin = toImpl(contextRef)->pluginInfoStore().findPluginWithBundleIdentifier(toWTFString(plugInBundleIdentifierRef));
     if (plugin.path.isNull())
         return 0;
 
-    RefPtr<ImmutableDictionary> dictionary = createInfoDictionary(plugin);
+    RefPtr<ImmutableDictionary> dictionary = createPluginInformationDictionary(plugin);
     return toAPI(dictionary.release().leakRef());
 }
 
@@ -123,7 +75,7 @@ void WKContextGetInfoForInstalledPlugIns(WKContextRef contextRef, WKContextGetIn
 
     Vector<RefPtr<APIObject>> pluginInfoDictionaries;
     for (const auto& plugin: plugins)
-        pluginInfoDictionaries.append(createInfoDictionary(plugin));
+        pluginInfoDictionaries.append(createPluginInformationDictionary(plugin));
 
     RefPtr<ImmutableArray> array = ImmutableArray::adopt(pluginInfoDictionaries);
 
@@ -134,3 +86,36 @@ void WKContextGetInfoForInstalledPlugIns(WKContextRef contextRef, WKContextGetIn
         toImpl(contextRef)->deref();
     });
 }
+
+
+/* DEPRECATED -  Please use constants from WKPluginInformation instead. */
+
+WKStringRef WKPlugInInfoPathKey()
+{
+    return WKPluginInformationPathKey();
+}
+
+WKStringRef WKPlugInInfoBundleIdentifierKey()
+{
+    return WKPluginInformationBundleIdentifierKey();
+}
+
+WKStringRef WKPlugInInfoVersionKey()
+{
+    return WKPluginInformationBundleVersionKey();
+}
+
+WKStringRef WKPlugInInfoLoadPolicyKey()
+{
+    return WKPluginInformationDefaultLoadPolicyKey();
+}
+
+WKStringRef WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey()
+{
+    return WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey();
+}
+
+WKStringRef WKPlugInInfoIsSandboxedKey()
+{
+    return WKPluginInformationHasSandboxProfileKey();
+}
index 745f1d2..d7a3a6d 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "ImmutableArray.h"
 #include "ImmutableDictionary.h"
+#include "PluginInformation.h"
 #include "WKAPICast.h"
 #include "WebBackForwardListItem.h"
 #include "WebPageProxy.h"
@@ -274,38 +275,56 @@ void WebLoaderClient::willGoToBackForwardListItem(WebPageProxy* page, WebBackFor
         m_client.willGoToBackForwardListItem(toAPI(page), toAPI(item), toAPI(userData), m_client.clientInfo);
 }
 
-void WebLoaderClient::didFailToInitializePlugin(WebPageProxy* page, const String& mimeType, const String& frameURLString, const String& pageURLString)
+void WebLoaderClient::didFailToInitializePlugin(WebPageProxy* page, ImmutableDictionary* pluginInformation)
 {
     if (m_client.didFailToInitializePlugin_deprecatedForUseWithV0)
-        m_client.didFailToInitializePlugin_deprecatedForUseWithV0(toAPI(page), toAPI(mimeType.impl()), m_client.clientInfo);
+        m_client.didFailToInitializePlugin_deprecatedForUseWithV0(
+            toAPI(page),
+            toAPI(pluginInformation->get<WebString>(pluginInformationMIMETypeKey())),
+            m_client.clientInfo);
 
     if (m_client.pluginDidFail_deprecatedForUseWithV1)
-        m_client.pluginDidFail_deprecatedForUseWithV1(toAPI(page), kWKErrorCodeCannotLoadPlugIn, toAPI(mimeType.impl()), 0, 0, m_client.clientInfo);
+        m_client.pluginDidFail_deprecatedForUseWithV1(
+            toAPI(page),
+            kWKErrorCodeCannotLoadPlugIn,
+            toAPI(pluginInformation->get<WebString>(pluginInformationMIMETypeKey())),
+            0,
+            0,
+            m_client.clientInfo);
 
-    if (m_client.pluginDidFail) {
-        RefPtr<ImmutableDictionary> pluginInformation = WebPageProxy::pluginInformationDictionary(String(), String(), String(), frameURLString, mimeType, pageURLString, String(), String());
-        m_client.pluginDidFail(toAPI(page), kWKErrorCodeCannotLoadPlugIn, toAPI(pluginInformation.get()), m_client.clientInfo);
-    }
+    if (m_client.pluginDidFail)
+        m_client.pluginDidFail(
+            toAPI(page),
+            kWKErrorCodeCannotLoadPlugIn,
+            toAPI(pluginInformation),
+            m_client.clientInfo);
 }
 
-void WebLoaderClient::didBlockInsecurePluginVersion(WebPageProxy* page, const String& mimeType, const String& pluginBundleIdentifier, const String& pluginBundleVersion, const String& frameURLString, const String& pageURLString)
+void WebLoaderClient::didBlockInsecurePluginVersion(WebPageProxy* page, ImmutableDictionary* pluginInformation)
 {
     if (m_client.pluginDidFail_deprecatedForUseWithV1)
-        m_client.pluginDidFail_deprecatedForUseWithV1(toAPI(page), kWKErrorCodeInsecurePlugInVersion, toAPI(mimeType.impl()), toAPI(pluginBundleIdentifier.impl()), toAPI(pluginBundleVersion.impl()), m_client.clientInfo);
+        m_client.pluginDidFail_deprecatedForUseWithV1(
+            toAPI(page),
+            kWKErrorCodeInsecurePlugInVersion,
+            toAPI(pluginInformation->get<WebString>(pluginInformationMIMETypeKey())),
+            toAPI(pluginInformation->get<WebString>(pluginInformationBundleIdentifierKey())),
+            toAPI(pluginInformation->get<WebString>(pluginInformationBundleVersionKey())),
+            m_client.clientInfo);
 
-    if (m_client.pluginDidFail) {
-        RefPtr<ImmutableDictionary> pluginInformation = WebPageProxy::pluginInformationDictionary(pluginBundleIdentifier, pluginBundleVersion, String(), frameURLString, mimeType, pageURLString, String(), String());
-        m_client.pluginDidFail(toAPI(page), kWKErrorCodeInsecurePlugInVersion, toAPI(pluginInformation.get()), m_client.clientInfo);
-    }
+    if (m_client.pluginDidFail)
+        m_client.pluginDidFail(
+            toAPI(page),
+            kWKErrorCodeInsecurePlugInVersion,
+            toAPI(pluginInformation),
+            m_client.clientInfo);
 }
 
-PluginModuleLoadPolicy WebLoaderClient::pluginLoadPolicy(WebPageProxy* page, const String& pluginBundleIdentifier, const String& pluginBundleVersion, const String& displayName, const String& frameURLString, const String& pageURLString, PluginModuleLoadPolicy currentPluginLoadPolicy)
+PluginModuleLoadPolicy WebLoaderClient::pluginLoadPolicy(WebPageProxy* page, PluginModuleLoadPolicy currentPluginLoadPolicy, ImmutableDictionary* pluginInformation)
 {
     if (!m_client.pluginLoadPolicy)
         return currentPluginLoadPolicy;
 
-    RefPtr<ImmutableDictionary> pluginInformation = WebPageProxy::pluginInformationDictionary(pluginBundleIdentifier, pluginBundleVersion, displayName, frameURLString, String(), pageURLString, String(), String());
-    return toPluginModuleLoadPolicy(m_client.pluginLoadPolicy(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation.get()), m_client.clientInfo));
+    return toPluginModuleLoadPolicy(m_client.pluginLoadPolicy(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation), m_client.clientInfo));
 }
 
 } // namespace WebKit
index f4ac787..c2a0384 100644 (file)
@@ -44,6 +44,7 @@ namespace WebKit {
 class APIObject;
 class AuthenticationChallengeProxy;
 class AuthenticationDecisionListener;
+class ImmutableDictionary;
 class WebBackForwardListItem;
 class WebFrameProxy;
 class WebPageProxy;
@@ -89,10 +90,9 @@ public:
     bool shouldGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*);
     void willGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*, APIObject*);
 
-    PluginModuleLoadPolicy pluginLoadPolicy(WebPageProxy*, const String& pluginBundleIdentifier, const String& pluginBundleVersion, const String& displayName, const String& frameURLString, const String& pageURLString, PluginModuleLoadPolicy currentPluginLoadPolicy);
-    void didFailToInitializePlugin(WebPageProxy*, const String& mimeType, const String& frameURLString, const String& pageURLString);
-    void didBlockInsecurePluginVersion(WebPageProxy*, const String& mimeType, const String& pluginBundleIdentifier, const String& pluginBundleVersion, const String& frameURLString, const String& pageURLString);
-
+    PluginModuleLoadPolicy pluginLoadPolicy(WebPageProxy*, PluginModuleLoadPolicy currentPluginLoadPolicy, ImmutableDictionary*);
+    void didFailToInitializePlugin(WebPageProxy*, ImmutableDictionary*);
+    void didBlockInsecurePluginVersion(WebPageProxy*, ImmutableDictionary*);
 };
 
 } // namespace WebKit
index 23aed66..40cf4bc 100644 (file)
@@ -43,6 +43,7 @@
 #include "NotificationPermissionRequest.h"
 #include "NotificationPermissionRequestManager.h"
 #include "PageClient.h"
+#include "PluginInformation.h"
 #include "PrintInfo.h"
 #include "SessionState.h"
 #include "TextChecker.h"
@@ -1391,8 +1392,8 @@ void WebPageProxy::findPlugin(const String& mimeType, const String& urlString, c
     MESSAGE_CHECK_URL(urlString);
 
     newMimeType = mimeType.lower();
-
     pluginLoadPolicy = PluginModuleLoadNormally;
+    
     PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), urlString));
     if (!plugin.path)
         return;
@@ -1400,8 +1401,8 @@ void WebPageProxy::findPlugin(const String& mimeType, const String& urlString, c
     pluginLoadPolicy = PluginInfoStore::policyForPlugin(plugin);
 
 #if PLATFORM(MAC)
-    PluginModuleLoadPolicy currentPluginLoadPolicy = static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy);
-    pluginLoadPolicy = m_loaderClient.pluginLoadPolicy(this, plugin.bundleIdentifier, plugin.versionString, plugin.info.name, frameURLString, pageURLString, currentPluginLoadPolicy);
+    RefPtr<ImmutableDictionary> pluginInformation = createPluginInformationDictionary(plugin, frameURLString, String(), pageURLString, String(), String());
+    pluginLoadPolicy = m_loaderClient.pluginLoadPolicy(this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get());
 #else
     UNUSED_PARAM(frameURLString);
     UNUSED_PARAM(pageURLString);
@@ -2700,69 +2701,6 @@ void WebPageProxy::connectionWillClose(CoreIPC::Connection* connection)
     m_process->context()->storageManager().setAllowedSessionStorageNamespaceConnection(m_pageID, 0);
 }
 
-String WebPageProxy::pluginInformationBundleIdentifierKey()
-{
-    return ASCIILiteral("PluginInformationBundleIdentifier");
-}
-
-String WebPageProxy::pluginInformationBundleVersionKey()
-{
-    return ASCIILiteral("PluginInformationBundleVersion");
-}
-
-String WebPageProxy::pluginInformationDisplayNameKey()
-{
-    return ASCIILiteral("PluginInformationDisplayName");
-}
-
-String WebPageProxy::pluginInformationFrameURLKey()
-{
-    return ASCIILiteral("PluginInformationFrameURL");
-}
-
-String WebPageProxy::pluginInformationMIMETypeKey()
-{
-    return ASCIILiteral("PluginInformationMIMEType");
-}
-
-String WebPageProxy::pluginInformationPageURLKey()
-{
-    return ASCIILiteral("PluginInformationPageURL");
-}
-
-String WebPageProxy::pluginInformationPluginspageAttributeURLKey()
-{
-    return ASCIILiteral("PluginInformationPluginspageAttributeURL");
-}
-
-String WebPageProxy::pluginInformationPluginURLKey()
-{
-    return ASCIILiteral("PluginInformationPluginURL");
-}
-
-PassRefPtr<ImmutableDictionary> WebPageProxy::pluginInformationDictionary(const String& bundleIdentifier, const String& bundleVersion, const String& displayName, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString)
-{
-    HashMap<String, RefPtr<APIObject>> pluginInfoMap;
-    if (!bundleIdentifier.isEmpty())
-        pluginInfoMap.set(WebPageProxy::pluginInformationBundleIdentifierKey(), WebString::create(bundleIdentifier));
-    if (!bundleVersion.isEmpty())
-        pluginInfoMap.set(WebPageProxy::pluginInformationBundleVersionKey(), WebString::create(bundleVersion));
-    if (!displayName.isEmpty())
-        pluginInfoMap.set(WebPageProxy::pluginInformationDisplayNameKey(), WebString::create(displayName));
-    if (!frameURLString.isEmpty())
-        pluginInfoMap.set(WebPageProxy::pluginInformationFrameURLKey(), WebURL::create(frameURLString));
-    if (!mimeType.isEmpty())
-        pluginInfoMap.set(WebPageProxy::pluginInformationMIMETypeKey(), WebString::create(mimeType));
-    if (!pageURLString.isEmpty())
-        pluginInfoMap.set(WebPageProxy::pluginInformationPageURLKey(), WebURL::create(pageURLString));
-    if (!pluginspageAttributeURLString.isEmpty())
-        pluginInfoMap.set(WebPageProxy::pluginInformationPluginspageAttributeURLKey(), WebURL::create(pluginspageAttributeURLString));
-    if (!pluginURLString.isEmpty())
-        pluginInfoMap.set(WebPageProxy::pluginInformationPluginURLKey(), WebURL::create(pluginURLString));
-
-    return ImmutableDictionary::adopt(pluginInfoMap);
-}
-
 void WebPageProxy::unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginspageAttributeURLString, const String& frameURLString, const String& pageURLString)
 {
     MESSAGE_CHECK_URL(pluginURLString);
@@ -2770,17 +2708,11 @@ void WebPageProxy::unavailablePluginButtonClicked(uint32_t opaquePluginUnavailab
     MESSAGE_CHECK_URL(frameURLString);
     MESSAGE_CHECK_URL(pageURLString);
 
-    String pluginBundleIdentifier;
-    String pluginBundleVersion;
-    String pluginName;
-    String newMimeType = mimeType;
+    RefPtr<ImmutableDictionary> pluginInformation;
 #if ENABLE(NETSCAPE_PLUGIN_API)
+    String newMimeType = mimeType;
     PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), pluginURLString));
-#if PLATFORM(MAC)
-    pluginBundleIdentifier = plugin.bundleIdentifier;
-    pluginBundleVersion = plugin.versionString;
-#endif
-    pluginName = plugin.info.name;
+    pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, pluginspageAttributeURLString, pluginURLString);
 #endif
 
     WKPluginUnavailabilityReason pluginUnavailabilityReason = kWKPluginUnavailabilityReasonPluginMissing;
@@ -2809,7 +2741,7 @@ void WebPageProxy::unavailablePluginButtonClicked(uint32_t opaquePluginUnavailab
         ASSERT_NOT_REACHED();
     }
 
-    m_uiClient.unavailablePluginButtonClicked(this, pluginUnavailabilityReason, mimeType, pluginBundleIdentifier, pluginBundleVersion, pluginName, pluginURLString, pluginspageAttributeURLString, frameURLString, pageURLString);
+    m_uiClient.unavailablePluginButtonClicked(this, pluginUnavailabilityReason, pluginInformation.get());
 }
 
 void WebPageProxy::setToolbarsAreVisible(bool toolbarsAreVisible)
@@ -4202,26 +4134,22 @@ void WebPageProxy::didChangePageCount(unsigned pageCount)
 
 void WebPageProxy::didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString)
 {
-    m_loaderClient.didFailToInitializePlugin(this, mimeType, frameURLString, pageURLString);
+    m_loaderClient.didFailToInitializePlugin(this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get());
 }
 
-// FIXME: ENABLE(NETSCAPE_PLUGIN_API)
 void WebPageProxy::didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString)
 {
-    String pluginBundleIdentifier;
-    String pluginBundleVersion;
-    String newMimeType = mimeType;
+    RefPtr<ImmutableDictionary> pluginInformation;
 
 #if PLATFORM(MAC) && ENABLE(NETSCAPE_PLUGIN_API)
+    String newMimeType = mimeType;
     PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), pluginURLString));
-
-    pluginBundleIdentifier = plugin.bundleIdentifier;
-    pluginBundleVersion = plugin.versionString;
+    pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, String(), String());
 #else
     UNUSED_PARAM(pluginURLString);
 #endif
 
-    m_loaderClient.didBlockInsecurePluginVersion(this, newMimeType, pluginBundleIdentifier, pluginBundleVersion, frameURLString, pageURLString);
+    m_loaderClient.didBlockInsecurePluginVersion(this, pluginInformation.get());
 }
 
 bool WebPageProxy::willHandleHorizontalScrollEvents() const
index 20a5f54..1ef317f 100644 (file)
@@ -770,16 +770,6 @@ public:
     void connectionWillOpen(CoreIPC::Connection*);
     void connectionWillClose(CoreIPC::Connection*);
 
-    static String pluginInformationBundleIdentifierKey();
-    static String pluginInformationBundleVersionKey();
-    static String pluginInformationDisplayNameKey();
-    static String pluginInformationFrameURLKey();
-    static String pluginInformationMIMETypeKey();
-    static String pluginInformationPageURLKey();
-    static String pluginInformationPluginspageAttributeURLKey();
-    static String pluginInformationPluginURLKey();
-    static PassRefPtr<ImmutableDictionary> pluginInformationDictionary(const String& bundleIdentifier, const String& bundleVersion, const String& displayName, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString);
-
 private:
     WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
 
index a3dcc4c..bfa4d8e 100644 (file)
@@ -30,6 +30,7 @@
 #include "NativeWebKeyboardEvent.h"
 #include "NativeWebWheelEvent.h"
 #include "NotificationPermissionRequest.h"
+#include "PluginInformation.h"
 #include "WKAPICast.h"
 #include "WebColorPickerResultListenerProxy.h"
 #include "WebNumber.h"
@@ -175,20 +176,33 @@ void WebUIClient::mouseDidMoveOverElement(WebPageProxy* page, const WebHitTestRe
     m_client.mouseDidMoveOverElement(toAPI(page), toAPI(webHitTestResult.get()), toAPI(modifiers), toAPI(userData), m_client.clientInfo);
 }
 
-void WebUIClient::unavailablePluginButtonClicked(WebPageProxy* page, WKPluginUnavailabilityReason pluginUnavailabilityReason, const String& mimeType, const String& pluginBundleIdentifier, const String& pluginBundleVersion, const String& displayName, const String& pluginURLString, const String& pluginspageAttributeURLString, const String& frameURLString, const String& pageURLString)
+void WebUIClient::unavailablePluginButtonClicked(WebPageProxy* page, WKPluginUnavailabilityReason pluginUnavailabilityReason, ImmutableDictionary* pluginInformation)
 {
     if (pluginUnavailabilityReason == kWKPluginUnavailabilityReasonPluginMissing) {
         if (m_client.missingPluginButtonClicked_deprecatedForUseWithV0)
-            m_client.missingPluginButtonClicked_deprecatedForUseWithV0(toAPI(page), toAPI(mimeType.impl()), toAPI(pluginURLString.impl()), toAPI(pluginspageAttributeURLString.impl()), m_client.clientInfo);
+            m_client.missingPluginButtonClicked_deprecatedForUseWithV0(
+                toAPI(page),
+                toAPI(pluginInformation->get<WebString>(pluginInformationMIMETypeKey())),
+                toAPI(pluginInformation->get<WebString>(pluginInformationPluginURLKey())),
+                toAPI(pluginInformation->get<WebString>(pluginInformationPluginspageAttributeURLKey())),
+                m_client.clientInfo);
     }
 
     if (m_client.unavailablePluginButtonClicked_deprecatedForUseWithV1)
-        m_client.unavailablePluginButtonClicked_deprecatedForUseWithV1(toAPI(page), pluginUnavailabilityReason, toAPI(mimeType.impl()), toAPI(pluginURLString.impl()), toAPI(pluginspageAttributeURLString.impl()), m_client.clientInfo);
-
-    if (m_client.unavailablePluginButtonClicked) {
-        RefPtr<ImmutableDictionary> pluginInformation = WebPageProxy::pluginInformationDictionary(pluginBundleIdentifier, pluginBundleVersion, displayName, frameURLString, mimeType, pageURLString, pluginspageAttributeURLString, pluginURLString);
-        m_client.unavailablePluginButtonClicked(toAPI(page), pluginUnavailabilityReason, toAPI(pluginInformation.get()), m_client.clientInfo);
-    }
+        m_client.unavailablePluginButtonClicked_deprecatedForUseWithV1(
+            toAPI(page),
+            pluginUnavailabilityReason,
+            toAPI(pluginInformation->get<WebString>(pluginInformationMIMETypeKey())),
+            toAPI(pluginInformation->get<WebString>(pluginInformationPluginURLKey())),
+            toAPI(pluginInformation->get<WebString>(pluginInformationPluginspageAttributeURLKey())),
+            m_client.clientInfo);
+
+    if (m_client.unavailablePluginButtonClicked)
+        m_client.unavailablePluginButtonClicked(
+            toAPI(page),
+            pluginUnavailabilityReason,
+            toAPI(pluginInformation),
+            m_client.clientInfo);
 }
 
 bool WebUIClient::implementsDidNotHandleKeyEvent() const
index 47a1fa6..9813f57 100644 (file)
@@ -45,6 +45,7 @@ namespace WebKit {
 
 class APIObject;
 class GeolocationPermissionRequestProxy;
+class ImmutableDictionary;
 class NativeWebKeyboardEvent;
 class NativeWebWheelEvent;
 class NotificationPermissionRequest;
@@ -71,7 +72,7 @@ public:
 
     void setStatusText(WebPageProxy*, const String&);
     void mouseDidMoveOverElement(WebPageProxy*, const WebHitTestResult::Data&, WebEvent::Modifiers, APIObject*);
-    void unavailablePluginButtonClicked(WebPageProxy*, WKPluginUnavailabilityReason, const String& mimeType, const String& pluginBundleIdentifier, const String& pluginBundleVersion, const String& displayName, const String& pluginURLString, const String& pluginspageAttributeURLString, const String& frameURLString, const String& pageURLString);
+    void unavailablePluginButtonClicked(WebPageProxy*, WKPluginUnavailabilityReason, ImmutableDictionary*);
     
     bool implementsDidNotHandleKeyEvent() const;
     void didNotHandleKeyEvent(WebPageProxy*, const NativeWebKeyboardEvent&);
index 9cd9e5e..4153e95 100644 (file)
                762B748D120BC75C00819339 /* WKPreferencesPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 762B7484120BBA2D00819339 /* WKPreferencesPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7801C099142290C400FAF9AF /* WebHitTestResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7801C095142290C400FAF9AF /* WebHitTestResult.cpp */; };
                7801C09A142290C400FAF9AF /* WebHitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 7801C096142290C400FAF9AF /* WebHitTestResult.h */; };
+               7C135AA8173B0BCA00586AE2 /* WKPluginInformation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */; };
+               7C135AA9173B0BCA00586AE2 /* WKPluginInformation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C135AA7173B0BCA00586AE2 /* WKPluginInformation.h */; };
+               7C135AAC173B0CFF00586AE2 /* PluginInformationMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C135AAA173B0CFF00586AE2 /* PluginInformationMac.mm */; };
                7C387434172F5615001BD88A /* PageBanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C387433172F5615001BD88A /* PageBanner.cpp */; };
+               7C3F8C90173AF52D007B7F39 /* PluginInformation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C3F8C8E173AF52D007B7F39 /* PluginInformation.cpp */; };
+               7C3F8C91173AF52D007B7F39 /* PluginInformation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C3F8C8F173AF52D007B7F39 /* PluginInformation.h */; };
                7C6D37FC172F555F009D2847 /* PageBannerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C6D37FA172F555F009D2847 /* PageBannerMac.mm */; };
                7CB16FEF1724BA23007A0A95 /* com.apple.ist.ds.appleconnect.webplugin.sb in Copy Plug-in Sandbox Profiles */ = {isa = PBXBuildFile; fileRef = 7CB16FE21724B9B5007A0A95 /* com.apple.ist.ds.appleconnect.webplugin.sb */; };
                7CB16FF01724BA24007A0A95 /* com.apple.QuickTime Plugin.plugin.sb in Copy Plug-in Sandbox Profiles */ = {isa = PBXBuildFile; fileRef = 7CB16FE31724B9B5007A0A95 /* com.apple.QuickTime Plugin.plugin.sb */; };
                762B7484120BBA2D00819339 /* WKPreferencesPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPreferencesPrivate.h; sourceTree = "<group>"; };
                7801C095142290C400FAF9AF /* WebHitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebHitTestResult.cpp; sourceTree = "<group>"; };
                7801C096142290C400FAF9AF /* WebHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebHitTestResult.h; sourceTree = "<group>"; };
+               7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKPluginInformation.cpp; sourceTree = "<group>"; };
+               7C135AA7173B0BCA00586AE2 /* WKPluginInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPluginInformation.h; sourceTree = "<group>"; };
+               7C135AAA173B0CFF00586AE2 /* PluginInformationMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginInformationMac.mm; sourceTree = "<group>"; };
                7C387433172F5615001BD88A /* PageBanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageBanner.cpp; sourceTree = "<group>"; };
+               7C3F8C8E173AF52D007B7F39 /* PluginInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginInformation.cpp; sourceTree = "<group>"; };
+               7C3F8C8F173AF52D007B7F39 /* PluginInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginInformation.h; sourceTree = "<group>"; };
                7C6D37FA172F555F009D2847 /* PageBannerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PageBannerMac.mm; sourceTree = "<group>"; };
                7CB16FE21724B9B5007A0A95 /* com.apple.ist.ds.appleconnect.webplugin.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = com.apple.ist.ds.appleconnect.webplugin.sb; sourceTree = "<group>"; };
                7CB16FE31724B9B5007A0A95 /* com.apple.QuickTime Plugin.plugin.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "com.apple.QuickTime Plugin.plugin.sb"; sourceTree = "<group>"; };
                                1A4A9C9812B821C0008FE984 /* mac */,
                                1A4A9C5312B816CF008FE984 /* NetscapePluginModule.cpp */,
                                1A4A9C5412B816CF008FE984 /* NetscapePluginModule.h */,
+                               7C3F8C8E173AF52D007B7F39 /* PluginInformation.cpp */,
+                               7C3F8C8F173AF52D007B7F39 /* PluginInformation.h */,
                        );
                        path = Netscape;
                        sourceTree = "<group>";
                        isa = PBXGroup;
                        children = (
                                1A4A9C9912B821CD008FE984 /* NetscapePluginModuleMac.mm */,
+                               7C135AAA173B0CFF00586AE2 /* PluginInformationMac.mm */,
                        );
                        path = mac;
                        sourceTree = "<group>";
                                BC2D021812AC426C00E732A3 /* WKPageLoadTypes.h */,
                                93BDEB00171DD7AF00BFEE1B /* WKPageLoadTypesPrivate.h */,
                                A5EFD38B16B0E88C00B2F0E8 /* WKPageVisibilityTypes.h */,
+                               7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */,
+                               7C135AA7173B0BCA00586AE2 /* WKPluginInformation.h */,
                                37948406150C4B9600E52CE9 /* WKRenderLayer.cpp */,
                                37948407150C4B9600E52CE9 /* WKRenderLayer.h */,
                                37608820150414F700FC82C7 /* WKRenderObject.cpp */,
                                7CF47FFF17276AE3008ACB91 /* WKBundlePageBannerMac.h in Headers */,
                                7CF47FF717275B71008ACB91 /* WKBundlePageBanner.h in Headers */,
                                33D3A3C2133960B000709BE4 /* WebMediaCacheManager.h in Headers */,
+                               7C3F8C91173AF52D007B7F39 /* PluginInformation.h in Headers */,
                                33D3A3C91339617900709BE4 /* WebMediaCacheManagerMessages.h in Headers */,
                                33D3A3BB1339606200709BE4 /* WebMediaCacheManagerProxy.h in Headers */,
                                33D3A3CB1339617900709BE4 /* WebMediaCacheManagerProxyMessages.h in Headers */,
                                312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */,
                                1A1D8BA21731A36300141DA4 /* LocalStorageDatabase.h in Headers */,
                                BC407602124FF0270068F20A /* WKNumber.h in Headers */,
+                               7C135AA9173B0BCA00586AE2 /* WKPluginInformation.h in Headers */,
                                BC857FE612B843D800EDEB2E /* WKOpenPanelParameters.h in Headers */,
                                BC1DFE8F12B31CA8005DF730 /* WKOpenPanelResultListener.h in Headers */,
                                BCD597D7112B56DC00EC8C23 /* WKPage.h in Headers */,
                                51A7F2F5125BF8D4008AEB1D /* Logging.cpp in Sources */,
                                5160BFE113381DF900918999 /* Logging.mac.mm in Sources */,
                                1A24B5F211F531E800C38269 /* MachUtilities.cpp in Sources */,
+                               7C3F8C90173AF52D007B7F39 /* PluginInformation.cpp in Sources */,
                                1A232902162C867300D82F7A /* MessageDecoder.cpp in Sources */,
                                1A2328FE162C866A00D82F7A /* MessageEncoder.cpp in Sources */,
                                1A3EED0E161A535400AEB4F5 /* MessageReceiverMap.cpp in Sources */,
                                2D2ADF1016364D8200197E47 /* PDFPluginChoiceAnnotation.mm in Sources */,
                                2D2ADF0916362DD500197E47 /* PDFPluginTextAnnotation.mm in Sources */,
                                1AAF061512B01131008E49E2 /* PDFViewController.mm in Sources */,
+                               7C135AAC173B0CFF00586AE2 /* PluginInformationMac.mm in Sources */,
                                BCF505E81243047B005955AE /* PlatformCertificateInfo.mm in Sources */,
                                BCC43ABA127B95DC00317F16 /* PlatformPopupMenuData.cpp in Sources */,
                                1A6FB7D211E651E200DB1371 /* Plugin.cpp in Sources */,
                                1A8C728C1738477C000A6554 /* LocalStorageDatabaseTracker.cpp in Sources */,
                                BC857F8612B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp in Sources */,
                                BC857F7E12B82CEE00EDEB2E /* WebOpenPanelResultListenerProxy.cpp in Sources */,
+                               7C135AA8173B0BCA00586AE2 /* WKPluginInformation.cpp in Sources */,
                                BC963D6B113DD19200574BE2 /* WebPage.cpp in Sources */,
                                5153569C1291B1D2000749DC /* WebPageContextMenuClient.cpp in Sources */,
                                C06C6095124C144B0001682F /* WebPageCreationParameters.cpp in Sources */,