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

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

Issue 2879413002: Pass NavigationContext to WebStateImpl::OnNavigationStarted. (Closed)
Patch Set: Fixed tests 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') | ios/web/web_state/web_state_impl.h » ('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 13229017e9d713a881191b474aa44f218885b864..406089027854d185c394635851bf7dad3f38bb13 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -1337,13 +1337,13 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
- (void)pushStateWithPageURL:(const GURL&)pageURL
stateObject:(NSString*)stateObject
transition:(ui::PageTransition)transition {
- _webStateImpl->OnProvisionalNavigationStarted(pageURL);
- [[self sessionController] pushNewItemWithURL:pageURL
- stateObject:stateObject
- transition:transition];
std::unique_ptr<web::NavigationContextImpl> context =
web::NavigationContextImpl::CreateNavigationContext(_webStateImpl,
pageURL);
+ _webStateImpl->OnNavigationStarted(context.get());
+ [[self sessionController] pushNewItemWithURL:pageURL
+ stateObject:stateObject
+ transition:transition];
context->SetIsSameDocument(true);
_webStateImpl->OnNavigationFinished(context.get());
self.userInteractionRegistered = NO;
@@ -1351,12 +1351,12 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
- (void)replaceStateWithPageURL:(const GURL&)pageURL
stateObject:(NSString*)stateObject {
- _webStateImpl->OnProvisionalNavigationStarted(pageURL);
- [[self sessionController] updateCurrentItemWithURL:pageURL
- stateObject:stateObject];
std::unique_ptr<web::NavigationContextImpl> context =
web::NavigationContextImpl::CreateNavigationContext(_webStateImpl,
pageURL);
+ _webStateImpl->OnNavigationStarted(context.get());
+ [[self sessionController] updateCurrentItemWithURL:pageURL
+ stateObject:stateObject];
context->SetIsSameDocument(true);
_webStateImpl->OnNavigationFinished(context.get());
}
@@ -1531,8 +1531,7 @@ registerLoadRequestForURL:(const GURL&)requestURL
web::NavigationContextImpl::CreateNavigationContext(_webStateImpl,
requestURL);
_webStateImpl->SetIsLoading(true);
- // TODO(crbug.com/713836): pass context to |OnProvisionalNavigationStarted|.
- _webStateImpl->OnProvisionalNavigationStarted(requestURL);
+ _webStateImpl->OnNavigationStarted(context.get());
return context;
}
« no previous file with comments | « ios/web/web_state/navigation_callbacks_inttest.mm ('k') | ios/web/web_state/web_state_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698