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/tabs/tab_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #import "chrome/browser/ui/cocoa/focus_tracker.h" | 8 #import "chrome/browser/ui/cocoa/focus_tracker.h" |
9 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" | 9 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" |
10 #import "chrome/browser/ui/cocoa/themed_window.h" | 10 #import "chrome/browser/ui/cocoa/themed_window.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 | 81 |
82 // Return the appropriate tab strip based on whether or not side tabs are | 82 // Return the appropriate tab strip based on whether or not side tabs are |
83 // enabled. | 83 // enabled. |
84 - (TabStripView*)tabStripView { | 84 - (TabStripView*)tabStripView { |
85 return tabStripView_; | 85 return tabStripView_; |
86 } | 86 } |
87 | 87 |
88 - (void)removeOverlay { | 88 - (void)removeOverlay { |
89 [self setUseOverlay:NO]; | 89 [self setUseOverlay:NO]; |
90 if (closeDeferred_) { | 90 if (closeDeferred_) |
91 // See comment in BrowserWindowCocoa::Close() about orderOut:. | |
92 [[self window] orderOut:self]; | |
93 [[self window] performClose:self]; // Autoreleases the controller. | 91 [[self window] performClose:self]; // Autoreleases the controller. |
94 } | |
95 } | 92 } |
96 | 93 |
97 - (void)showOverlay { | 94 - (void)showOverlay { |
98 [self setUseOverlay:YES]; | 95 [self setUseOverlay:YES]; |
99 } | 96 } |
100 | 97 |
101 // if |useOverlay| is true, we're moving views into the overlay's content | 98 // if |useOverlay| is true, we're moving views into the overlay's content |
102 // area. If false, we're moving out of the overlay back into the window's | 99 // area. If false, we're moving out of the overlay back into the window's |
103 // content. | 100 // content. |
104 - (void)moveViewsBetweenWindowAndOverlay:(BOOL)useOverlay { | 101 - (void)moveViewsBetweenWindowAndOverlay:(BOOL)useOverlay { |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 closeDeferred_ = YES; | 284 closeDeferred_ = YES; |
288 } | 285 } |
289 | 286 |
290 // Called when the size of the window content area has changed. Override to | 287 // Called when the size of the window content area has changed. Override to |
291 // position specific views. Base class implementation does nothing. | 288 // position specific views. Base class implementation does nothing. |
292 - (void)layoutSubviews { | 289 - (void)layoutSubviews { |
293 NOTIMPLEMENTED(); | 290 NOTIMPLEMENTED(); |
294 } | 291 } |
295 | 292 |
296 @end | 293 @end |
OLD | NEW |