[Cocoa] Notify the client when a navigation snapshot is taken
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Jul 2014 05:51:20 +0000 (05:51 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Jul 2014 05:51:20 +0000 (05:51 +0000)
commitc378efae8ace2074eaec0c90f23ec58f66e43f31
tree7a8896b9ad578af44dda95b8d4beb5eb0be63866
parent2274732e73ec47e6cca60535b5f9b3c7defbf497
[Cocoa] Notify the client when a navigation snapshot is taken
https://bugs.webkit.org/show_bug.cgi?id=134865

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize new flag in
m_navigationDelegateMethods.
(WebKit::NavigationState::willRecordNavigationSnapshot): Added. Calls the new
WKNavigationDelegate method.

* UIProcess/PageClient.h: Declared new client function.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willRecordNavigationSnapshot): Added. Calls the new client function.
* UIProcess/WebPageProxy.h:

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::willRecordNavigationSnapshot): Override that calls
NavigationState::willRecordNavigationSnapshot.

* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.

* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot): Added a call to
WebPageProxy::willRecordNavigationSnapshot.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h
Source/WebKit2/UIProcess/Cocoa/NavigationState.h
Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit2/UIProcess/mac/PageClientImpl.h
Source/WebKit2/UIProcess/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm