Simplify API::PolicyClient management
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 02:08:34 +0000 (02:08 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 02:08:34 +0000 (02:08 +0000)
commit6f8ce346dbfd2658bc4a87a5cf0f9bb17b5df6ee
tree86d66b468f10b22718fc22835515a56beb9a41a9
parent0d8088f35c3aab1d9b35c6dc2bcb3450b18a654b
Simplify API::PolicyClient management
https://bugs.webkit.org/show_bug.cgi?id=127529

Reviewed by Tim Horton.

Add default implementations to API::PolicyClient and change WebPageProxy::setPolicyClient to
always create a policy client, even if the policy object set is null. That way we don't have to null
check the policy client everywhere.

* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
(API::PolicyClient::unableToImplementPolicy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setPolicyClient):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::unableToImplementPolicy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/APIPolicyClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp