Pass a completion handler instead of a WebFramePolicyListenerProxy during policy...
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Sep 2017 01:39:00 +0000 (01:39 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Sep 2017 01:39:00 +0000 (01:39 +0000)
commitdcc0e1e8acadd458dc9bb6bbe6ed1d4fd4ace9e5
treeaec8c45a25cfc912395934581ca5fb4fa5b43568
parente9365b7c91743715ded83dc854f29b2357874100
Pass a completion handler instead of a WebFramePolicyListenerProxy during policy decisions
https://bugs.webkit.org/show_bug.cgi?id=177509

Reviewed by Tim Horton.

This makes WebFramePolicyListenerProxy just a wrapper around a WTF::Function which is only needed for the C and glib APIs.
This is a step towards making WebPageProxy::DecidePolicyForResponseSync and WebPageProxy::DecidePolicyForNavigationAction asynchronous.

This patch has no change in behavior.

* CMakeLists.txt:
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::decidePolicyForNavigationAction):
(API::NavigationClient::decidePolicyForNavigationResponse):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
* UIProcess/API/C/WKFramePolicyListener.cpp:
(WKFramePolicyListenerUseWithPolicies):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
(WKPageSetPageNavigationClient):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
* UIProcess/API/glib/WebKitPolicyClient.cpp:
* UIProcess/Automation/WebAutomationSession.cpp:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/RemoteWebInspectorProxy.cpp:
* UIProcess/WebFormSubmissionListenerProxy.h:
* UIProcess/WebFrameListenerProxy.cpp: Removed.
* UIProcess/WebFrameListenerProxy.h: Removed.
* UIProcess/WebFramePolicyListenerProxy.cpp:
(WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
(WebKit::WebFramePolicyListenerProxy::~WebFramePolicyListenerProxy):
(WebKit::WebFramePolicyListenerProxy::create):
(WebKit::WebFramePolicyListenerProxy::use):
(WebKit::WebFramePolicyListenerProxy::download):
(WebKit::WebFramePolicyListenerProxy::ignore):
* UIProcess/WebFramePolicyListenerProxy.h:
(WebKit::WebFramePolicyListenerProxy::create): Deleted.
(): Deleted.
(WebKit::WebFramePolicyListenerProxy::operator new): Deleted.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::webProcessWillShutDown):
(WebKit::WebFrameProxy::receivedPolicyDecision): Deleted.
(WebKit::WebFrameProxy::setUpPolicyListenerProxy): Deleted.
* UIProcess/WebFrameProxy.h:
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
(WebKit::WebPageProxy::receivedPolicyDecision): Deleted.
(WebKit::WebPageProxy::decidePolicyForResponse): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
* WebKit.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/APINavigationClient.h
Source/WebKit/UIProcess/API/APIPolicyClient.h
Source/WebKit/UIProcess/API/C/WKFramePolicyListener.cpp
Source/WebKit/UIProcess/API/C/WKPage.cpp
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm
Source/WebKit/UIProcess/API/glib/WebKitPolicyClient.cpp
Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
Source/WebKit/UIProcess/Cocoa/NavigationState.h
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp
Source/WebKit/UIProcess/WebFormSubmissionListenerProxy.h
Source/WebKit/UIProcess/WebFrameListenerProxy.cpp [deleted file]
Source/WebKit/UIProcess/WebFrameListenerProxy.h [deleted file]
Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp
Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h
Source/WebKit/UIProcess/WebFrameProxy.cpp
Source/WebKit/UIProcess/WebFrameProxy.h
Source/WebKit/UIProcess/WebInspectorProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm
Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj