Add API::HistoryClient and split some things out of API::NavigationClient
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Feb 2015 23:46:18 +0000 (23:46 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Feb 2015 23:46:18 +0000 (23:46 +0000)
commitb8eb4eb7e3f22cf077d50fa8fb50b56ad6f32693
tree790fd9905dfbab70d5d8f48f4038893cf0ecfda9
parent28ed9fe520c08b15641bd820cf8fee75a855a9ed
Add API::HistoryClient and split some things out of API::NavigationClient
https://bugs.webkit.org/show_bug.cgi?id=141264

Reviewed by Darin Adler.

* UIProcess/API/APIHistoryClient.h: Added.
(API::HistoryClient::~HistoryClient):
(API::HistoryClient::didNavigateWithNavigationData):
(API::HistoryClient::didPerformClientRedirect):
(API::HistoryClient::didPerformServerRedirect):
(API::HistoryClient::didUpdateHistoryTitle):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didNavigateWithNavigationData): Deleted.
(API::NavigationClient::didPerformClientRedirect): Deleted.
(API::NavigationClient::didPerformServerRedirect): Deleted.
(API::NavigationClient::didUpdateHistoryTitle): Deleted.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createHistoryClient):
(WebKit::NavigationState::HistoryClient::HistoryClient):
(WebKit::NavigationState::HistoryClient::~HistoryClient):
(WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
(WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
(WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
(WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
(WebKit::NavigationState::NavigationClient::didNavigateWithNavigationData): Deleted.
(WebKit::NavigationState::NavigationClient::didPerformClientRedirect): Deleted.
(WebKit::NavigationState::NavigationClient::didPerformServerRedirect): Deleted.
(WebKit::NavigationState::NavigationClient::didUpdateHistoryTitle): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setHistoryClient):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
* UIProcess/WebPageProxy.h:
Add a API::HistoryClient and move the few things that belong on it out of API::NavigationClient.
Adjust accordingly in WebPageProxy and NavigationState.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView setNavigationDelegate:]):
(-[WKWebView setUIDelegate:]):
(-[WKWebView _setHistoryDelegate:]):
Lazily push the NavigationState/UIDelegate clients down to WebPageProxy upon
installation of a delegate, so that alternative (C SPI) delegate setters can
be separately created.

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/APIHistoryClient.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/APINavigationClient.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/Cocoa/NavigationState.h
Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj