| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <numeric> | 8 #include <numeric> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 // managing the creation of new tabs. | 319 // managing the creation of new tabs. |
| 320 [self createTabStripController]; | 320 [self createTabStripController]; |
| 321 | 321 |
| 322 // Create a controller for the toolbar, giving it the toolbar model object | 322 // Create a controller for the toolbar, giving it the toolbar model object |
| 323 // and the toolbar view from the nib. The controller will handle | 323 // and the toolbar view from the nib. The controller will handle |
| 324 // registering for the appropriate command state changes from the back-end. | 324 // registering for the appropriate command state changes from the back-end. |
| 325 // Adds the toolbar to the content area. | 325 // Adds the toolbar to the content area. |
| 326 toolbarController_.reset([[ToolbarController alloc] | 326 toolbarController_.reset([[ToolbarController alloc] |
| 327 initWithCommands:browser->command_controller()->command_updater() | 327 initWithCommands:browser->command_controller()->command_updater() |
| 328 profile:browser->profile() | 328 profile:browser->profile() |
| 329 browser:browser]); | 329 browser:browser |
| 330 resizeDelegate:self]); |
| 330 [toolbarController_ setHasToolbar:[self hasToolbar] | 331 [toolbarController_ setHasToolbar:[self hasToolbar] |
| 331 hasLocationBar:[self hasLocationBar]]; | 332 hasLocationBar:[self hasLocationBar]]; |
| 332 | 333 |
| 333 // Create a sub-controller for the bookmark bar. | 334 // Create a sub-controller for the bookmark bar. |
| 334 bookmarkBarController_.reset( | 335 bookmarkBarController_.reset( |
| 335 [[BookmarkBarController alloc] | 336 [[BookmarkBarController alloc] |
| 336 initWithBrowser:browser_.get() | 337 initWithBrowser:browser_.get() |
| 337 initialWidth:NSWidth([[[self window] contentView] frame]) | 338 initialWidth:NSWidth([[[self window] contentView] frame]) |
| 338 delegate:self | 339 delegate:self |
| 339 resizeDelegate:self]); | 340 resizeDelegate:self]); |
| (...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2061 | 2062 |
| 2062 - (BOOL)supportsBookmarkBar { | 2063 - (BOOL)supportsBookmarkBar { |
| 2063 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2064 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2064 } | 2065 } |
| 2065 | 2066 |
| 2066 - (BOOL)isTabbedWindow { | 2067 - (BOOL)isTabbedWindow { |
| 2067 return browser_->is_type_tabbed(); | 2068 return browser_->is_type_tabbed(); |
| 2068 } | 2069 } |
| 2069 | 2070 |
| 2070 @end // @implementation BrowserWindowController(WindowType) | 2071 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |