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

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

Issue 2693013005: Updated tab history classes to use NavigationItemLists. (Closed)
Patch Set: update DEPS, include url_formatter in BUILD.gn Created 3 years, 10 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 | ios/chrome/browser/ui/history/BUILD.gn » ('j') | 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 3337 matching lines...) Expand 10 before | Expand all | Expand 10 after
3348 3348
3349 // Dismiss the omnibox (if open). 3349 // Dismiss the omnibox (if open).
3350 [_toolbarController cancelOmniboxEdit]; 3350 [_toolbarController cancelOmniboxEdit];
3351 // Dismiss the soft keyboard (if open). 3351 // Dismiss the soft keyboard (if open).
3352 Tab* tab = [_model currentTab]; 3352 Tab* tab = [_model currentTab];
3353 [tab.webController dismissKeyboard]; 3353 [tab.webController dismissKeyboard];
3354 3354
3355 DCHECK([tab navigationManager]); 3355 DCHECK([tab navigationManager]);
3356 CRWSessionController* sc = [tab navigationManager]->GetSessionController(); 3356 CRWSessionController* sc = [tab navigationManager]->GetSessionController();
3357 [_toolbarController showTabHistoryPopupInView:[self view] 3357 [_toolbarController showTabHistoryPopupInView:[self view]
3358 withSessionEntries:[sc backwardEntries] 3358 withItems:[sc backwardItems]
3359 forBackHistory:YES]; 3359 forBackHistory:YES];
3360 } 3360 }
3361 3361
3362 - (void)showTabHistoryPopupForForwardHistory { 3362 - (void)showTabHistoryPopupForForwardHistory {
3363 DCHECK(self.visible || self.dismissingModal); 3363 DCHECK(self.visible || self.dismissingModal);
3364 3364
3365 // Dismiss the omnibox (if open). 3365 // Dismiss the omnibox (if open).
3366 [_toolbarController cancelOmniboxEdit]; 3366 [_toolbarController cancelOmniboxEdit];
3367 // Dismiss the soft keyboard (if open). 3367 // Dismiss the soft keyboard (if open).
3368 Tab* tab = [_model currentTab]; 3368 Tab* tab = [_model currentTab];
3369 [tab.webController dismissKeyboard]; 3369 [tab.webController dismissKeyboard];
3370 3370
3371 DCHECK([tab navigationManager]); 3371 DCHECK([tab navigationManager]);
3372 CRWSessionController* sc = [tab navigationManager]->GetSessionController(); 3372 CRWSessionController* sc = [tab navigationManager]->GetSessionController();
3373 [_toolbarController showTabHistoryPopupInView:[self view] 3373 [_toolbarController showTabHistoryPopupInView:[self view]
3374 withSessionEntries:[sc forwardEntries] 3374 withItems:[sc forwardItems]
3375 forBackHistory:NO]; 3375 forBackHistory:NO];
3376 } 3376 }
3377 3377
3378 - (void)navigateToSelectedEntry:(id)sender { 3378 - (void)navigateToSelectedEntry:(id)sender {
3379 DCHECK([sender isKindOfClass:[TabHistoryCell class]]); 3379 DCHECK([sender isKindOfClass:[TabHistoryCell class]]);
3380 TabHistoryCell* selectedCell = (TabHistoryCell*)sender; 3380 TabHistoryCell* selectedCell = (TabHistoryCell*)sender;
3381 [[_model currentTab] goToItem:selectedCell.entry.navigationItem]; 3381 [[_model currentTab] goToItem:selectedCell.item];
3382 [_toolbarController dismissTabHistoryPopup]; 3382 [_toolbarController dismissTabHistoryPopup];
3383 } 3383 }
3384 3384
3385 - (void)print { 3385 - (void)print {
3386 Tab* currentTab = [_model currentTab]; 3386 Tab* currentTab = [_model currentTab];
3387 // The UI should prevent users from printing non-printable pages. However, a 3387 // The UI should prevent users from printing non-printable pages. However, a
3388 // redirection to an un-printable page can happen before it is reflected in 3388 // redirection to an un-printable page can happen before it is reflected in
3389 // the UI. 3389 // the UI.
3390 if (![currentTab viewForPrinting]) { 3390 if (![currentTab viewForPrinting]) {
3391 [self showSnackbar:l10n_util::GetNSString(IDS_IOS_CANNOT_PRINT_PAGE_ERROR)]; 3391 [self showSnackbar:l10n_util::GetNSString(IDS_IOS_CANNOT_PRINT_PAGE_ERROR)];
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
4997 4997
4998 - (UIView*)voiceSearchButton { 4998 - (UIView*)voiceSearchButton {
4999 return _voiceSearchButton; 4999 return _voiceSearchButton;
5000 } 5000 }
5001 5001
5002 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5002 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5003 return [self currentLogoAnimationControllerOwner]; 5003 return [self currentLogoAnimationControllerOwner];
5004 } 5004 }
5005 5005
5006 @end 5006 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/history/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698