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

Unified Diff: chrome/browser/ui/cocoa/base_bubble_controller.mm

Issue 49063012: [rAC, OSX] Use bubble windows for error messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix failing tests. Created 7 years, 1 month 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/cocoa/base_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller.mm b/chrome/browser/ui/cocoa/base_bubble_controller.mm
index fad938f381753510dd6ebe7abd54b47d80ef7c56..42b62b0d77101680a785a53f5d8759f7a8546e19 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -29,6 +29,7 @@
@synthesize anchorPoint = anchor_;
@synthesize bubble = bubble_;
@synthesize shouldOpenAsKeyWindow = shouldOpenAsKeyWindow_;
+@synthesize shouldCloseOnResignKey = shouldCloseOnResignKey_;
- (id)initWithWindowNibPath:(NSString*)nibPath
parentWindow:(NSWindow*)parentWindow
@@ -72,6 +73,7 @@
parentWindow_ = parentWindow;
anchor_ = anchoredAt;
shouldOpenAsKeyWindow_ = YES;
+ shouldCloseOnResignKey_ = YES;
DCHECK(![[self window] delegate]);
[theWindow setDelegate:self];
@@ -184,7 +186,7 @@
- (void)windowDidResignKey:(NSNotification*)notification {
NSWindow* window = [self window];
DCHECK_EQ([notification object], window);
- if ([window isVisible]) {
+ if ([window isVisible] && [self shouldCloseOnResignKey]) {
// If the window isn't visible, it is already closed, and this notification
// has been sent as part of the closing operation, so no need to close.
[self close];

Powered by Google App Engine
This is Rietveld 408576698