Chromium Code Reviews| Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm |
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm |
| index 0fdcfa38db91b676b04156afd53bda05c5d67a61..15d185de320c80b80bc3dd0f54a42013ff6ae0aa 100644 |
| --- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm |
| +++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm |
| @@ -100,6 +100,14 @@ void RecordFullscreenStyle(FullscreenStyle style) { |
| } // namespace |
| +@interface NSWindow (NSPrivateApis) |
| +// Note: These functions are private, use -[NSObject respondsToSelector:] |
| +// before calling them. |
| + |
| +- (NSWindow*)_windowForToolbar; |
| + |
| +@end |
| + |
| @implementation BrowserWindowController(Private) |
| // Create the tab strip controller. |
| @@ -712,6 +720,15 @@ willPositionSheet:(NSWindow*)sheet |
| for (NSWindow* window in [[NSApplication sharedApplication] windows]) { |
| if ([window |
| isKindOfClass:NSClassFromString(@"NSToolbarFullScreenWindow")]) { |
| + // Check if the window that the toolbar belongs to is a Chrome App |
| + // window. If it is, then don't hide it. |
| + if ([window respondsToSelector:@selector(_windowForToolbar)]) { |
| + NSWindow* windowForToolbar = [window _windowForToolbar]; |
| + SEL selector = @selector(shouldHideFullscreenToolbar); |
|
erikchen
2015/11/10 08:17:22
If you're just trying to skip the Chrome App windo
spqchan
2015/11/10 17:14:28
Former: I did that earlier in Patch 2, please see
|
| + if ([windowForToolbar respondsToSelector:selector] && |
| + ![windowForToolbar performSelector:selector]) |
| + continue; |
| + } |
| [[window contentView] setHidden:YES]; |
| } |
| } |