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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc

Issue 1028243004: Hide the password bubble when the underlying ManagePasswordsUIController changes its state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a Mac test Created 5 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_icon_view.h ('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/passwords/manage_passwords_icon_view.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc
index 22945750bc093f9828e75bfd1a2c58da595cf846..a0a54b1ea08c6ede46e2cea8cb6dc440af636258 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc
@@ -23,8 +23,6 @@ ManagePasswordsIconView::~ManagePasswordsIconView() {}
void ManagePasswordsIconView::UpdateVisibleUI() {
if (state() == password_manager::ui::INACTIVE_STATE) {
SetVisible(false);
- if (ManagePasswordsBubbleView::IsShowing())
- ManagePasswordsBubbleView::CloseBubble();
return;
}
@@ -38,6 +36,12 @@ void ManagePasswordsIconView::UpdateVisibleUI() {
parent()->Layout();
}
+void ManagePasswordsIconView::OnChangingState() {
+ // If there is an opened bubble for the current icon it should go away.
+ if (active())
+ ManagePasswordsBubbleView::CloseBubble();
+}
+
bool ManagePasswordsIconView::IsBubbleShowing() const {
// If the bubble is being destroyed, it's considered showing though it may be
// already invisible currently.
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_icon_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698