| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 - (id)initWithContentRect:(NSRect)contentRect | 62 - (id)initWithContentRect:(NSRect)contentRect |
| 63 hasTabStrip:(BOOL)hasTabStrip{ | 63 hasTabStrip:(BOOL)hasTabStrip{ |
| 64 NSUInteger styleMask = NSTitledWindowMask | | 64 NSUInteger styleMask = NSTitledWindowMask | |
| 65 NSClosableWindowMask | | 65 NSClosableWindowMask | |
| 66 NSMiniaturizableWindowMask | | 66 NSMiniaturizableWindowMask | |
| 67 NSResizableWindowMask | | 67 NSResizableWindowMask | |
| 68 NSTexturedBackgroundWindowMask; | 68 NSTexturedBackgroundWindowMask; |
| 69 if ((self = [super initWithContentRect:contentRect | 69 if ((self = [super initWithContentRect:contentRect |
| 70 styleMask:styleMask | 70 styleMask:styleMask |
| 71 backing:NSBackingStoreBuffered | 71 backing:NSBackingStoreBuffered |
| 72 defer:YES])) { | 72 defer:YES |
| 73 wantsViewsOverTitlebar:hasTabStrip])) { |
| 73 // The 10.6 fullscreen code copies the title to a different window, which | 74 // The 10.6 fullscreen code copies the title to a different window, which |
| 74 // will assert if it's nil. | 75 // will assert if it's nil. |
| 75 [self setTitle:@""]; | 76 [self setTitle:@""]; |
| 76 | 77 |
| 77 // The following two calls fix http://crbug.com/25684 by preventing the | 78 // The following two calls fix http://crbug.com/25684 by preventing the |
| 78 // window from recalculating the border thickness as the window is | 79 // window from recalculating the border thickness as the window is |
| 79 // resized. | 80 // resized. |
| 80 // This was causing the window tint to change for the default system theme | 81 // This was causing the window tint to change for the default system theme |
| 81 // when the window was being resized. | 82 // when the window was being resized. |
| 82 [self setAutorecalculatesContentBorderThickness:NO forEdge:NSMaxYEdge]; | 83 [self setAutorecalculatesContentBorderThickness:NO forEdge:NSMaxYEdge]; |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 ThemedWindowStyle windowStyle = [self themedWindowStyle]; | 424 ThemedWindowStyle windowStyle = [self themedWindowStyle]; |
| 424 BOOL incognito = windowStyle & THEMED_INCOGNITO; | 425 BOOL incognito = windowStyle & THEMED_INCOGNITO; |
| 425 | 426 |
| 426 if (incognito) | 427 if (incognito) |
| 427 return [NSColor whiteColor]; | 428 return [NSColor whiteColor]; |
| 428 else | 429 else |
| 429 return [NSColor windowFrameTextColor]; | 430 return [NSColor windowFrameTextColor]; |
| 430 } | 431 } |
| 431 | 432 |
| 432 @end | 433 @end |
| OLD | NEW |