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
TBR=newt
Review URL: https://codereview.chromium.org/1049383008
Cr-Commit-Position: refs/heads/master@{#326642}
Committed: https://chromium.googlesource.com/chromium/src/+/ffcc397d404ede173c2c93e4c2a2969459fe9558
Patch Set 1 #Messages
Total messages: 2 (1 generated)
|