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

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: Updated a comment 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8d424e6f64333ea67784bcdf1f656bc4cc5cb956 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,7 +720,12 @@ willPositionSheet:(NSWindow*)sheet
for (NSWindow* window in [[NSApplication sharedApplication] windows]) {
if ([window
isKindOfClass:NSClassFromString(@"NSToolbarFullScreenWindow")]) {
- [[window contentView] setHidden:YES];
+ // Hide the toolbar if it is for a FramedBrowserWindow.
+ if ([window respondsToSelector:@selector(_windowForToolbar)]) {
+ if ([[window _windowForToolbar]
+ isKindOfClass:[FramedBrowserWindow class]])
+ [[window contentView] setHidden:YES];
+ }
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698