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

Side by Side Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2925673002: Call reload when user initiate reload using the omnibox (Closed)
Patch Set: add todo Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/chrome/browser/ui/browser_view_controller.h" 5 #import "ios/chrome/browser/ui/browser_view_controller.h"
6 6
7 #import <AssetsLibrary/AssetsLibrary.h> 7 #import <AssetsLibrary/AssetsLibrary.h>
8 #import <MobileCoreServices/MobileCoreServices.h> 8 #import <MobileCoreServices/MobileCoreServices.h>
9 #import <PassKit/PassKit.h> 9 #import <PassKit/PassKit.h>
10 #import <Photos/Photos.h> 10 #import <Photos/Photos.h>
(...skipping 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after
3755 // load a disallowed URL, instead create a new tab not in the incognito state. 3755 // load a disallowed URL, instead create a new tab not in the incognito state.
3756 if (_isOffTheRecord && !IsURLAllowedInIncognito(url)) { 3756 if (_isOffTheRecord && !IsURLAllowedInIncognito(url)) {
3757 [self webPageOrderedOpen:url 3757 [self webPageOrderedOpen:url
3758 referrer:web::Referrer() 3758 referrer:web::Referrer()
3759 inIncognito:NO 3759 inIncognito:NO
3760 inBackground:NO 3760 inBackground:NO
3761 appendTo:kCurrentTab]; 3761 appendTo:kCurrentTab];
3762 return; 3762 return;
3763 } 3763 }
3764 3764
3765 // If this is a reload initiated from the omnibox.
3766 // TODO(crbug.com/730192): Add DCHECK to verify that whenever urlToLood is the
marq (ping after 24h) 2017/06/08 09:16:25 Rather than leave this hanging as a bug, can you j
mrefaat 2017/06/08 17:01:57 It's a todo as we are not 100% sure that this will
3767 // same as the old url, the transition type is ui::PAGE_TRANSITION_RELOAD.
3768 if (PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_RELOAD)) {
3769 [[_model currentTab] navigationManager]->Reload(
3770 web::ReloadType::NORMAL, true /* check_for_repost */);
3771 return;
3772 }
3773
3765 web::NavigationManager::WebLoadParams params(urlToLoad); 3774 web::NavigationManager::WebLoadParams params(urlToLoad);
3766 params.referrer = referrer; 3775 params.referrer = referrer;
3767 params.transition_type = transition; 3776 params.transition_type = transition;
3768 params.is_renderer_initiated = rendererInitiated; 3777 params.is_renderer_initiated = rendererInitiated;
3769 DCHECK([_model currentTab]); 3778 DCHECK([_model currentTab]);
3770 [[_model currentTab] navigationManager]->LoadURLWithParams(params); 3779 [[_model currentTab] navigationManager]->LoadURLWithParams(params);
3771 } 3780 }
3772 3781
3773 - (void)loadJavaScriptFromLocationBar:(NSString*)script { 3782 - (void)loadJavaScriptFromLocationBar:(NSString*)script {
3774 [_preloadController cancelPrerender]; 3783 [_preloadController cancelPrerender];
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
5181 5190
5182 - (UIView*)voiceSearchButton { 5191 - (UIView*)voiceSearchButton {
5183 return _voiceSearchButton; 5192 return _voiceSearchButton;
5184 } 5193 }
5185 5194
5186 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5195 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5187 return [self currentLogoAnimationControllerOwner]; 5196 return [self currentLogoAnimationControllerOwner];
5188 } 5197 }
5189 5198
5190 @end 5199 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698