Commit 9ee3aaaf authored by Yi Su's avatar Yi Su Committed by Commit Bot

Remove CRWWebController.abortLoad.

This CL removes CRWWebController.abortLoad since it has only 2 lines and
is ambiguous to co-exist with CRWWebController.stopLoading,
CRWWKNavigationHandler.stopLoading, WKWebView.stopLoading and
CRWLegacyNativeContentController.stopLoading.

Bug: 956511
Change-Id: Ib0d6b38b66f8f21be7f4234893b132641b0f81ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1641244
Commit-Queue: Yi Su <mrsuyi@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666208}
parent a51d9c9a
...@@ -79,10 +79,6 @@ class WKBackForwardListItemHolder; ...@@ -79,10 +79,6 @@ class WKBackForwardListItemHolder;
// Stop Loading current page. // Stop Loading current page.
- (void)navigationHandlerStopLoading:(CRWWKNavigationHandler*)navigationHandler; - (void)navigationHandlerStopLoading:(CRWWKNavigationHandler*)navigationHandler;
// Aborts any load for both the web view and its controller.
- (void)navigationHandlerAbortLoading:
(CRWWKNavigationHandler*)navigationHandler;
// Returns YES if |url| should be loaded in a native view. // Returns YES if |url| should be loaded in a native view.
- (BOOL)navigationHandler:(CRWWKNavigationHandler*)navigationHandler - (BOOL)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
shouldLoadURLInNativeView:(const GURL&)url; shouldLoadURLInNativeView:(const GURL&)url;
......
...@@ -590,7 +590,8 @@ const web::CertVerificationErrorsCacheType::size_type kMaxCertErrorsCount = 100; ...@@ -590,7 +590,8 @@ const web::CertVerificationErrorsCacheType::size_type kMaxCertErrorsCount = 100;
// process (which may potentially be controller by an attacker) is // process (which may potentially be controller by an attacker) is
// dangerous. // dangerous.
if (web::GetWebClient()->IsAppSpecificURL(self.documentURL)) { if (web::GetWebClient()->IsAppSpecificURL(self.documentURL)) {
[self.delegate navigationHandlerAbortLoading:self]; [webView stopLoading];
[self stopLoading];
web::NavigationManager::WebLoadParams params(webViewURL); web::NavigationManager::WebLoadParams params(webViewURL);
self.navigationManagerImpl->LoadURLWithParams(params); self.navigationManagerImpl->LoadURLWithParams(params);
} }
......
...@@ -324,8 +324,6 @@ GURL URLEscapedForHistory(const GURL& url) { ...@@ -324,8 +324,6 @@ GURL URLEscapedForHistory(const GURL& url) {
// Returns a NSMutableURLRequest that represents the current NavigationItem. // Returns a NSMutableURLRequest that represents the current NavigationItem.
- (NSMutableURLRequest*)requestForCurrentNavigationItem; - (NSMutableURLRequest*)requestForCurrentNavigationItem;
// Aborts any load for both the web view and web controller.
- (void)abortLoad;
// Called following navigation completion to generate final navigation lifecycle // Called following navigation completion to generate final navigation lifecycle
// events. Navigation is considered complete when the document has finished // events. Navigation is considered complete when the document has finished
// loading, or when other page load mechanics are completed on a // loading, or when other page load mechanics are completed on a
...@@ -900,9 +898,10 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*); ...@@ -900,9 +898,10 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*);
- (void)stopLoading { - (void)stopLoading {
base::RecordAction(base::UserMetricsAction("Stop")); base::RecordAction(base::UserMetricsAction("Stop"));
// Discard the pending and transient entried before notifying the tab model // Discard the pending and transient entried before notifying the tab model
// observers of the change via |-abortLoad|. // observers of the change.
self.navigationManagerImpl->DiscardNonCommittedItems(); self.navigationManagerImpl->DiscardNonCommittedItems();
[self abortLoad]; [self.webView stopLoading];
[self.navigationHandler stopLoading];
[self.legacyNativeController stopLoading]; [self.legacyNativeController stopLoading];
} }
...@@ -930,8 +929,10 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*); ...@@ -930,8 +929,10 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*);
// Abort any outstanding page load. This ensures the delegate gets informed // Abort any outstanding page load. This ensures the delegate gets informed
// about the outgoing page, and further messages from the page are suppressed. // about the outgoing page, and further messages from the page are suppressed.
if (self.navigationHandler.navigationState != if (self.navigationHandler.navigationState !=
web::WKNavigationState::FINISHED) web::WKNavigationState::FINISHED) {
[self abortLoad]; [self.webView stopLoading];
[self.navigationHandler stopLoading];
}
DCHECK(!_isHalted); DCHECK(!_isHalted);
self.webStateImpl->ClearTransientContent(); self.webStateImpl->ClearTransientContent();
...@@ -1728,11 +1729,6 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*); ...@@ -1728,11 +1729,6 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*);
#pragma mark - End of loading #pragma mark - End of loading
- (void)abortLoad {
[self.webView stopLoading];
[self.navigationHandler stopLoading];
}
- (void)didFinishNavigation:(web::NavigationContextImpl*)context { - (void)didFinishNavigation:(web::NavigationContextImpl*)context {
// This can be called at multiple times after the document has loaded. Do // This can be called at multiple times after the document has loaded. Do
// nothing if the document has already loaded. // nothing if the document has already loaded.
...@@ -3004,8 +3000,9 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*); ...@@ -3004,8 +3000,9 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*);
self.webStateImpl->CancelDialogs(); self.webStateImpl->CancelDialogs();
self.navigationManagerImpl->DetachFromWebView(); self.navigationManagerImpl->DetachFromWebView();
[self abortLoad]; [self.webView stopLoading];
[self.webView removeFromSuperview]; [self.webView removeFromSuperview];
[self.navigationHandler stopLoading];
[_containerView resetContent]; [_containerView resetContent];
[self setWebView:nil]; [self setWebView:nil];
...@@ -3664,11 +3661,6 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*); ...@@ -3664,11 +3661,6 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*);
[self stopLoading]; [self stopLoading];
} }
- (void)navigationHandlerAbortLoading:
(CRWWKNavigationHandler*)navigationHandler {
[self abortLoad];
}
- (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler - (void)navigationHandler:(CRWWKNavigationHandler*)navigationHandler
setDocumentURL:(const GURL&)newURL setDocumentURL:(const GURL&)newURL
context:(web::NavigationContextImpl*)context { context:(web::NavigationContextImpl*)context {
......
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