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

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

Issue 2780403003: Removed -[CRWWebDelegate webWillInitiateLoadWithParams:]. (Closed)
Patch Set: Addressed review comment Created 3 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/public/web_state/ui/crw_web_delegate.h ('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 e99824fd4b2e0078199b44b1d96eb491b1e00521..6e5ae32c21d697a687a03e16476677f7c5f03dcd 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -1791,20 +1791,9 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
[self loadNativeViewWithSuccess:YES];
}
-- (void)loadWithParams:(const NavigationManager::WebLoadParams&)originalParams {
- // Make a copy of |params|, as some of the delegate methods may modify it.
- NavigationManager::WebLoadParams params(originalParams);
+- (void)loadWithParams:(const NavigationManager::WebLoadParams&)params {
+ DCHECK(!(params.transition_type & ui::PAGE_TRANSITION_FORWARD_BACK));
- // Initiating a navigation from the UI, record the current page state before
- // the new page loads.
-
- [_delegate webWillInitiateLoadWithParams:params];
-
- GURL navUrl = params.url;
- ui::PageTransition transition = params.transition_type;
- DCHECK(!(transition & ui::PAGE_TRANSITION_FORWARD_BACK));
-
- BOOL initialNavigation = NO;
// Clear transient view before making any changes to history and navigation
// manager. TODO(stuartmorgan): Drive Transient Item clearing from
// navigation system, rather than from WebController.
@@ -1812,16 +1801,15 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
[self recordStateInHistory];
- if (!self.currentNavItem)
- initialNavigation = YES;
+ BOOL initialNavigation = !self.currentNavItem;
web::NavigationInitiationType navigationInitiationType =
params.is_renderer_initiated
? web::NavigationInitiationType::RENDERER_INITIATED
: web::NavigationInitiationType::USER_INITIATED;
self.navigationManagerImpl->AddPendingItem(
- navUrl, params.referrer, transition, navigationInitiationType,
- params.user_agent_override_option);
+ params.url, params.referrer, params.transition_type,
+ navigationInitiationType, params.user_agent_override_option);
web::NavigationItemImpl* addedItem = self.currentNavItem;
DCHECK(addedItem);
« no previous file with comments | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698