Clients should be notified when a page preview finishes
authorconrad_shultz@apple.com <conrad_shultz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Nov 2014 23:59:41 +0000 (23:59 +0000)
committerconrad_shultz@apple.com <conrad_shultz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Nov 2014 23:59:41 +0000 (23:59 +0000)
commit35448470983b8453afc600b0fd23b055c749f1f8
treea3880bd7aef02c14867d6ddd7fb42eef1d1990a3
parent02604eb7e9cfb9ca27fb328dd6d6eee0b58a5a1e
Clients should be notified when a page preview finishes
https://bugs.webkit.org/show_bug.cgi?id=138635

Reviewed by Tim Horton.

Add SPI to WKView to allow clients to do any cleanup that might be necessary when the preview closes.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare new SPI.

* UIProcess/API/mac/WKView.mm:
(-[WKView _finishPreviewingURL:withPreviewView:]):
Stub SPI implementation.

* UIProcess/mac/WKActionMenuController.h:
Add an ivar for the preview view controller.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
Update to use the ivar.
(-[WKActionMenuController _clearPreviewPopover]):
Send -_finishPreviewingURL:withPreviewView: and nil out the view controller ivar.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/mac/WKActionMenuController.h
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm