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

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

Issue 2250563003: [ios] Set WebState::IsLoading flag to false if load is cancelled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2197 case web::PAGE_LOADING: 2197 case web::PAGE_LOADING:
2198 // The previous load never fully completed before this page change. The 2198 // The previous load never fully completed before this page change. The
2199 // loadPhase is changed to PAGE_LOADED to indicate the cycle is complete, 2199 // loadPhase is changed to PAGE_LOADED to indicate the cycle is complete,
2200 // and the delegate is called. 2200 // and the delegate is called.
2201 _loadPhase = web::PAGE_LOADED; 2201 _loadPhase = web::PAGE_LOADED;
2202 if (!_isHalted) { 2202 if (!_isHalted) {
2203 // RequestTracker expects StartPageLoad to be followed by 2203 // RequestTracker expects StartPageLoad to be followed by
2204 // FinishPageLoad, passing the exact same URL. 2204 // FinishPageLoad, passing the exact same URL.
2205 self.webStateImpl->GetRequestTracker()->FinishPageLoad( 2205 self.webStateImpl->GetRequestTracker()->FinishPageLoad(
2206 _URLOnStartLoading, false); 2206 _URLOnStartLoading, false);
2207 _webStateImpl->SetIsLoading(false);
2207 } 2208 }
2208 [_delegate webLoadCancelled:_URLOnStartLoading]; 2209 [_delegate webLoadCancelled:_URLOnStartLoading];
2209 break; 2210 break;
2210 case web::PAGE_LOADED: 2211 case web::PAGE_LOADED:
2211 break; 2212 break;
2212 } 2213 }
2213 } 2214 }
2214 2215
2215 - (void)prepareForGoBack { 2216 - (void)prepareForGoBack {
2216 // Before changing the current session history entry, record the tab state. 2217 // Before changing the current session history entry, record the tab state.
(...skipping 3447 matching lines...) Expand 10 before | Expand all | Expand 10 after
5664 } 5665 }
5665 5666
5666 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5667 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5667 } 5668 }
5668 5669
5669 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5670 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5670 return [action.request valueForHTTPHeaderField:@"Referer"]; 5671 return [action.request valueForHTTPHeaderField:@"Referer"];
5671 } 5672 }
5672 5673
5673 @end 5674 @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