| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include <Carbon/Carbon.h> | 5 #include <Carbon/Carbon.h> |
| 6 | 6 |
| 7 #include "base/mac_util.h" | 7 #include "base/mac_util.h" |
| 8 #include "base/scoped_nsdisable_screen_updates.h" | 8 #include "base/scoped_nsdisable_screen_updates.h" |
| 9 #import "base/scoped_nsobject.h" | 9 #import "base/scoped_nsobject.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // from this method. | 255 // from this method. |
| 256 - (void)windowWillClose:(NSNotification*)notification { | 256 - (void)windowWillClose:(NSNotification*)notification { |
| 257 DCHECK_EQ([notification object], [self window]); | 257 DCHECK_EQ([notification object], [self window]); |
| 258 DCHECK(!browser_->tabstrip_model()->count()); | 258 DCHECK(!browser_->tabstrip_model()->count()); |
| 259 [savedRegularWindow_ close]; | 259 [savedRegularWindow_ close]; |
| 260 [bookmarkBubbleController_ close]; | 260 [bookmarkBubbleController_ close]; |
| 261 // We delete statusBubble here because we need to kill off the dependency | 261 // We delete statusBubble here because we need to kill off the dependency |
| 262 // that its window has on our window before our window goes away. | 262 // that its window has on our window before our window goes away. |
| 263 delete statusBubble_; | 263 delete statusBubble_; |
| 264 statusBubble_ = NULL; | 264 statusBubble_ = NULL; |
| 265 // We can't actually use |-autorelease| here because there's an embedded | 265 [self autorelease]; |
| 266 // run loop in the |-performClose:| which contains its own autorelease pool. | |
| 267 // Instead we call it after a zero-length delay, which gets us back | |
| 268 // to the main event loop. | |
| 269 [self performSelector:@selector(autorelease) | |
| 270 withObject:nil | |
| 271 afterDelay:0]; | |
| 272 } | 266 } |
| 273 | 267 |
| 274 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window { | 268 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window { |
| 275 [tabStripController_ attachConstrainedWindow:window]; | 269 [tabStripController_ attachConstrainedWindow:window]; |
| 276 } | 270 } |
| 277 | 271 |
| 278 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window { | 272 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window { |
| 279 [tabStripController_ removeConstrainedWindow:window]; | 273 [tabStripController_ removeConstrainedWindow:window]; |
| 280 } | 274 } |
| 281 | 275 |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1534 if (frameOverlayInactiveImage) { | 1528 if (frameOverlayInactiveImage) { |
| 1535 [theme setValue:frameOverlayInactiveImage | 1529 [theme setValue:frameOverlayInactiveImage |
| 1536 forAttribute:@"overlay" | 1530 forAttribute:@"overlay" |
| 1537 style:GTMThemeStyleWindow | 1531 style:GTMThemeStyleWindow |
| 1538 state:GTMThemeStateInactiveWindow]; | 1532 state:GTMThemeStateInactiveWindow]; |
| 1539 } | 1533 } |
| 1540 | 1534 |
| 1541 return theme; | 1535 return theme; |
| 1542 } | 1536 } |
| 1543 @end | 1537 @end |
| OLD | NEW |