Add API::{FrameInfo, NavigationAction, NavigationResponse} types
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 03:05:12 +0000 (03:05 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 03:05:12 +0000 (03:05 +0000)
commit4565859ff73b1d35abe9fbfaba33d47679255678
tree83343923877a4a76dfb5199551d02bf9fd37254f
parentdbfc72837dc174d6991bcfe2227aa1070bfe2556
Add API::{FrameInfo, NavigationAction, NavigationResponse} types
https://bugs.webkit.org/show_bug.cgi?id=140982

Reviewed by Sam Weinig.

Make C++ API objects for WK{FrameInfo, NavigationAction, NavigationResponse}
to wrap around, as a step towards moving Modern API logic down into WebPageProxy.

* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/APIFrameInfo.cpp: Added.
* UIProcess/API/APIFrameInfo.h: Added.
* UIProcess/API/APINavigationAction.h: Added.
* UIProcess/API/APINavigationResponse.h: Added.
Add API::FrameInfo, API::NavigationAction, and API::NavigationResponse.

* UIProcess/API/Cocoa/WKFrameInfo.mm:
* UIProcess/API/Cocoa/WKFrameInfoInternal.h:
Make WKFrameInfo a WKObject, wrapping a API::FrameInfo.

* UIProcess/API/Cocoa/WKNavigationAction.mm:
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
Make WKNavigationAction a WKObject, wrapping a API::NavigationAction.

* UIProcess/API/Cocoa/WKNavigationResponse.mm:
* UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
Make WKNavigationResponse a WKObject, wrapping a API::NavigationResponse.

* UIProcess/API/Cocoa/WKUserContentController.mm:
Adopt API::FrameInfo.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Adopt API::FrameInfo, and reorganize the code slightly.
Adopt API::NavigationAction.

(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
Adopt API::FrameInfo.
Adopt API::NavigationResponse.

(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
Adopt API::FrameInfo.

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
Adopt API::FrameInfo.

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/APIObject.h
Source/WebKit2/Shared/Cocoa/APIObject.mm
Source/WebKit2/UIProcess/API/APIFrameInfo.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/APIFrameInfo.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/APINavigationAction.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/APINavigationResponse.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm
Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h
Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.mm
Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj