Chromium Code Reviews| 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]; |
| } |