| OLD | NEW |
| 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 3854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3865 #pragma mark - Command Handling | 3865 #pragma mark - Command Handling |
| 3866 | 3866 |
| 3867 - (IBAction)chromeExecuteCommand:(id)sender { | 3867 - (IBAction)chromeExecuteCommand:(id)sender { |
| 3868 NSInteger command = [sender tag]; | 3868 NSInteger command = [sender tag]; |
| 3869 | 3869 |
| 3870 if (!_model || !_browserState) | 3870 if (!_model || !_browserState) |
| 3871 return; | 3871 return; |
| 3872 | 3872 |
| 3873 switch (command) { | 3873 switch (command) { |
| 3874 case IDC_BACK: | 3874 case IDC_BACK: |
| 3875 [[_model currentTab] goBack]; | 3875 // TODO(crbug.com.677160): Remove |canGoBack| check. |
| 3876 if ([_model currentTab].canGoBack) { |
| 3877 [[_model currentTab] goBack]; |
| 3878 } |
| 3876 break; | 3879 break; |
| 3877 case IDC_BOOKMARK_PAGE: | 3880 case IDC_BOOKMARK_PAGE: |
| 3878 [self initializeBookmarkInteractionController]; | 3881 [self initializeBookmarkInteractionController]; |
| 3879 [_bookmarkInteractionController | 3882 [_bookmarkInteractionController |
| 3880 presentBookmarkForTab:[_model currentTab] | 3883 presentBookmarkForTab:[_model currentTab] |
| 3881 currentlyBookmarked:_toolbarModelIOS->IsCurrentTabBookmarkedByUser() | 3884 currentlyBookmarked:_toolbarModelIOS->IsCurrentTabBookmarkedByUser() |
| 3882 inView:[_toolbarController bookmarkButtonView] | 3885 inView:[_toolbarController bookmarkButtonView] |
| 3883 originRect:[_toolbarController bookmarkButtonAnchorRect]]; | 3886 originRect:[_toolbarController bookmarkButtonAnchorRect]]; |
| 3884 break; | 3887 break; |
| 3885 case IDC_CLOSE_TAB: | 3888 case IDC_CLOSE_TAB: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 3906 [_findBarController updateResultsCount:model]; | 3909 [_findBarController updateResultsCount:model]; |
| 3907 }]; | 3910 }]; |
| 3908 break; | 3911 break; |
| 3909 case IDC_FIND_CLOSE: | 3912 case IDC_FIND_CLOSE: |
| 3910 [self closeFindInPage]; | 3913 [self closeFindInPage]; |
| 3911 break; | 3914 break; |
| 3912 case IDC_FIND_UPDATE: | 3915 case IDC_FIND_UPDATE: |
| 3913 [self searchFindInPage]; | 3916 [self searchFindInPage]; |
| 3914 break; | 3917 break; |
| 3915 case IDC_FORWARD: | 3918 case IDC_FORWARD: |
| 3916 [[_model currentTab] goForward]; | 3919 // TODO(crbug.com.677160): Remove |canGoForward| check. |
| 3920 if ([_model currentTab].canGoForward) { |
| 3921 [[_model currentTab] goForward]; |
| 3922 } |
| 3917 break; | 3923 break; |
| 3918 case IDC_FULLSCREEN: | 3924 case IDC_FULLSCREEN: |
| 3919 NOTIMPLEMENTED(); | 3925 NOTIMPLEMENTED(); |
| 3920 break; | 3926 break; |
| 3921 case IDC_HELP_PAGE_VIA_MENU: | 3927 case IDC_HELP_PAGE_VIA_MENU: |
| 3922 [self showHelpPage]; | 3928 [self showHelpPage]; |
| 3923 break; | 3929 break; |
| 3924 case IDC_NEW_TAB: | 3930 case IDC_NEW_TAB: |
| 3925 if (_isOffTheRecord) { | 3931 if (_isOffTheRecord) { |
| 3926 // Not for this browser state, send it on its way. | 3932 // Not for this browser state, send it on its way. |
| (...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5092 | 5098 |
| 5093 - (UIView*)voiceSearchButton { | 5099 - (UIView*)voiceSearchButton { |
| 5094 return _voiceSearchButton; | 5100 return _voiceSearchButton; |
| 5095 } | 5101 } |
| 5096 | 5102 |
| 5097 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5103 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5098 return [self currentLogoAnimationControllerOwner]; | 5104 return [self currentLogoAnimationControllerOwner]; |
| 5099 } | 5105 } |
| 5100 | 5106 |
| 5101 @end | 5107 @end |
| OLD | NEW |