-
Danyao Wang authored
CRWWebController sometimes needs to remove WKWebView (e.g. crbug/770914) and this obliterates the session history when WKBasedNavigationManager is used. This CL adds the ability for WKBasedNavigationManager to temporarily be detached from the web view. Major parts to this CL: 1. NavigationManagerImpl::DetachFromWebView() is a new API that CRWWebController uses to notify the navigation manager before removing the web view. 2. WKBasedNavigationManager implements this API with the help of a new nested class WKWebViewShim. It knows how to cache the items when detaching from a web view and service getter calls in detached mode. 3. Added overrides for FinishReload(), FinishLoadURLWithParams() and LoadIfNecessary() in WKBasedNavigationManager so it can switch back to attached mode when a new navigation starts by restoring the cached navigation items. Also cleaned up unneeded APIs from CRWWebViewNavigationProxy. Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: I2b1796731964f021df8c0489d3a6ef56ae390e04 Bug: 815248 Reviewed-on: https://chromium-review.googlesource.com/999054 Commit-Queue: Danyao Wang <danyao@chromium.org> Reviewed-by:
Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#549880}
0efc969a