Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 1851003003: [ios] Added web// public API to let embedder observe loading progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/shell/view_controller.mm ('k') | ios/web/web_state/web_state_delegate.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index a3dd7ee4dc8cdea1ff53edf39dd61625a7d36cbb..a7f565542522957af40343878ad9eac8214ec33a 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -4956,10 +4956,14 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
}
- (void)webViewEstimatedProgressDidChange {
- if ([self.delegate
+ if ([self isBeingDestroyed])
+ return;
+
+ self.webStateImpl->SendChangeLoadProgress([_webView estimatedProgress]);
+ if ([_delegate
respondsToSelector:@selector(webController:didUpdateProgress:)]) {
- [self.delegate webController:self
- didUpdateProgress:[self.webView estimatedProgress]];
+ [_delegate webController:self
+ didUpdateProgress:[_webView estimatedProgress]];
}
}
« no previous file with comments | « ios/web/shell/view_controller.mm ('k') | ios/web/web_state/web_state_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698