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

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

Issue 565673002: Close the password bubble when navigating between tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Android Created 6 years, 3 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/passwords/manage_passwords_bubble_view.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
index b6e70f74144b786d8f2a5632a7153aea9a18c8fd..c9bdc4b96aca17ed18129b93fc0d7a9366081dd3 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -160,6 +160,15 @@ void ShowManagePasswordsBubble(content::WebContents* web_contents) {
: ManagePasswordsBubbleView::USER_ACTION);
}
+void CloseManagePasswordsBubble(content::WebContents* web_contents) {
+ if (!ManagePasswordsBubbleView::IsShowing())
+ return;
+ content::WebContents* bubble_web_contents =
+ ManagePasswordsBubbleView::manage_password_bubble()->web_contents();
+ if (web_contents == bubble_web_contents)
+ ManagePasswordsBubbleView::CloseBubble();
+}
+
} // namespace chrome
@@ -771,6 +780,10 @@ bool ManagePasswordsBubbleView::IsShowing() {
manage_passwords_bubble_->GetWidget()->IsVisible();
}
+content::WebContents* ManagePasswordsBubbleView::web_contents() const {
+ return model()->web_contents();
+}
+
ManagePasswordsBubbleView::ManagePasswordsBubbleView(
content::WebContents* web_contents,
ManagePasswordsIconView* anchor_view,

Powered by Google App Engine
This is Rietveld 408576698