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 "app/l10n_util_mac.h" | 7 #include "app/l10n_util_mac.h" |
8 #include "base/mac_util.h" | 8 #include "base/mac_util.h" |
9 #include "base/scoped_nsdisable_screen_updates.h" | 9 #include "base/scoped_nsdisable_screen_updates.h" |
10 #import "base/scoped_nsobject.h" | 10 #import "base/scoped_nsobject.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 statusBubble_ = NULL; | 259 statusBubble_ = NULL; |
260 // We can't actually use |-autorelease| here because there's an embedded | 260 // We can't actually use |-autorelease| here because there's an embedded |
261 // run loop in the |-performClose:| which contains its own autorelease pool. | 261 // run loop in the |-performClose:| which contains its own autorelease pool. |
262 // Instead we call it after a zero-length delay, which gets us back | 262 // Instead we call it after a zero-length delay, which gets us back |
263 // to the main event loop. | 263 // to the main event loop. |
264 [self performSelector:@selector(autorelease) | 264 [self performSelector:@selector(autorelease) |
265 withObject:nil | 265 withObject:nil |
266 afterDelay:0]; | 266 afterDelay:0]; |
267 } | 267 } |
268 | 268 |
269 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window { | 269 - (BOOL)attachConstrainedWindow:(ConstrainedWindowMac*)window { |
270 [tabStripController_ attachConstrainedWindow:window]; | 270 return [tabStripController_ attachConstrainedWindow:window]; |
271 } | 271 } |
272 | 272 |
273 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window { | 273 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window { |
274 [tabStripController_ removeConstrainedWindow:window]; | 274 [tabStripController_ removeConstrainedWindow:window]; |
275 } | 275 } |
276 | 276 |
277 // Called when the user wants to close a window or from the shutdown process. | 277 // Called when the user wants to close a window or from the shutdown process. |
278 // The Browser object is in control of whether or not we're allowed to close. It | 278 // The Browser object is in control of whether or not we're allowed to close. It |
279 // may defer closing due to several states, such as onUnload handlers needing to | 279 // may defer closing due to several states, such as onUnload handlers needing to |
280 // be fired. If closing is deferred, the Browser will handle the processing | 280 // be fired. If closing is deferred, the Browser will handle the processing |
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 if (frameOverlayInactiveImage) { | 1612 if (frameOverlayInactiveImage) { |
1613 [theme setValue:frameOverlayInactiveImage | 1613 [theme setValue:frameOverlayInactiveImage |
1614 forAttribute:@"overlay" | 1614 forAttribute:@"overlay" |
1615 style:GTMThemeStyleWindow | 1615 style:GTMThemeStyleWindow |
1616 state:GTMThemeStateInactiveWindow]; | 1616 state:GTMThemeStateInactiveWindow]; |
1617 } | 1617 } |
1618 | 1618 |
1619 return theme; | 1619 return theme; |
1620 } | 1620 } |
1621 @end | 1621 @end |
OLD | NEW |