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

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: 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 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 } 1921 }
1922 1922
1923 - (void)updateDialogPresenterActiveState { 1923 - (void)updateDialogPresenterActiveState {
1924 self.dialogPresenter.active = self.active && self.viewVisible; 1924 self.dialogPresenter.active = self.active && self.viewVisible;
1925 } 1925 }
1926 1926
1927 - (void)dismissPopups { 1927 - (void)dismissPopups {
1928 [_toolbarController dismissToolsMenuPopup]; 1928 [_toolbarController dismissToolsMenuPopup];
1929 [self hidePageInfoPopupForView:nil]; 1929 [self hidePageInfoPopupForView:nil];
1930 [_toolbarController dismissTabHistoryPopup]; 1930 [_toolbarController dismissTabHistoryPopup];
1931 [[_model currentTab] recordStateInHistory];
1932 } 1931 }
1933 1932
1934 #pragma mark - Tap handling 1933 #pragma mark - Tap handling
1935 1934
1936 - (void)setLastTapPoint:(id)sender { 1935 - (void)setLastTapPoint:(id)sender {
1937 CGPoint center; 1936 CGPoint center;
1938 UIView* parentView = nil; 1937 UIView* parentView = nil;
1939 if ([sender isKindOfClass:[UIView class]]) { 1938 if ([sender isKindOfClass:[UIView class]]) {
1940 center = [sender center]; 1939 center = [sender center];
1941 parentView = [sender superview]; 1940 parentView = [sender superview];
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
3661 3660
3662 Tab* oldTab = [_model currentTab]; 3661 Tab* oldTab = [_model currentTab];
3663 Tab* newTab = LegacyTabHelper::GetTabForWebState(newWebState.get()); 3662 Tab* newTab = LegacyTabHelper::GetTabForWebState(newWebState.get());
3664 DCHECK(oldTab); 3663 DCHECK(oldTab);
3665 DCHECK(newTab); 3664 DCHECK(newTab);
3666 3665
3667 bool canPruneItems = 3666 bool canPruneItems =
3668 [newTab navigationManager]->CanPruneAllButLastCommittedItem(); 3667 [newTab navigationManager]->CanPruneAllButLastCommittedItem();
3669 3668
3670 if (oldTab && newTab && canPruneItems) { 3669 if (oldTab && newTab && canPruneItems) {
3671 [oldTab recordStateInHistory];
3672 [newTab navigationManager]->CopyStateFromAndPrune( 3670 [newTab navigationManager]->CopyStateFromAndPrune(
3673 [oldTab navigationManager]); 3671 [oldTab navigationManager]);
3674 [[newTab nativeAppNavigationController] 3672 [[newTab nativeAppNavigationController]
3675 copyStateFrom:[oldTab nativeAppNavigationController]]; 3673 copyStateFrom:[oldTab nativeAppNavigationController]];
3676 3674
3677 [_model webStateList]->ReplaceWebStateAt([_model indexOfTab:oldTab], 3675 [_model webStateList]->ReplaceWebStateAt([_model indexOfTab:oldTab],
3678 std::move(newWebState)); 3676 std::move(newWebState));
3679 3677
3680 // Set isPrerenderTab to NO after replacing the tab. This will allow the 3678 // Set isPrerenderTab to NO after replacing the tab. This will allow the
3681 // BrowserViewController to detect that a pre-rendered tab is switched in, 3679 // BrowserViewController to detect that a pre-rendered tab is switched in,
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
5131 5129
5132 - (UIView*)voiceSearchButton { 5130 - (UIView*)voiceSearchButton {
5133 return _voiceSearchButton; 5131 return _voiceSearchButton;
5134 } 5132 }
5135 5133
5136 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5134 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5137 return [self currentLogoAnimationControllerOwner]; 5135 return [self currentLogoAnimationControllerOwner];
5138 } 5136 }
5139 5137
5140 @end 5138 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698