| 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 3482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3493 } | 3493 } |
| 3494 | 3494 |
| 3495 - (void)clearWebUI { | 3495 - (void)clearWebUI { |
| 3496 _webStateImpl->ClearWebUI(); | 3496 _webStateImpl->ClearWebUI(); |
| 3497 _webUIManager.reset(); | 3497 _webUIManager.reset(); |
| 3498 } | 3498 } |
| 3499 | 3499 |
| 3500 #pragma mark - | 3500 #pragma mark - |
| 3501 #pragma mark CRWRequestTrackerDelegate | 3501 #pragma mark CRWRequestTrackerDelegate |
| 3502 | 3502 |
| 3503 - (BOOL)isForStaticFileRequests { | |
| 3504 return NO; | |
| 3505 } | |
| 3506 | |
| 3507 - (void)updatedSSLStatus:(const web::SSLStatus&)sslStatus | 3503 - (void)updatedSSLStatus:(const web::SSLStatus&)sslStatus |
| 3508 forPageUrl:(const GURL&)url | 3504 forPageUrl:(const GURL&)url |
| 3509 userInfo:(id)userInfo { | 3505 userInfo:(id)userInfo { |
| 3510 // |userInfo| is a CRWSessionEntry. | 3506 // |userInfo| is a CRWSessionEntry. |
| 3511 web::NavigationItem* item = | 3507 web::NavigationItem* item = |
| 3512 [static_cast<CRWSessionEntry*>(userInfo) navigationItem]; | 3508 [static_cast<CRWSessionEntry*>(userInfo) navigationItem]; |
| 3513 if (!item) | 3509 if (!item) |
| 3514 return; // This is a request update for an entry that no longer exists. | 3510 return; // This is a request update for an entry that no longer exists. |
| 3515 | 3511 |
| 3516 // This condition happens infrequently when a page load is misinterpreted as | 3512 // This condition happens infrequently when a page load is misinterpreted as |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3532 if (userInfo == self.currentSessionEntry) { | 3528 if (userInfo == self.currentSessionEntry) { |
| 3533 [self didUpdateSSLStatusForCurrentNavigationItem]; | 3529 [self didUpdateSSLStatusForCurrentNavigationItem]; |
| 3534 } | 3530 } |
| 3535 } | 3531 } |
| 3536 | 3532 |
| 3537 - (void)handleResponseHeaders:(net::HttpResponseHeaders*)headers | 3533 - (void)handleResponseHeaders:(net::HttpResponseHeaders*)headers |
| 3538 requestUrl:(const GURL&)requestUrl { | 3534 requestUrl:(const GURL&)requestUrl { |
| 3539 _webStateImpl->OnHttpResponseHeadersReceived(headers, requestUrl); | 3535 _webStateImpl->OnHttpResponseHeadersReceived(headers, requestUrl); |
| 3540 } | 3536 } |
| 3541 | 3537 |
| 3542 - (void)presentSSLError:(const net::SSLInfo&)info | |
| 3543 forSSLStatus:(const web::SSLStatus&)status | |
| 3544 onUrl:(const GURL&)url | |
| 3545 recoverable:(BOOL)recoverable | |
| 3546 callback:(SSLErrorCallback)shouldContinue { | |
| 3547 // This is a UIWebView callback, which is no longer called. | |
| 3548 NOTREACHED(); | |
| 3549 } | |
| 3550 | |
| 3551 - (void)updatedProgress:(float)progress { | 3538 - (void)updatedProgress:(float)progress { |
| 3552 // This is a UIWebView callback, which is no longer called. | 3539 // This is a UIWebView callback, which is no longer called. |
| 3553 NOTREACHED(); | 3540 NOTREACHED(); |
| 3554 } | 3541 } |
| 3555 | 3542 |
| 3556 - (void)certificateUsed:(net::X509Certificate*)certificate | 3543 - (void)certificateUsed:(net::X509Certificate*)certificate |
| 3557 forHost:(const std::string&)host | 3544 forHost:(const std::string&)host |
| 3558 status:(net::CertStatus)status { | 3545 status:(net::CertStatus)status { |
| 3559 [[[self sessionController] sessionCertificatePolicyManager] | 3546 [[[self sessionController] sessionCertificatePolicyManager] |
| 3560 registerAllowedCertificate:certificate | 3547 registerAllowedCertificate:certificate |
| (...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5527 } | 5514 } |
| 5528 | 5515 |
| 5529 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; | 5516 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; |
| 5530 } | 5517 } |
| 5531 | 5518 |
| 5532 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { | 5519 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { |
| 5533 return [action.request valueForHTTPHeaderField:@"Referer"]; | 5520 return [action.request valueForHTTPHeaderField:@"Referer"]; |
| 5534 } | 5521 } |
| 5535 | 5522 |
| 5536 @end | 5523 @end |
| OLD | NEW |