Source/WebKit2: Add a new unavailablePluginButtonClicked callback that takes a WKDictionary of plug-in information
https://bugs.webkit.org/show_bug.cgi?id=110821

Reviewed by Beth Dakin.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetPluginInformationPluginspageAttributeURLKey):
(WKPageGetPluginInformationPluginURLKey):
Add two new API key getters.

* UIProcess/API/C/WKPage.h:
Add a new callback and deprecate the old callback.

* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didFailToInitializePlugin):
(WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
(WebKit::WebLoaderClient::pluginLoadPolicy):
Make the pluginInformationDictionary a static member function of WebPageProxy so it
can be called from WebUIClient as well.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getPluginPath):
Pass the bundle version as well.

(WebKit::WebPageProxy::pluginInformationPluginspageAttributeURLKey):
(WebKit::WebPageProxy::pluginInformationPluginURLKey):
Add two new keys.

(WebKit::WebPageProxy::pluginInformationDictionary):
Handle more keys.

(WebKit::WebPageProxy::unavailablePluginButtonClicked):
Get the plug-in bundle identifier and version.

* UIProcess/WebPageProxy.messages.in:
Pass along more information; the frame and page URLs.

* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::unavailablePluginButtonClicked):
Call the new callback if it's supported.

* UIProcess/WebUIClient.h:
(WebUIClient):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Update for API changes.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::unavailablePluginButtonClicked):
Ensure that the pluginspage attribute is a valid URL.

Tools: Add a new unavailablePluginButtonClicked callback that takes a WKDictionary of plug-in information
https://bugs.webkit.org/show_bug.cgi?id=110821
<rdar://problem/13265303>

Reviewed by Beth Dakin.

Update for WebKit2 changes.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::unavailablePluginButtonClicked):
* WebKitTestRunner/TestController.h:
(TestController):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed