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

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

Issue 2902083003: Fixed Navigation callbacks for reloading native context. (Closed)
Patch Set: Created 3 years, 7 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/web_state/navigation_callbacks_inttest.mm ('k') | no next file » | 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 a47f2f09c0313b26aee3637519152d132ccf324f..12f2ca6be8bfd470d3f6f78d6bcf2c516c4e0926 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -2031,8 +2031,15 @@ registerLoadRequestForURL:(const GURL&)requestURL
// cancelled.
_lastUserInteraction.reset();
base::RecordAction(UserMetricsAction("Reload"));
- if ([self shouldLoadURLInNativeView:self.currentNavItem->GetURL()]) {
+ GURL url = self.currentNavItem->GetURL();
+ if ([self shouldLoadURLInNativeView:url]) {
+ std::unique_ptr<web::NavigationContextImpl> navigationContext = [self
+ registerLoadRequestForURL:url
+ referrer:self.currentNavItemReferrer
+ transition:ui::PageTransition::PAGE_TRANSITION_RELOAD];
[self.nativeController reload];
+ _webStateImpl->OnNavigationFinished(navigationContext.get());
+ [self loadCompleteWithSuccess:YES forNavigation:nil];
} else {
web::NavigationItem* transientItem =
self.navigationManagerImpl->GetTransientItem();
« no previous file with comments | « ios/web/web_state/navigation_callbacks_inttest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698