| 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 4556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4567 } | 4567 } |
| 4568 } | 4568 } |
| 4569 | 4569 |
| 4570 // Observer method, tab replaced. | 4570 // Observer method, tab replaced. |
| 4571 - (void)tabModel:(TabModel*)model | 4571 - (void)tabModel:(TabModel*)model |
| 4572 didReplaceTab:(Tab*)oldTab | 4572 didReplaceTab:(Tab*)oldTab |
| 4573 withTab:(Tab*)newTab | 4573 withTab:(Tab*)newTab |
| 4574 atIndex:(NSUInteger)index { | 4574 atIndex:(NSUInteger)index { |
| 4575 [self uninstallDelegatesForTab:oldTab]; | 4575 [self uninstallDelegatesForTab:oldTab]; |
| 4576 [self installDelegatesForTab:newTab]; | 4576 [self installDelegatesForTab:newTab]; |
| 4577 |
| 4578 // Add |newTab|'s view to the hierarchy if it's the current Tab. |
| 4579 if (self.active && model.currentTab == newTab) |
| 4580 [self displayTab:newTab isNewSelection:NO]; |
| 4577 } | 4581 } |
| 4578 | 4582 |
| 4579 // A tab has been removed, remove its views from display if necessary. | 4583 // A tab has been removed, remove its views from display if necessary. |
| 4580 - (void)tabModel:(TabModel*)model | 4584 - (void)tabModel:(TabModel*)model |
| 4581 didRemoveTab:(Tab*)tab | 4585 didRemoveTab:(Tab*)tab |
| 4582 atIndex:(NSUInteger)index { | 4586 atIndex:(NSUInteger)index { |
| 4583 [self uninstallDelegatesForTab:tab]; | 4587 [self uninstallDelegatesForTab:tab]; |
| 4584 | 4588 |
| 4585 // Remove stored native controllers for the tab. | 4589 // Remove stored native controllers for the tab. |
| 4586 [_nativeControllersForTabIDs removeObjectForKey:tab.tabId]; | 4590 [_nativeControllersForTabIDs removeObjectForKey:tab.tabId]; |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5125 | 5129 |
| 5126 - (UIView*)voiceSearchButton { | 5130 - (UIView*)voiceSearchButton { |
| 5127 return _voiceSearchButton; | 5131 return _voiceSearchButton; |
| 5128 } | 5132 } |
| 5129 | 5133 |
| 5130 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5134 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5131 return [self currentLogoAnimationControllerOwner]; | 5135 return [self currentLogoAnimationControllerOwner]; |
| 5132 } | 5136 } |
| 5133 | 5137 |
| 5134 @end | 5138 @end |
| OLD | NEW |