| 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 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1180 ofObject:(id)object | 1180 ofObject:(id)object |
| 1181 change:(NSDictionary*)change | 1181 change:(NSDictionary*)change |
| 1182 context:(void*)context { | 1182 context:(void*)context { |
| 1183 NSString* dispatcherSelectorName = self.wkWebViewObservers[keyPath]; | 1183 NSString* dispatcherSelectorName = self.wkWebViewObservers[keyPath]; |
| 1184 DCHECK(dispatcherSelectorName); | 1184 DCHECK(dispatcherSelectorName); |
| 1185 if (dispatcherSelectorName) | 1185 if (dispatcherSelectorName) |
| 1186 [self performSelector:NSSelectorFromString(dispatcherSelectorName)]; | 1186 [self performSelector:NSSelectorFromString(dispatcherSelectorName)]; |
| 1187 } | 1187 } |
| 1188 | 1188 |
| 1189 - (void)webViewEstimatedProgressDidChange { | 1189 - (void)webViewEstimatedProgressDidChange { |
| 1190 if ([self isBeingDestroyed]) |
| 1191 return; |
| 1192 |
| 1193 self.webStateImpl->SendChangeLoadProgress([_wkWebView estimatedProgress]); |
| 1190 if ([self.delegate respondsToSelector: | 1194 if ([self.delegate respondsToSelector: |
| 1191 @selector(webController:didUpdateProgress:)]) { | 1195 @selector(webController:didUpdateProgress:)]) { |
| 1192 [self.delegate webController:self | 1196 [self.delegate webController:self |
| 1193 didUpdateProgress:[_wkWebView estimatedProgress]]; | 1197 didUpdateProgress:[_wkWebView estimatedProgress]]; |
| 1194 } | 1198 } |
| 1195 } | 1199 } |
| 1196 | 1200 |
| 1197 - (void)webViewSecurityFeaturesDidChange { | 1201 - (void)webViewSecurityFeaturesDidChange { |
| 1198 if (self.loadPhase == web::LOAD_REQUESTED) { | 1202 if (self.loadPhase == web::LOAD_REQUESTED) { |
| 1199 // Do not update SSL Status for pending load. It will be updated in | 1203 // Do not update SSL Status for pending load. It will be updated in |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 runJavaScriptTextInputPanelWithPrompt:prompt | 1726 runJavaScriptTextInputPanelWithPrompt:prompt |
| 1723 defaultText:defaultText | 1727 defaultText:defaultText |
| 1724 requestURL:requestURL | 1728 requestURL:requestURL |
| 1725 completionHandler:completionHandler]; | 1729 completionHandler:completionHandler]; |
| 1726 } else if (completionHandler) { | 1730 } else if (completionHandler) { |
| 1727 completionHandler(nil); | 1731 completionHandler(nil); |
| 1728 } | 1732 } |
| 1729 } | 1733 } |
| 1730 | 1734 |
| 1731 @end | 1735 @end |
| OLD | NEW |