| 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 <objc/runtime.h> | 7 #import <objc/runtime.h> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/ios/block_types.h" | 10 #include "base/ios/block_types.h" |
| (...skipping 3836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3847 - (NSString*)externalRequestWindowName { | 3847 - (NSString*)externalRequestWindowName { |
| 3848 if (!_externalRequest || !_externalRequest->window_name) | 3848 if (!_externalRequest || !_externalRequest->window_name) |
| 3849 return @""; | 3849 return @""; |
| 3850 return _externalRequest->window_name; | 3850 return _externalRequest->window_name; |
| 3851 } | 3851 } |
| 3852 | 3852 |
| 3853 - (void)resetExternalRequest { | 3853 - (void)resetExternalRequest { |
| 3854 _externalRequest.reset(); | 3854 _externalRequest.reset(); |
| 3855 } | 3855 } |
| 3856 | 3856 |
| 3857 - (web::WebViewDocumentType)documentTypeFromMIMEType:(NSString*)MIMEType { |
| 3858 if (!MIMEType.length) { |
| 3859 return web::WEB_VIEW_DOCUMENT_TYPE_UNKNOWN; |
| 3860 } |
| 3861 |
| 3862 if ([MIMEType isEqualToString:@"text/html"] || |
| 3863 [MIMEType isEqualToString:@"application/xhtml+xml"] || |
| 3864 [MIMEType isEqualToString:@"application/xml"]) { |
| 3865 return web::WEB_VIEW_DOCUMENT_TYPE_HTML; |
| 3866 } |
| 3867 |
| 3868 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; |
| 3869 } |
| 3870 |
| 3857 @end | 3871 @end |
| OLD | NEW |