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/browser_window_layout.h" | 8 #import "chrome/browser/ui/cocoa/browser_window_layout.h" |
9 #import "chrome/browser/ui/cocoa/fast_resize_view.h" | 9 #import "chrome/browser/ui/cocoa/fast_resize_view.h" |
10 #import "chrome/browser/ui/cocoa/framed_browser_window.h" | 10 #import "chrome/browser/ui/cocoa/framed_browser_window.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 selector:@selector(removeOverlay) | 145 selector:@selector(removeOverlay) |
146 object:nil]; | 146 object:nil]; |
147 NSWindow* window = [self window]; | 147 NSWindow* window = [self window]; |
148 if (useOverlay && !overlayWindow_) { | 148 if (useOverlay && !overlayWindow_) { |
149 DCHECK(!originalContentView_); | 149 DCHECK(!originalContentView_); |
150 | 150 |
151 overlayWindow_ = [[TabWindowOverlayWindow alloc] | 151 overlayWindow_ = [[TabWindowOverlayWindow alloc] |
152 initWithContentRect:[window frame] | 152 initWithContentRect:[window frame] |
153 styleMask:NSBorderlessWindowMask | 153 styleMask:NSBorderlessWindowMask |
154 backing:NSBackingStoreBuffered | 154 backing:NSBackingStoreBuffered |
155 defer:YES]; | 155 defer:NO]; |
156 [overlayWindow_ setTitle:@"overlay"]; | 156 [overlayWindow_ setTitle:@"overlay"]; |
157 [overlayWindow_ setBackgroundColor:[NSColor clearColor]]; | 157 [overlayWindow_ setBackgroundColor:[NSColor clearColor]]; |
158 [overlayWindow_ setOpaque:NO]; | 158 [overlayWindow_ setOpaque:NO]; |
159 [overlayWindow_ setDelegate:self]; | 159 [overlayWindow_ setDelegate:self]; |
160 [[overlayWindow_ contentView] setWantsLayer:YES]; | 160 [[overlayWindow_ contentView] setWantsLayer:YES]; |
161 | 161 |
162 originalContentView_ = self.chromeContentView; | 162 originalContentView_ = self.chromeContentView; |
163 [window addChildWindow:overlayWindow_ ordered:NSWindowAbove]; | 163 [window addChildWindow:overlayWindow_ ordered:NSWindowAbove]; |
164 | 164 |
165 // Explicitly set the responder to be nil here (for restoring later). | 165 // Explicitly set the responder to be nil here (for restoring later). |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 relativeTo:nil]; | 335 relativeTo:nil]; |
336 } | 336 } |
337 | 337 |
338 // Called when the size of the window content area has changed. Override to | 338 // Called when the size of the window content area has changed. Override to |
339 // position specific views. Base class implementation does nothing. | 339 // position specific views. Base class implementation does nothing. |
340 - (void)layoutSubviews { | 340 - (void)layoutSubviews { |
341 NOTIMPLEMENTED(); | 341 NOTIMPLEMENTED(); |
342 } | 342 } |
343 | 343 |
344 @end | 344 @end |
OLD | NEW |