Close bubbles not on UpdateToolbar but when the activated tab is changed

Now Browser::UpdateToolbar is called not only when the activated tab is
changed but also when, for example, a provisional document loader is
canceled. As a result of this, the Translate bubble is closed when a
navigation in an iframe happens. This is not an expected behavior. Apart
from a provisional document, I found some unexpected conditions where
the bubble is closed (e.g.
Browser::OnWebContentsInstantSupportDisabled calls UpdateToolbar).

This CL changes the logic to avoid closing the bubble on UpdateToolbar.
Instead, the logic is changed to close the bubble when the activated
tab is changed (Browser::ActivateTabChanged).

BUG=433272
TEST=manual

Review URL: https://codereview.chromium.org/739793003

Cr-Commit-Position: refs/heads/master@{#304990}
2 files changed