Commit 8f3353a6 authored by Yi Su's avatar Yi Su Committed by Commit Bot

Move didCommitNavigation into CRWWKNavigationHandler.

This CL moves the WKNavigationDelegate method "didCommitNavigation" from
CRWWebController into CRWWKNavigationHandler.

Bug: 956511
Change-Id: I74e7ce823f65da2e61e5b79b49a4820ecba0f42c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1634860
Commit-Queue: Yi Su <mrsuyi@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665514}
parent b5101b4e
...@@ -20,6 +20,7 @@ source_set("navigation") { ...@@ -20,6 +20,7 @@ source_set("navigation") {
"//ios/net", "//ios/net",
"//ios/web:core", "//ios/web:core",
"//ios/web/common", "//ios/web/common",
"//ios/web/js_messaging",
"//ios/web/navigation:wk_navigation_util", "//ios/web/navigation:wk_navigation_util",
"//ios/web/public", "//ios/web/public",
"//ios/web/public/deprecated", "//ios/web/public/deprecated",
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
@class CRWWKNavigationHandler; @class CRWWKNavigationHandler;
@class CRWPendingNavigationInfo; @class CRWPendingNavigationInfo;
@class CRWWKNavigationStates; @class CRWWKNavigationStates;
@class CRWJSInjector;
class GURL; class GURL;
namespace base { namespace base {
class RepeatingTimer; class RepeatingTimer;
...@@ -45,6 +46,10 @@ class WKBackForwardListItemHolder; ...@@ -45,6 +46,10 @@ class WKBackForwardListItemHolder;
certVerificationErrorsForNavigationHandler: certVerificationErrorsForNavigationHandler:
(CRWWKNavigationHandler*)navigationHandler; (CRWWKNavigationHandler*)navigationHandler;
// Returns the associated js injector.
- (CRWJSInjector*)JSInjectorForNavigationHandler:
(CRWWKNavigationHandler*)navigationHandler;
// Returns YES if WKWebView is halted. // Returns YES if WKWebView is halted.
- (BOOL)navigationHandlerWebViewIsHalted: - (BOOL)navigationHandlerWebViewIsHalted:
(CRWWKNavigationHandler*)navigationHandler; (CRWWKNavigationHandler*)navigationHandler;
...@@ -117,6 +122,33 @@ class WKBackForwardListItemHolder; ...@@ -117,6 +122,33 @@ class WKBackForwardListItemHolder;
- (void)navigationHandlerRemoveAllWebFrames: - (void)navigationHandlerRemoveAllWebFrames:
(CRWWKNavigationHandler*)navigationHandler; (CRWWKNavigationHandler*)navigationHandler;
// Instructs the delegate to display the webView.
- (void)navigationHandlerDisplayWebView:
(CRWWKNavigationHandler*)navigationHandler;
// Resets any state that is associated with a specific document object (e.g.,
// page interaction tracking).
- (void)navigationHandlerResetDocumentSpecificState:
(CRWWKNavigationHandler*)navigationHandler;
// Notifies the delegate that the page has actually started loading.
- (void)navigationHandlerDidStartLoading:
(CRWWKNavigationHandler*)navigationHandler;
// Notifies the delegate that the web page has changed document and/or URL.
- (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
didChangePageWithContext:(web::NavigationContextImpl*)context;
// Instructs the delegate to update the SSL status for the current navigation
// item.
- (void)navigationHandlerUpdateSSLStatusForCurrentNavigationItem:
(CRWWKNavigationHandler*)navigationHandler;
// Instructs the delegate to update the HTML5 history state of the page using
// the current NavigationItem.
- (void)navigationHandlerUpdateHTML5HistoryState:
(CRWWKNavigationHandler*)navigationHandler;
@end @end
// Handler class for WKNavigationDelegate, deals with navigation callbacks from // Handler class for WKNavigationDelegate, deals with navigation callbacks from
...@@ -199,6 +231,10 @@ class WKBackForwardListItemHolder; ...@@ -199,6 +231,10 @@ class WKBackForwardListItemHolder;
// TODO(crbug.com/956511): Make this private once refactor is done. // TODO(crbug.com/956511): Make this private once refactor is done.
- (void)forgetNullWKNavigation:(WKNavigation*)navigation; - (void)forgetNullWKNavigation:(WKNavigation*)navigation;
// Sets last committed NavigationItem's title to the given |title|, which can
// not be nil.
- (void)setLastCommittedNavigationItemTitle:(NSString*)title;
@end @end
#endif // IOS_WEB_NAVIGATION_CRW_WK_NAVIGATION_HANDLER_H_ #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