| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 browser:browser]); | 324 browser:browser]); |
| 325 [[toolbarController_ toolbarView] setResizeDelegate:self]; | 325 [[toolbarController_ toolbarView] setResizeDelegate:self]; |
| 326 [toolbarController_ setHasToolbar:[self hasToolbar] | 326 [toolbarController_ setHasToolbar:[self hasToolbar] |
| 327 hasLocationBar:[self hasLocationBar]]; | 327 hasLocationBar:[self hasLocationBar]]; |
| 328 | 328 |
| 329 // Create a sub-controller for the bookmark bar. | 329 // Create a sub-controller for the bookmark bar. |
| 330 bookmarkBarController_.reset([[BookmarkBarController alloc] | 330 bookmarkBarController_.reset([[BookmarkBarController alloc] |
| 331 initWithBrowser:browser_.get() | 331 initWithBrowser:browser_.get() |
| 332 initialWidth:NSWidth([[[self window] contentView] frame]) | 332 initialWidth:NSWidth([[[self window] contentView] frame]) |
| 333 delegate:self]); | 333 delegate:self]); |
| 334 // This call triggers an -awakeFromNib for ToolbarView.xib. | 334 // This call loads the view. |
| 335 [[bookmarkBarController_ controlledView] setResizeDelegate:self]; | 335 BookmarkBarToolbarView* bookmarkBarView = |
| 336 [bookmarkBarController_ controlledView]; |
| 337 [bookmarkBarView setResizeDelegate:self]; |
| 336 | 338 |
| 337 [bookmarkBarController_ setBookmarkBarEnabled:[self supportsBookmarkBar]]; | 339 [bookmarkBarController_ setBookmarkBarEnabled:[self supportsBookmarkBar]]; |
| 338 | 340 |
| 339 // Create the infobar container view, so we can pass it to the | 341 // Create the infobar container view, so we can pass it to the |
| 340 // ToolbarController. | 342 // ToolbarController. |
| 341 infoBarContainerController_.reset( | 343 infoBarContainerController_.reset( |
| 342 [[InfoBarContainerController alloc] initWithResizeDelegate:self]); | 344 [[InfoBarContainerController alloc] initWithResizeDelegate:self]); |
| 343 [self updateInfoBarTipVisibility]; | 345 [self updateInfoBarTipVisibility]; |
| 344 | 346 |
| 345 // We don't want to try and show the bar before it gets placed in its parent | 347 // We don't want to try and show the bar before it gets placed in its parent |
| (...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2028 | 2030 |
| 2029 - (NSRect)savedRegularWindowFrame { | 2031 - (NSRect)savedRegularWindowFrame { |
| 2030 return savedRegularWindowFrame_; | 2032 return savedRegularWindowFrame_; |
| 2031 } | 2033 } |
| 2032 | 2034 |
| 2033 - (BOOL)isFullscreenTransitionInProgress { | 2035 - (BOOL)isFullscreenTransitionInProgress { |
| 2034 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; | 2036 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; |
| 2035 } | 2037 } |
| 2036 | 2038 |
| 2037 @end // @implementation BrowserWindowController(WindowType) | 2039 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |