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

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

Issue 2807063006: [ios] Reduce access to private //ios/web API. (Closed)
Patch Set: Call -recordStateInHistory in CRWWebController -wasHidden.' 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 unified diff | Download patch
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 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 1971
1972 - (void)updateDialogPresenterActiveState { 1972 - (void)updateDialogPresenterActiveState {
1973 self.dialogPresenter.active = 1973 self.dialogPresenter.active =
1974 self.active && self.viewVisible && !self.inNewTabAnimation; 1974 self.active && self.viewVisible && !self.inNewTabAnimation;
1975 } 1975 }
1976 1976
1977 - (void)dismissPopups { 1977 - (void)dismissPopups {
1978 [_toolbarController dismissToolsMenuPopup]; 1978 [_toolbarController dismissToolsMenuPopup];
1979 [self hidePageInfoPopupForView:nil]; 1979 [self hidePageInfoPopupForView:nil];
1980 [_toolbarController dismissTabHistoryPopup]; 1980 [_toolbarController dismissTabHistoryPopup];
1981 [[_model currentTab] recordStateInHistory];
1982 } 1981 }
1983 1982
1984 #pragma mark - Tap handling 1983 #pragma mark - Tap handling
1985 1984
1986 - (void)setLastTapPoint:(id)sender { 1985 - (void)setLastTapPoint:(id)sender {
1987 CGPoint center; 1986 CGPoint center;
1988 UIView* parentView = nil; 1987 UIView* parentView = nil;
1989 if ([sender isKindOfClass:[UIView class]]) { 1988 if ([sender isKindOfClass:[UIView class]]) {
1990 center = [sender center]; 1989 center = [sender center];
1991 parentView = [sender superview]; 1990 parentView = [sender superview];
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
3708 3707
3709 Tab* oldTab = [_model currentTab]; 3708 Tab* oldTab = [_model currentTab];
3710 Tab* newTab = LegacyTabHelper::GetTabForWebState(newWebState.get()); 3709 Tab* newTab = LegacyTabHelper::GetTabForWebState(newWebState.get());
3711 DCHECK(oldTab); 3710 DCHECK(oldTab);
3712 DCHECK(newTab); 3711 DCHECK(newTab);
3713 3712
3714 bool canPruneItems = 3713 bool canPruneItems =
3715 [newTab navigationManager]->CanPruneAllButLastCommittedItem(); 3714 [newTab navigationManager]->CanPruneAllButLastCommittedItem();
3716 3715
3717 if (oldTab && newTab && canPruneItems) { 3716 if (oldTab && newTab && canPruneItems) {
3718 [oldTab recordStateInHistory];
3719 [newTab navigationManager]->CopyStateFromAndPrune( 3717 [newTab navigationManager]->CopyStateFromAndPrune(
3720 [oldTab navigationManager]); 3718 [oldTab navigationManager]);
3721 [[newTab nativeAppNavigationController] 3719 [[newTab nativeAppNavigationController]
3722 copyStateFrom:[oldTab nativeAppNavigationController]]; 3720 copyStateFrom:[oldTab nativeAppNavigationController]];
3723 3721
3724 [_model webStateList]->ReplaceWebStateAt([_model indexOfTab:oldTab], 3722 [_model webStateList]->ReplaceWebStateAt([_model indexOfTab:oldTab],
3725 std::move(newWebState)); 3723 std::move(newWebState));
3726 3724
3727 // Set isPrerenderTab to NO after replacing the tab. This will allow the 3725 // Set isPrerenderTab to NO after replacing the tab. This will allow the
3728 // BrowserViewController to detect that a pre-rendered tab is switched in, 3726 // BrowserViewController to detect that a pre-rendered tab is switched in,
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
5168 5166
5169 - (UIView*)voiceSearchButton { 5167 - (UIView*)voiceSearchButton {
5170 return _voiceSearchButton; 5168 return _voiceSearchButton;
5171 } 5169 }
5172 5170
5173 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5171 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5174 return [self currentLogoAnimationControllerOwner]; 5172 return [self currentLogoAnimationControllerOwner];
5175 } 5173 }
5176 5174
5177 @end 5175 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698