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

Unified Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm

Issue 329793003: Don't draw a window title on browser windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
Index: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
index a4ad4eabc04d88a0f14caf214ffa876118597cd7..6850748fbe7008b9dae379a85fb858de4733f633 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
@@ -211,10 +211,29 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions(
@end
@implementation ShellNSWindow
+- (instancetype)initWithContentRect:(NSRect)contentRect
+ styleMask:(NSUInteger)windowStyle
+ backing:(NSBackingStoreType)bufferingType
+ defer:(BOOL)deferCreation {
+ if ((self = [super initWithContentRect:contentRect
+ styleMask:windowStyle
+ backing:bufferingType
+ defer:deferCreation])) {
+ if ([self respondsToSelector:@selector(setTitleVisibility:)])
+ self.titleVisibility = NSWindowTitleHidden;
+ }
+
+ return self;
+}
+
// Similar to ChromeBrowserWindow, don't draw the title, but allow it to be seen
// in menus, Expose, etc.
- (BOOL)_isTitleHidden {
- return YES;
+ // Only intervene with 10.6-10.9.
+ if ([self respondsToSelector:@selector(setTitleVisibility:)])
+ return [super _isTitleHidden];
+ else
+ return YES;
}
@end

Powered by Google App Engine
This is Rietveld 408576698