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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2260003002: [ios] Set WebState::IsLoading flag to false if load is cancelled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/web_state/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after
2207 case web::PAGE_LOADING: 2207 case web::PAGE_LOADING:
2208 // The previous load never fully completed before this page change. The 2208 // The previous load never fully completed before this page change. The
2209 // loadPhase is changed to PAGE_LOADED to indicate the cycle is complete, 2209 // loadPhase is changed to PAGE_LOADED to indicate the cycle is complete,
2210 // and the delegate is called. 2210 // and the delegate is called.
2211 _loadPhase = web::PAGE_LOADED; 2211 _loadPhase = web::PAGE_LOADED;
2212 if (!_isHalted) { 2212 if (!_isHalted) {
2213 // RequestTracker expects StartPageLoad to be followed by 2213 // RequestTracker expects StartPageLoad to be followed by
2214 // FinishPageLoad, passing the exact same URL. 2214 // FinishPageLoad, passing the exact same URL.
2215 self.webStateImpl->GetRequestTracker()->FinishPageLoad( 2215 self.webStateImpl->GetRequestTracker()->FinishPageLoad(
2216 _URLOnStartLoading, false); 2216 _URLOnStartLoading, false);
2217 _webStateImpl->SetIsLoading(false);
2217 } 2218 }
2218 [_delegate webLoadCancelled:_URLOnStartLoading]; 2219 [_delegate webLoadCancelled:_URLOnStartLoading];
2219 break; 2220 break;
2220 case web::PAGE_LOADED: 2221 case web::PAGE_LOADED:
2221 break; 2222 break;
2222 } 2223 }
2223 } 2224 }
2224 2225
2225 - (void)prepareForGoBack { 2226 - (void)prepareForGoBack {
2226 // Make sure any transitions that may have occurred have been seen and acted 2227 // Make sure any transitions that may have occurred have been seen and acted
(...skipping 3458 matching lines...) Expand 10 before | Expand all | Expand 10 after
5685 } 5686 }
5686 5687
5687 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5688 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5688 } 5689 }
5689 5690
5690 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5691 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5691 return [action.request valueForHTTPHeaderField:@"Referer"]; 5692 return [action.request valueForHTTPHeaderField:@"Referer"];
5692 } 5693 }
5693 5694
5694 @end 5695 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698