| Index: chrome/browser/ui/panels/panel_window_controller_cocoa.mm
|
| diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
|
| index 97f05e339422a55d03b1bd7ca2f473e21867d7a5..fc16924d56724022d7f707fa9f2f99b0a60184de 100644
|
| --- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
|
| +++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
|
| @@ -79,6 +79,7 @@ enum {
|
| if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
|
| windowShim_.reset(window);
|
| animateOnBoundsChange_ = YES;
|
| + canBecomeKeyWindow_ = YES;
|
| }
|
| contentsController_.reset(
|
| [[TabContentsController alloc] initWithContents:nil]);
|
| @@ -623,6 +624,10 @@ enum {
|
| [NSApp deactivate];
|
| }
|
|
|
| +- (void)preventBecomingKeyWindow:(BOOL)prevent {
|
| + canBecomeKeyWindow_ = !prevent;
|
| +}
|
| +
|
| - (void)fullScreenModeChanged:(bool)isFullScreen {
|
| NSWindow* window = [self window];
|
| [window setLevel:(isFullScreen ? NSNormalWindowLevel : NSStatusWindowLevel)];
|
| @@ -634,6 +639,6 @@ enum {
|
| // TODO(dimich): If it will be ever desired to expand/focus the Panel on
|
| // keyboard navigation or via main menu, the care should be taken to avoid
|
| // cases when minimized Panel is getting keyboard input, invisibly.
|
| - return windowShim_->panel()->expansion_state() == Panel::EXPANDED;
|
| + return canBecomeKeyWindow_;
|
| }
|
| @end
|
|
|