| 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/fast_resize_view.h" | 9 #import "chrome/browser/ui/cocoa/fast_resize_view.h" |
| 9 #import "chrome/browser/ui/cocoa/framed_browser_window.h" | 10 #import "chrome/browser/ui/cocoa/framed_browser_window.h" |
| 10 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" | 11 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" |
| 11 #import "chrome/browser/ui/cocoa/themed_window.h" | 12 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 12 #import "chrome/browser/ui/cocoa/version_independent_window.h" | 13 #import "chrome/browser/ui/cocoa/version_independent_window.h" |
| 13 #import "ui/base/cocoa/focus_tracker.h" | 14 #import "ui/base/cocoa/focus_tracker.h" |
| 14 #include "ui/base/theme_provider.h" | 15 #include "ui/base/theme_provider.h" |
| 15 | 16 |
| 16 @interface TabWindowController(PRIVATE) | 17 @interface TabWindowController(PRIVATE) |
| 17 - (void)setUseOverlay:(BOOL)useOverlay; | 18 - (void)setUseOverlay:(BOOL)useOverlay; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 58 |
| 58 if ((self = [super initWithWindow:window])) { | 59 if ((self = [super initWithWindow:window])) { |
| 59 [[self window] setDelegate:self]; | 60 [[self window] setDelegate:self]; |
| 60 | 61 |
| 61 tabContentArea_.reset([[FastResizeView alloc] initWithFrame: | 62 tabContentArea_.reset([[FastResizeView alloc] initWithFrame: |
| 62 NSMakeRect(0, 0, 750, 600)]); | 63 NSMakeRect(0, 0, 750, 600)]); |
| 63 [tabContentArea_ setAutoresizingMask:NSViewWidthSizable | | 64 [tabContentArea_ setAutoresizingMask:NSViewWidthSizable | |
| 64 NSViewHeightSizable]; | 65 NSViewHeightSizable]; |
| 65 [[[self window] contentView] addSubview:tabContentArea_]; | 66 [[[self window] contentView] addSubview:tabContentArea_]; |
| 66 | 67 |
| 67 tabStripView_.reset([[TabStripView alloc] initWithFrame: | 68 tabStripView_.reset([[TabStripView alloc] |
| 68 NSMakeRect(0, 0, 750, 37)]); | 69 initWithFrame:NSMakeRect(0, 0, 750, mac_browser::kTabStripHeight)]); |
| 69 [tabStripView_ setAutoresizingMask:NSViewWidthSizable | | 70 [tabStripView_ setAutoresizingMask:NSViewWidthSizable | |
| 70 NSViewMinYMargin]; | 71 NSViewMinYMargin]; |
| 71 if (hasTabStrip) | 72 if (hasTabStrip) |
| 72 [self insertTabStripView:tabStripView_ intoWindow:[self window]]; | 73 [self insertTabStripView:tabStripView_ intoWindow:[self window]]; |
| 73 } | 74 } |
| 74 return self; | 75 return self; |
| 75 } | 76 } |
| 76 | 77 |
| 77 - (TabStripView*)tabStripView { | 78 - (TabStripView*)tabStripView { |
| 78 return tabStripView_; | 79 return tabStripView_; |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 304 } |
| 304 } | 305 } |
| 305 | 306 |
| 306 // Called when the size of the window content area has changed. Override to | 307 // Called when the size of the window content area has changed. Override to |
| 307 // position specific views. Base class implementation does nothing. | 308 // position specific views. Base class implementation does nothing. |
| 308 - (void)layoutSubviews { | 309 - (void)layoutSubviews { |
| 309 NOTIMPLEMENTED(); | 310 NOTIMPLEMENTED(); |
| 310 } | 311 } |
| 311 | 312 |
| 312 @end | 313 @end |
| OLD | NEW |