| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |