Add WKNavigationDelegate SPI to tell the client when an insecure plug-in is blocked
authorjeffm@apple.com <jeffm@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Feb 2018 22:45:24 +0000 (22:45 +0000)
committerjeffm@apple.com <jeffm@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Feb 2018 22:45:24 +0000 (22:45 +0000)
commite858f313ce2abc63fad5305320acec2c1edc2263
tree5385256def2cdd54d51800dfa96183aae16a79fc
parentc26ae565fd65c0f4853e4b668f0a5a3f87478a65
Add WKNavigationDelegate SPI to tell the client when an insecure plug-in is blocked
https://bugs.webkit.org/show_bug.cgi?id=182540

Reviewed by Alex Christensen.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didBlockInsecurePluginVersion):
Changed to take a dictionary reference.

* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didBlockInsecurePluginVersion):
Added.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
Changed didBlockInsecurePluginVersion() to take a dictionary reference.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
Added -_webView:didBlockInsecurePluginVersionWithInfo:.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
Initialize webViewDidBlockInsecurePluginVersionWithInfo.

(WebKit::NavigationState::NavigationClient::didBlockInsecurePluginVersion):
Added.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
Remove check for PLATFORM(COCOA) (we don't check for this in didFailToInitializePlugin() where we
also use createPluginInformationDictionary()) and ENABLE(NETSCAPE_PLUGIN_API) (we're already inside
an #if ENABLE(NETSCAPE_PLUGIN_API block) and use auto for pluginInformation. Attempt to use the
navigation client before the loader client.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/APILoaderClient.h
Source/WebKit/UIProcess/API/APINavigationClient.h
Source/WebKit/UIProcess/API/C/WKPage.cpp
Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h
Source/WebKit/UIProcess/Cocoa/NavigationState.h
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/WebPageProxy.cpp