| 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/fast_resize_view.h" | 8 #import "chrome/browser/ui/cocoa/fast_resize_view.h" |
| 9 #import "chrome/browser/ui/cocoa/framed_browser_window.h" | 9 #import "chrome/browser/ui/cocoa/framed_browser_window.h" |
| 10 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" | 10 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 @end | 42 @end |
| 43 | 43 |
| 44 @implementation TabWindowController | 44 @implementation TabWindowController |
| 45 | 45 |
| 46 - (id)initTabWindowControllerWithTabStrip:(BOOL)hasTabStrip { | 46 - (id)initTabWindowControllerWithTabStrip:(BOOL)hasTabStrip { |
| 47 NSRect contentRect = NSMakeRect(60, 229, 750, 600); | 47 NSRect contentRect = NSMakeRect(60, 229, 750, 600); |
| 48 scoped_nsobject<FramedBrowserWindow> window( | 48 scoped_nsobject<FramedBrowserWindow> window( |
| 49 [[FramedBrowserWindow alloc] initWithContentRect:contentRect | 49 [[FramedBrowserWindow alloc] initWithContentRect:contentRect |
| 50 hasTabStrip:hasTabStrip]); | 50 hasTabStrip:hasTabStrip]); |
| 51 [window setReleasedWhenClosed:YES]; | 51 [window setReleasedWhenClosed:YES]; |
| 52 [window setAutorecalculatesKeyViewLoop:YES]; |
| 52 | 53 |
| 53 if ((self = [super initWithWindow:window])) { | 54 if ((self = [super initWithWindow:window])) { |
| 54 [[self window] setDelegate:self]; | 55 [[self window] setDelegate:self]; |
| 55 | 56 |
| 56 tabContentArea_.reset([[FastResizeView alloc] initWithFrame: | 57 tabContentArea_.reset([[FastResizeView alloc] initWithFrame: |
| 57 NSMakeRect(0, 0, 750, 600)]); | 58 NSMakeRect(0, 0, 750, 600)]); |
| 58 [tabContentArea_ setAutoresizingMask:NSViewWidthSizable | | 59 [tabContentArea_ setAutoresizingMask:NSViewWidthSizable | |
| 59 NSViewHeightSizable]; | 60 NSViewHeightSizable]; |
| 60 [[[self window] contentView] addSubview:tabContentArea_]; | 61 [[[self window] contentView] addSubview:tabContentArea_]; |
| 61 | 62 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 closeDeferred_ = YES; | 285 closeDeferred_ = YES; |
| 285 } | 286 } |
| 286 | 287 |
| 287 // Called when the size of the window content area has changed. Override to | 288 // Called when the size of the window content area has changed. Override to |
| 288 // position specific views. Base class implementation does nothing. | 289 // position specific views. Base class implementation does nothing. |
| 289 - (void)layoutSubviews { | 290 - (void)layoutSubviews { |
| 290 NOTIMPLEMENTED(); | 291 NOTIMPLEMENTED(); |
| 291 } | 292 } |
| 292 | 293 |
| 293 @end | 294 @end |
| OLD | NEW |