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

Unified Diff: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.mm

Issue 528213004: Don't try to show the Mac password bubble on an inactive tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.mm
index 3b2a75f758bde0651eba9e151976da5dcab36072..4c46675ddbca2142dbc27b54e7680374717c6ed3 100644
--- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.mm
@@ -51,6 +51,10 @@ void ShowManagePasswordsBubble(content::WebContents* webContents) {
ManagePasswordsUIController* controller =
ManagePasswordsUIController::FromWebContents(webContents);
NSWindow* window = webContents->GetTopLevelNativeWindow();
+ if (!window) {
+ // The tab isn't active right now.
+ return;
+ }
BrowserWindowController* bwc =
[BrowserWindowController browserWindowControllerForWindow:window];
ManagePasswordsBubbleCocoa::ShowBubble(
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698