-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some tab lifetime management issues in TabLifecycleUnitSource.
Move the WebContentsObserver from TabLifeCycleUnit to TabLifeCycleUnitSource, this allows for a better tracking of the WebContents lifetime, in some situation a WebContents might get detached from the TabStrip and then destroyed, which mean that we won't get a TabClosingAt notification for this tab destruction. Another solution would be to implement the TabStripModelObserver::TabDetachedAt function and track the tabs which are in a detached state but this is slightly more complex because TabDetachedAt might be called for several reasons: - A TabDetachedAt usually come after a TabClosedAt event. - TabDetachedAt might be followed by TabInsertedAt, or not if it get destroyed. because of this we won't know if we should keep the TabLifeCycleUnit for this WebContents around (i.e. if it'll get re-inserted in a tab strip) or destroy it because it's being destroyed. Observing WebContentsObserver::WebContentsDestroyed and moving the logic that was in TabClosingAt to this method address these issues, it's the same approach than the one we took in TabStatsTracker. Bug: 819352, 818454 Change-Id: Ibd3fe49b2798ade19ee781cb70eb30e52372d686 Reviewed-on: https://chromium-review.googlesource.com/952405 Commit-Queue: Sébastien Marchand <[email protected]> Reviewed-by: Chris Hamilton <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#541540}(cherry picked from commit 70546dc) Reviewed-on: https://chromium-review.googlesource.com/953367 Reviewed-by: Sébastien Marchand <[email protected]> Cr-Commit-Position: refs/branch-heads/3359@{#74} Cr-Branched-From: 66afc5e-refs/heads/master@{#540276}
- Loading branch information
1 parent
74361db
commit ce49bf6
Showing
6 changed files
with
99 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters