OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/ui/cocoa/framed_browser_window.h" | 5 #import "chrome/browser/ui/cocoa/framed_browser_window.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/mac/sdk_forward_declarations.h" | 8 #include "base/mac/sdk_forward_declarations.h" |
9 #include "chrome/browser/global_keyboard_shortcuts_mac.h" | 9 #include "chrome/browser/global_keyboard_shortcuts_mac.h" |
10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 - (id)initWithContentRect:(NSRect)contentRect | 48 - (id)initWithContentRect:(NSRect)contentRect |
49 hasTabStrip:(BOOL)hasTabStrip{ | 49 hasTabStrip:(BOOL)hasTabStrip{ |
50 NSUInteger styleMask = NSTitledWindowMask | | 50 NSUInteger styleMask = NSTitledWindowMask | |
51 NSClosableWindowMask | | 51 NSClosableWindowMask | |
52 NSMiniaturizableWindowMask | | 52 NSMiniaturizableWindowMask | |
53 NSResizableWindowMask | | 53 NSResizableWindowMask | |
54 NSTexturedBackgroundWindowMask; | 54 NSTexturedBackgroundWindowMask; |
55 if ((self = [super initWithContentRect:contentRect | 55 if ((self = [super initWithContentRect:contentRect |
56 styleMask:styleMask | 56 styleMask:styleMask |
57 backing:NSBackingStoreBuffered | 57 backing:NSBackingStoreBuffered |
58 defer:NO | 58 defer:YES |
59 wantsViewsOverTitlebar:hasTabStrip])) { | 59 wantsViewsOverTitlebar:hasTabStrip])) { |
60 // The 10.6 fullscreen code copies the title to a different window, which | 60 // The 10.6 fullscreen code copies the title to a different window, which |
61 // will assert if it's nil. | 61 // will assert if it's nil. |
62 [self setTitle:@""]; | 62 [self setTitle:@""]; |
63 | 63 |
64 // The following two calls fix http://crbug.com/25684 by preventing the | 64 // The following two calls fix http://crbug.com/25684 by preventing the |
65 // window from recalculating the border thickness as the window is | 65 // window from recalculating the border thickness as the window is |
66 // resized. | 66 // resized. |
67 // This was causing the window tint to change for the default system theme | 67 // This was causing the window tint to change for the default system theme |
68 // when the window was being resized. | 68 // when the window was being resized. |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 ThemedWindowStyle windowStyle = [self themedWindowStyle]; | 338 ThemedWindowStyle windowStyle = [self themedWindowStyle]; |
339 BOOL incognito = windowStyle & THEMED_INCOGNITO; | 339 BOOL incognito = windowStyle & THEMED_INCOGNITO; |
340 | 340 |
341 if (incognito) | 341 if (incognito) |
342 return [NSColor whiteColor]; | 342 return [NSColor whiteColor]; |
343 else | 343 else |
344 return [NSColor windowFrameTextColor]; | 344 return [NSColor windowFrameTextColor]; |
345 } | 345 } |
346 | 346 |
347 @end | 347 @end |
OLD | NEW |