| 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 2908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2919 | 2919 |
| 2920 - (void)wasShown { | 2920 - (void)wasShown { |
| 2921 if ([self.nativeController respondsToSelector:@selector(wasShown)]) { | 2921 if ([self.nativeController respondsToSelector:@selector(wasShown)]) { |
| 2922 [self.nativeController wasShown]; | 2922 [self.nativeController wasShown]; |
| 2923 } | 2923 } |
| 2924 } | 2924 } |
| 2925 | 2925 |
| 2926 - (void)wasHidden { | 2926 - (void)wasHidden { |
| 2927 if (_isHalted) | 2927 if (_isHalted) |
| 2928 return; | 2928 return; |
| 2929 [self recordStateInHistory]; |
| 2929 if ([self.nativeController respondsToSelector:@selector(wasHidden)]) { | 2930 if ([self.nativeController respondsToSelector:@selector(wasHidden)]) { |
| 2930 [self.nativeController wasHidden]; | 2931 [self.nativeController wasHidden]; |
| 2931 } | 2932 } |
| 2932 } | 2933 } |
| 2933 | 2934 |
| 2934 + (BOOL)webControllerCanShow:(const GURL&)url { | 2935 + (BOOL)webControllerCanShow:(const GURL&)url { |
| 2935 return web::UrlHasWebScheme(url) || | 2936 return web::UrlHasWebScheme(url) || |
| 2936 web::GetWebClient()->IsAppSpecificURL(url) || | 2937 web::GetWebClient()->IsAppSpecificURL(url) || |
| 2937 url.SchemeIs(url::kFileScheme) || url.SchemeIs(url::kAboutScheme); | 2938 url.SchemeIs(url::kFileScheme) || url.SchemeIs(url::kAboutScheme); |
| 2938 } | 2939 } |
| (...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5159 - (void)simulateLoadRequestWithURL:(const GURL&)URL { | 5160 - (void)simulateLoadRequestWithURL:(const GURL&)URL { |
| 5160 _lastRegisteredRequestURL = URL; | 5161 _lastRegisteredRequestURL = URL; |
| 5161 _loadPhase = web::LOAD_REQUESTED; | 5162 _loadPhase = web::LOAD_REQUESTED; |
| 5162 } | 5163 } |
| 5163 | 5164 |
| 5164 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action { | 5165 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action { |
| 5165 return [action.request valueForHTTPHeaderField:kReferrerHeaderName]; | 5166 return [action.request valueForHTTPHeaderField:kReferrerHeaderName]; |
| 5166 } | 5167 } |
| 5167 | 5168 |
| 5168 @end | 5169 @end |
| OLD | NEW |