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

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

Issue 13160004: Re-implement form validation message UI with native widgets. (Common and Mac) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adopt new Blink interface Created 7 years, 8 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/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 375cb136a9c56222bcd11fb786783eb570941ebd..dc830e3e155a67398b3aefcbf3129317bc78771b 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -28,6 +28,7 @@
@synthesize parentWindow = parentWindow_;
@synthesize anchorPoint = anchor_;
@synthesize bubble = bubble_;
+@synthesize shouldOpenKeyWindow = shouldOpenKeyWindow_;
- (id)initWithWindowNibPath:(NSString*)nibPath
parentWindow:(NSWindow*)parentWindow
@@ -45,6 +46,7 @@
name:NSWindowWillCloseNotification
object:parentWindow_];
}
+ shouldOpenKeyWindow_ = true;
Nico 2013/04/25 22:57:49 s/true/YES/, also move it one line up into the if
tkent 2013/04/29 22:24:19 Done.
return self;
}
@@ -87,6 +89,7 @@
[self awakeFromNib];
}
+ shouldOpenKeyWindow_ = true;
Nico 2013/04/25 22:57:49 likewise
tkent 2013/04/29 22:24:19 Done.
return self;
}
@@ -148,7 +151,10 @@
NSWindow* window = [self window]; // Completes nib load.
[self updateOriginFromAnchor];
[parentWindow_ addChildWindow:window ordered:NSWindowAbove];
- [window makeKeyAndOrderFront:self];
+ if (shouldOpenKeyWindow_)
+ [window makeKeyAndOrderFront:self];
+ else
+ [window orderFront:nil];
[self registerKeyStateEventTap];
}

Powered by Google App Engine
This is Rietveld 408576698