Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cocoa/browser_window_controller.h" | 5 #import "chrome/browser/cocoa/browser_window_controller.h" |
| 6 | 6 |
| 7 #include <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
| 8 | 8 |
| 9 #include "app/l10n_util_mac.h" | 9 #include "app/l10n_util_mac.h" |
| 10 #include "base/mac_util.h" | 10 #include "base/mac_util.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 ofType:@"nib"]; | 262 ofType:@"nib"]; |
| 263 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { | 263 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { |
| 264 DCHECK(browser); | 264 DCHECK(browser); |
| 265 initializing_ = YES; | 265 initializing_ = YES; |
| 266 browser_.reset(browser); | 266 browser_.reset(browser); |
| 267 ownsBrowser_ = ownIt; | 267 ownsBrowser_ = ownIt; |
| 268 tabObserver_.reset( | 268 tabObserver_.reset( |
| 269 new TabStripModelObserverBridge(browser->tabstrip_model(), self)); | 269 new TabStripModelObserverBridge(browser->tabstrip_model(), self)); |
| 270 NSWindow* window = [self window]; | 270 NSWindow* window = [self window]; |
| 271 windowShim_.reset(new BrowserWindowCocoa(browser, self, window)); | 271 windowShim_.reset(new BrowserWindowCocoa(browser, self, window)); |
| 272 | 272 [window setOpaque:NO]; // for themes wanting to play with opacity |
|
Robert Sesek
2010/02/09 21:49:56
Make this a full-stop sentence.
| |
| 273 | 273 |
| 274 // Sets the window to not have rounded corners, which prevents | 274 // Sets the window to not have rounded corners, which prevents |
| 275 // the resize control from being inset slightly and looking ugly. | 275 // the resize control from being inset slightly and looking ugly. |
| 276 if ([window respondsToSelector:@selector(setBottomCornerRounded:)]) | 276 if ([window respondsToSelector:@selector(setBottomCornerRounded:)]) |
| 277 [window setBottomCornerRounded:NO]; | 277 [window setBottomCornerRounded:NO]; |
| 278 | 278 |
| 279 [self setTheme]; | 279 [self setTheme]; |
| 280 | 280 |
| 281 // Get the most appropriate size for the window, then enforce the | 281 // Get the most appropriate size for the window, then enforce the |
| 282 // minimum width and height. The window shim will handle flipping | 282 // minimum width and height. The window shim will handle flipping |
| (...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2337 if (frameOverlayInactiveImage) { | 2337 if (frameOverlayInactiveImage) { |
| 2338 [theme setValue:frameOverlayInactiveImage | 2338 [theme setValue:frameOverlayInactiveImage |
| 2339 forAttribute:@"overlay" | 2339 forAttribute:@"overlay" |
| 2340 style:GTMThemeStyleWindow | 2340 style:GTMThemeStyleWindow |
| 2341 state:GTMThemeStateInactiveWindow]; | 2341 state:GTMThemeStateInactiveWindow]; |
| 2342 } | 2342 } |
| 2343 | 2343 |
| 2344 return theme; | 2344 return theme; |
| 2345 } | 2345 } |
| 2346 @end | 2346 @end |
| OLD | NEW |