Index: chrome/browser/cocoa/browser_window_controller.mm |
=================================================================== |
--- chrome/browser/cocoa/browser_window_controller.mm (revision 48662) |
+++ chrome/browser/cocoa/browser_window_controller.mm (working copy) |
@@ -233,10 +233,15 @@ |
// this window's Browser and the tab strip view. The controller will handle |
// registering for the appropriate tab notifications from the back-end and |
// managing the creation of new tabs. |
- tabStripController_.reset([[TabStripController alloc] |
- initWithView:[self tabStripView] |
- switchView:[self tabContentArea] |
- browser:browser_.get()]); |
+ if (![self useVerticalTabs]) { |
+ tabStripController_.reset([[TabStripController alloc] |
+ initWithView:[self tabStripView] |
+ switchView:[self tabContentArea] |
+ browser:browser_.get()]); |
+ } else { |
+ // XXXPINK: load SideTabController when written and add it to the |
rohitrao (ping after 24h)
2010/06/02 13:45:56
Is this a TODO or a DO NOT SUBMIT?
|
+ // contentView. |
+ } |
// Create the infobar container view, so we can pass it to the |
// ToolbarController. |
@@ -249,15 +254,8 @@ |
// Create a controller for the toolbar, giving it the toolbar model object |
// and the toolbar view from the nib. The controller will handle |
// registering for the appropriate command state changes from the back-end. |
- toolbarController_.reset([[ToolbarController alloc] |
- initWithModel:browser->toolbar_model() |
- commands:browser->command_updater() |
- profile:browser->profile() |
- browser:browser |
- resizeDelegate:self]); |
- [toolbarController_ setHasToolbar:[self hasToolbar] |
- hasLocationBar:[self hasLocationBar]]; |
- [[[self window] contentView] addSubview:[toolbarController_ view]]; |
+ // Adds the toolbar to the content area. |
+ [self initializeToolbarWithBrowser:browser]; |
// Create a sub-controller for the bookmark bar. |
bookmarkBarController_.reset( |
@@ -1289,6 +1287,8 @@ |
// (Override of |TabWindowController| method.) |
- (BOOL)hasTabStrip { |
+ if ([self useVerticalTabs]) |
+ return NO; |
return [self supportsWindowFeature:Browser::FEATURE_TABSTRIP]; |
} |
@@ -1625,6 +1625,15 @@ |
isShrinkingFromZoomed_ = NO; |
} |
+- (void)tabStripDisplayModeChanged { |
+ //XXXPINK re-initialize tab strip |
rohitrao (ping after 24h)
2010/06/02 13:45:56
TODO?
This method is only half written, right? W
|
+ // [self initTabStrip:browser_->tabstrip_model()]; |
+ [[self tabStripView] removeFromSuperview]; |
+ [self initializeToolbarWithBrowser:browser_.get()]; |
+ |
+ [self layoutSubviews]; |
+} |
+ |
@end // @implementation BrowserWindowController |