Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3689)

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 739793003: Close bubbles not on UpdateToolbar but when the activated tab is changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 56181b8b0a116782fac57d50d56bc62326a211a2..13003597aec2ce21dab5bff360e23e3004cc9902 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -970,8 +970,6 @@ void LocationBarView::Update(const WebContents* contents) {
browser_->search_model()->voice_search_supported());
RefreshContentSettingViews();
generated_credit_card_view_->Update();
- ZoomBubbleView::CloseBubble();
- TranslateBubbleView::CloseBubble();
RefreshZoomView();
RefreshPageActionViews();
RefreshTranslateIcon();
@@ -1137,6 +1135,8 @@ bool LocationBarView::RefreshZoomView() {
return false;
const bool was_visible = zoom_view_->visible();
zoom_view_->Update(ZoomController::FromWebContents(web_contents));
+ if (!zoom_view_->visible())
+ ZoomBubbleView::CloseBubble();
return was_visible != zoom_view_->visible();
}
@@ -1153,6 +1153,8 @@ void LocationBarView::RefreshTranslateIcon() {
command_updater()->UpdateCommandEnabled(IDC_TRANSLATE_PAGE, enabled);
translate_icon_view_->SetVisible(enabled);
translate_icon_view_->SetToggled(language_state.IsPageTranslated());
+ if (!enabled)
+ TranslateBubbleView::CloseBubble();
}
bool LocationBarView::RefreshManagePasswordsIconView() {
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698