Commit a8b43102 authored by Yi Su's avatar Yi Su Committed by Commit Bot

Move navigation helper methods into CRWWKNavigationHandler.

This CL moves remaining navigation helper methods from CRWWebController
into CRWWKNavigationHandler.

Bug: 956511
Change-Id: I272a8e8247a104df1559b56c0bca06935f7a2e71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1640550
Commit-Queue: Yi Su <mrsuyi@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666200}
parent 7de78820
......@@ -26,7 +26,6 @@ enum class ErrorRetryCommand;
struct Referrer;
class WebStateImpl;
class NavigationContextImpl;
class NavigationItemImpl;
class UserInteractionState;
class WKBackForwardListItemHolder;
}
......@@ -107,23 +106,6 @@ class WKBackForwardListItemHolder;
rendererInitiated:(BOOL)renderedInitiated
placeholderNavigation:(BOOL)placeholderNavigation;
// Notifies the delegate that load has been cancelled.
- (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
handleCancelledError:(NSError*)error
forNavigation:(WKNavigation*)navigation
provisionalLoad:(BOOL)provisionalLoad;
// Notifies the delegate that load ends in an SSL error and certificate chain.
- (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
handleSSLCertError:(NSError*)error
forNavigation:(WKNavigation*)navigation;
// Notifies the delegate that load ends in error.
- (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
handleLoadError:(NSError*)error
forNavigation:(WKNavigation*)navigation
provisionalLoad:(BOOL)provisionalLoad;
// Instructs the delegate to clear the web frames list.
- (void)navigationHandlerRemoveAllWebFrames:
(CRWWKNavigationHandler*)navigationHandler;
......@@ -155,14 +137,6 @@ class WKBackForwardListItemHolder;
- (void)navigationHandlerUpdateHTML5HistoryState:
(CRWWKNavigationHandler*)navigationHandler;
// Instructs the delegate to execute the command specified by the
// ErrorRetryStateMachine.
- (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
handleErrorRetryCommand:(web::ErrorRetryCommand)command
navigationItem:(web::NavigationItemImpl*)item
navigationContext:(web::NavigationContextImpl*)context
originalNavigation:(WKNavigation*)originalNavigation;
// Notifies the delegate that navigation has finished.
- (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
didFinishNavigation:(web::NavigationContextImpl*)context;
......@@ -171,6 +145,19 @@ class WKBackForwardListItemHolder;
- (void)navigationHandlerWebProcessDidCrash:
(CRWWKNavigationHandler*)navigationHandler;
// Instructs the delegate to load current URL.
- (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
loadCurrentURLWithRendererInitiatedNavigation:(BOOL)rendererInitiated;
// Notifies the delegate that load has completed.
- (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
didCompleteLoadWithSuccess:(BOOL)loadSuccess
forContext:(web::NavigationContextImpl*)context;
// Instructs the delegate to create a web view if it's not yet created.
- (WKWebView*)navigationHandlerEnsureWebViewCreated:
(CRWWKNavigationHandler*)navigationHandler;
@end
// Handler class for WKNavigationDelegate, deals with navigation callbacks from
......@@ -230,6 +217,16 @@ class WKBackForwardListItemHolder;
- (ui::PageTransition)pageTransitionFromNavigationType:
(WKNavigationType)navigationType;
// Loads a blank page directly into WKWebView as a placeholder to create a new
// back forward item (f.e. for error page). This page has the URL
// about:blank?for=<encoded original URL>. If |originalContext| is provided,
// reuse it for the placeholder navigation instead of creating a new one.
- (web::NavigationContextImpl*)
loadPlaceholderInWebViewForURL:(const GURL&)originalURL
rendererInitiated:(BOOL)rendererInitiated
forContext:(std::unique_ptr<web::NavigationContextImpl>)
originalContext;
@end
#endif // IOS_WEB_NAVIGATION_CRW_WK_NAVIGATION_HANDLER_H_
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment