| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_wk_web_view_web_controller.h" | 5 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h" |
| 6 | 6 |
| 7 #import <WebKit/WebKit.h> | 7 #import <WebKit/WebKit.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 [super handleLoadError:error inMainFrame:inMainFrame]; | 734 [super handleLoadError:error inMainFrame:inMainFrame]; |
| 735 } | 735 } |
| 736 | 736 |
| 737 // Override |loadCancelled| to |cancelPendingDownload| for the | 737 // Override |loadCancelled| to |cancelPendingDownload| for the |
| 738 // CRWPassKitDownloader. | 738 // CRWPassKitDownloader. |
| 739 - (void)loadCancelled { | 739 - (void)loadCancelled { |
| 740 [_passKitDownloader cancelPendingDownload]; | 740 [_passKitDownloader cancelPendingDownload]; |
| 741 [super loadCancelled]; | 741 [super loadCancelled]; |
| 742 } | 742 } |
| 743 | 743 |
| 744 - (BOOL)canPerformFastNavigationForSessionEntry:(CRWSessionEntry*)sessionEntry { |
| 745 web::WKBackForwardListItemHolder* holder = |
| 746 web::WKBackForwardListItemHolder::FromNavigationItem( |
| 747 sessionEntry.navigationItemImpl); |
| 748 return (holder->back_forward_list_item() && |
| 749 [self isBackForwardListItemValid:holder->back_forward_list_item()]); |
| 750 } |
| 751 |
| 744 - (BOOL)isViewAlive { | 752 - (BOOL)isViewAlive { |
| 745 return !_webProcessIsDead && [super isViewAlive]; | 753 return !_webProcessIsDead && [super isViewAlive]; |
| 746 } | 754 } |
| 747 | 755 |
| 748 #pragma mark Private methods | 756 #pragma mark Private methods |
| 749 | 757 |
| 750 - (NSDictionary*)wkWebViewObservers { | 758 - (NSDictionary*)wkWebViewObservers { |
| 751 return @{ | 759 return @{ |
| 752 @"certificateChain" : @"webViewSecurityFeaturesDidChange", | 760 @"certificateChain" : @"webViewSecurityFeaturesDidChange", |
| 753 @"estimatedProgress" : @"webViewEstimatedProgressDidChange", | 761 @"estimatedProgress" : @"webViewEstimatedProgressDidChange", |
| (...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2049 runJavaScriptTextInputPanelWithPrompt:prompt | 2057 runJavaScriptTextInputPanelWithPrompt:prompt |
| 2050 defaultText:defaultText | 2058 defaultText:defaultText |
| 2051 requestURL:requestURL | 2059 requestURL:requestURL |
| 2052 completionHandler:completionHandler]; | 2060 completionHandler:completionHandler]; |
| 2053 } else if (completionHandler) { | 2061 } else if (completionHandler) { |
| 2054 completionHandler(nil); | 2062 completionHandler(nil); |
| 2055 } | 2063 } |
| 2056 } | 2064 } |
| 2057 | 2065 |
| 2058 @end | 2066 @end |
| OLD | NEW |