DescriptionProperly attach InfoBarContainer when it is swapped to a new WebContents
* Moves the swapping of the InfoBarService from TabAndroid::SwapWebContents() to after TabAndroid::InitWebContents() is called from Tab.setContentViewCore(). This is necessary because InitWebContents attaches the InfoBarService to the WebContents; trying to swap before this point means that the InfoBarContainer will be observing nothing.
* Fixes the ChromeShellActivity/Tab to properly update the ContentViewCore when it is swapped. This fixes the "Distill page" menu item.
* Adds a test to try to prevent this from happening in the future.
BUG=469026
TEST=InfoBarTest.testInfoBarContainerSwapsWebContents
Committed: https://crrev.com/b96bae62466da45e949427e4ea56e1493d1bd47f
Cr-Commit-Position: refs/heads/master@{#326642}
Patch Set 1 #Patch Set 2 : Fixing completely differently #Patch Set 3 : Spacing #
Total comments: 10
Patch Set 4 : Comments #Messages
Total messages: 13 (4 generated)
|