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

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

Issue 1432053002: Hide the fullscreen toolbar only for FramedBrowserWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/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];
}
}
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm ('k') | chrome/browser/ui/cocoa/chrome_event_processing_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698