Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2736383006: Removed CRWWebDelagate callbacks for load cancellation. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index 0758389f047aa29c97410f074cf820f928641919..0794ea177d0fa0caa1187798c129f9d38a6da3d9 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -2079,30 +2079,11 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
- (void)loadCancelled {
[_passKitDownloader cancelPendingDownload];
-
- // Current load will not complete; this should be communicated upstream to the
- // delegate.
- switch (_loadPhase) {
- case web::LOAD_REQUESTED:
- // Load phase after abort is always PAGE_LOADED.
- _loadPhase = web::PAGE_LOADED;
- if (!_isHalted) {
- _webStateImpl->SetIsLoading(false);
- }
- [_delegate webCancelStartLoadingRequest];
- break;
- case web::PAGE_LOADING:
- // The previous load never fully completed before this page change. The
- // loadPhase is changed to PAGE_LOADED to indicate the cycle is complete,
- // and the delegate is called.
- _loadPhase = web::PAGE_LOADED;
- if (!_isHalted) {
- _webStateImpl->SetIsLoading(false);
- }
- [_delegate webLoadCancelled:_URLOnStartLoading];
- break;
- case web::PAGE_LOADED:
- break;
+ if (_loadPhase != web::PAGE_LOADED) {
+ _loadPhase = web::PAGE_LOADED;
+ if (!_isHalted) {
+ _webStateImpl->SetIsLoading(false);
+ }
}
}
« ios/chrome/browser/tabs/tab.mm ('K') | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698