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

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

Issue 1568983002: Close the save card bubble on tab switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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
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 a5195bdc14689d10b88cb522a16508c65b1a180d..56f9535988bf1d93dcb6d8ae7691c9be190370be 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -33,6 +33,7 @@
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/browser/ui/views/autofill/save_card_bubble_views.h"
#include "chrome/browser/ui/views/autofill/save_card_icon_view.h"
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h"
@@ -989,6 +990,8 @@ bool LocationBarView::RefreshSaveCreditCardIconView() {
command_updater()->UpdateCommandEnabled(IDC_SAVE_CREDIT_CARD_FOR_PAGE,
enabled);
save_credit_card_icon_view_->SetVisible(enabled);
+ if (!enabled)
+ autofill::SaveCardBubbleViews::CloseBubble();
Evan Stade 2016/01/08 03:19:45 save_credit_card_icon_view_->GetBubble()->Hide()?
Justin Donnelly 2016/01/08 18:14:05 Yes, that's very much what I'd prefer to do. The p
return was_visible != save_credit_card_icon_view_->visible();
}

Powered by Google App Engine
This is Rietveld 408576698