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

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

Issue 2926413004: Cancel dialogs for Tabs when they are removed from their TabModels. (Closed)
Patch Set: Revert to patch #1; DCHECK fix is non-essential and will be in follow-up CL Created 3 years, 6 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 | no next file » | 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 4614 matching lines...) Expand 10 before | Expand all | Expand 10 after
4625 if (self.active && model.currentTab == newTab) 4625 if (self.active && model.currentTab == newTab)
4626 [self displayTab:newTab isNewSelection:NO]; 4626 [self displayTab:newTab isNewSelection:NO];
4627 } 4627 }
4628 4628
4629 // A tab has been removed, remove its views from display if necessary. 4629 // A tab has been removed, remove its views from display if necessary.
4630 - (void)tabModel:(TabModel*)model 4630 - (void)tabModel:(TabModel*)model
4631 didRemoveTab:(Tab*)tab 4631 didRemoveTab:(Tab*)tab
4632 atIndex:(NSUInteger)index { 4632 atIndex:(NSUInteger)index {
4633 [self uninstallDelegatesForTab:tab]; 4633 [self uninstallDelegatesForTab:tab];
4634 4634
4635 // Cancel dialogs for |tab|'s WebState.
4636 [self.dialogPresenter cancelDialogForWebState:tab.webState];
4637
4635 // Remove stored native controllers for the tab. 4638 // Remove stored native controllers for the tab.
4636 [_nativeControllersForTabIDs removeObjectForKey:tab.tabId]; 4639 [_nativeControllersForTabIDs removeObjectForKey:tab.tabId];
4637 4640
4638 // Ignore changes while the tab stack view is visible (or while suspended). 4641 // Ignore changes while the tab stack view is visible (or while suspended).
4639 // The display will be refreshed when this view becomes active again. 4642 // The display will be refreshed when this view becomes active again.
4640 if (!self.visible || !model.webUsageEnabled) 4643 if (!self.visible || !model.webUsageEnabled)
4641 return; 4644 return;
4642 4645
4643 // Remove the find bar for now. 4646 // Remove the find bar for now.
4644 [self hideFindBarWithAnimation:NO]; 4647 [self hideFindBarWithAnimation:NO];
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
5182 5185
5183 - (UIView*)voiceSearchButton { 5186 - (UIView*)voiceSearchButton {
5184 return _voiceSearchButton; 5187 return _voiceSearchButton;
5185 } 5188 }
5186 5189
5187 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5190 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5188 return [self currentLogoAnimationControllerOwner]; 5191 return [self currentLogoAnimationControllerOwner];
5189 } 5192 }
5190 5193
5191 @end 5194 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698