Sprinkle some CTTE on API::PolicyClient and API::FormClient
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jan 2015 03:38:56 +0000 (03:38 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jan 2015 03:38:56 +0000 (03:38 +0000)
commitadddea62230cb2e530d3860e4f5d9d83f3476c39
treee3ef608405400a85c63be48a0c85b982d8321426
parent263f188466831e644acb9b61a93b15dc77e5dc37
Sprinkle some CTTE on API::PolicyClient and API::FormClient
https://bugs.webkit.org/show_bug.cgi?id=140656

Reviewed by Tim Horton.

- Use references rather than pointers where possible.
- Store and pass the listeners as Refs.
- Make API::FormClient more like API::PolicyClient by making it the
  responsibility of the client implementation to call the default policy.

* UIProcess/API/APIFormClient.h:
(API::FormClient::willSubmitForm):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
(API::PolicyClient::unableToImplementPolicy):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setFormDelegate:]):
* UIProcess/API/gtk/WebKitPolicyClient.cpp:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForNewWindowAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
* UIProcess/WebFormClient.cpp:
(WebKit::WebFormClient::willSubmitForm):
* UIProcess/WebFormClient.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::setUpPolicyListenerProxy):
(WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/APIFormClient.h
Source/WebKit2/UIProcess/API/APIPolicyClient.h
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.cpp
Source/WebKit2/UIProcess/Cocoa/NavigationState.h
Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
Source/WebKit2/UIProcess/WebFormClient.cpp
Source/WebKit2/UIProcess/WebFormClient.h
Source/WebKit2/UIProcess/WebFrameProxy.cpp
Source/WebKit2/UIProcess/WebFrameProxy.h
Source/WebKit2/UIProcess/WebPageProxy.cpp