Chromium Code Reviews| 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..5890f14d42c14bc7c7572c17973fa5c00a5b53f3 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,9 @@ void LocationBarView::RefreshTranslateIcon() { |
| command_updater()->UpdateCommandEnabled(IDC_TRANSLATE_PAGE, enabled); |
| translate_icon_view_->SetVisible(enabled); |
| translate_icon_view_->SetToggled(language_state.IsPageTranslated()); |
| + |
|
Peter Kasting
2014/11/20 06:27:44
Nit: I probably wouldn't add this blank line
hajimehoshi
2014/11/20 06:48:27
Done.
|
| + if (!enabled) |
| + TranslateBubbleView::CloseBubble(); |
| } |
| bool LocationBarView::RefreshManagePasswordsIconView() { |