| 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 4461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4472 BOOL enableContextualSearch = self.active && !tab.isVoiceSearchResultsTab; | 4472 BOOL enableContextualSearch = self.active && !tab.isVoiceSearchResultsTab; |
| 4473 [_contextualSearchController enableContextualSearch:enableContextualSearch]; | 4473 [_contextualSearchController enableContextualSearch:enableContextualSearch]; |
| 4474 } | 4474 } |
| 4475 } | 4475 } |
| 4476 | 4476 |
| 4477 // Observer method, tab replaced. | 4477 // Observer method, tab replaced. |
| 4478 - (void)tabModel:(TabModel*)model | 4478 - (void)tabModel:(TabModel*)model |
| 4479 didReplaceTab:(Tab*)oldTab | 4479 didReplaceTab:(Tab*)oldTab |
| 4480 withTab:(Tab*)newTab | 4480 withTab:(Tab*)newTab |
| 4481 atIndex:(NSUInteger)index { | 4481 atIndex:(NSUInteger)index { |
| 4482 [self installDelegatesForTab:newTab]; |
| 4483 |
| 4482 // Add |newTab|'s view to the hierarchy if it's the current Tab. | 4484 // Add |newTab|'s view to the hierarchy if it's the current Tab. |
| 4483 if (self.active && model.currentTab == newTab) | 4485 if (self.active && model.currentTab == newTab) |
| 4484 [self displayTab:newTab isNewSelection:NO]; | 4486 [self displayTab:newTab isNewSelection:NO]; |
| 4485 } | 4487 } |
| 4486 | 4488 |
| 4487 // A tab has been removed, remove its views from display if necessary. | 4489 // A tab has been removed, remove its views from display if necessary. |
| 4488 - (void)tabModel:(TabModel*)model | 4490 - (void)tabModel:(TabModel*)model |
| 4489 didRemoveTab:(Tab*)tab | 4491 didRemoveTab:(Tab*)tab |
| 4490 atIndex:(NSUInteger)index { | 4492 atIndex:(NSUInteger)index { |
| 4491 // Remove stored native controllers for the tab. | 4493 // Remove stored native controllers for the tab. |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5038 | 5040 |
| 5039 - (UIView*)voiceSearchButton { | 5041 - (UIView*)voiceSearchButton { |
| 5040 return _voiceSearchButton; | 5042 return _voiceSearchButton; |
| 5041 } | 5043 } |
| 5042 | 5044 |
| 5043 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5045 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5044 return [self currentLogoAnimationControllerOwner]; | 5046 return [self currentLogoAnimationControllerOwner]; |
| 5045 } | 5047 } |
| 5046 | 5048 |
| 5047 @end | 5049 @end |
| OLD | NEW |