Skip to content

Commit

Permalink
Call WebState::WasHidden on Tab removal.
Browse files Browse the repository at this point in the history
The primary purpose of this CL is to fix a bug, when
Download Manager UI persists after closing and reopening a tab.

There is an alternative fix which is to dismiss Download Manager
UI in DownloadManagerTabHelper::WebStateWasDestroyed, but calling
WebState::WasHidden for closed WebState sounds like the right
approach in general.

TBR=eugenebut@chromium.org

(cherry picked from commit 6ebb327)

Bug: 919974
Change-Id: I204514995d616297b0745763dcd5acc21afef678
Reviewed-on: https://chromium-review.googlesource.com/c/1433497
Auto-Submit: Eugene But <eugenebut@chromium.org>
Reviewed-by: edchin <edchin@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#626608}
Reviewed-on: https://chromium-review.googlesource.com/c/1444140
Reviewed-by: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/branch-heads/3683@{#56}
Cr-Branched-From: e510299-refs/heads/master@{#625896}
  • Loading branch information
Eugene But authored and Eugene But committed Jan 30, 2019
1 parent 78c2b66 commit 3300475
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ios/chrome/browser/ui/browser_view_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4529,6 +4529,8 @@ - (void)tabModel:(TabModel*)model
- (void)tabModel:(TabModel*)model
didRemoveTab:(Tab*)tab
atIndex:(NSUInteger)index {
tab.webState->WasHidden();

[self uninstallDelegatesForTab:tab];

// Cancel dialogs for |tab|'s WebState.
Expand Down

0 comments on commit 3300475

Please sign in to comment.