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

Unified Diff: chrome/browser/ui/panels/panel_window_controller_cocoa.mm

Issue 9463022: Minimized panels should not open on Windows when activated by the OS (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removed unnecessary include Created 8 years, 9 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 | « chrome/browser/ui/panels/panel_window_controller_cocoa.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/ui/panels/panel_window_controller_cocoa.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698