| Index: chrome/browser/ui/cocoa/browser_window_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| index 45ec95fdb3a36e2556468c858dbac700ba39201a..9c04b3784cf07f4d9c31be66a62a807607c8f5dd 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| @@ -43,6 +43,7 @@
|
| #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h"
|
| #import "chrome/browser/ui/cocoa/browser_window_cocoa.h"
|
| #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
|
| +#import "chrome/browser/ui/cocoa/browser_window_layout.h"
|
| #import "chrome/browser/ui/cocoa/browser_window_utils.h"
|
| #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h"
|
| #import "chrome/browser/ui/cocoa/dev_tools_controller.h"
|
| @@ -962,6 +963,22 @@ using content::WebContents;
|
| view == [downloadShelfController_ view] ||
|
| view == [bookmarkBarController_ view]);
|
|
|
| + // The infobar has insufficient information to determine its new height. It
|
| + // knows the total height of all of the info bars (which is what it passes
|
| + // into this method), but knows nothing about the maximum arrow height, which
|
| + // is determined by this class.
|
| + if (view == [infoBarContainerController_ view]) {
|
| + base::scoped_nsobject<BrowserWindowLayout> layout(
|
| + [[BrowserWindowLayout alloc] init]);
|
| + [self updateLayoutParameters:layout];
|
| + // Use the new height for the info bar.
|
| + [layout setInfoBarHeight:height];
|
| +
|
| + mac_browser::LayoutOutput output = [layout computeLayout];
|
| +
|
| + height = NSHeight(output.infoBarFrame);
|
| + }
|
| +
|
| // Change the height of the view and call |-layoutSubViews|. We set the height
|
| // here without regard to where the view is on the screen or whether it needs
|
| // to "grow up" or "grow down." The below call to |-layoutSubviews| will
|
| @@ -1548,12 +1565,15 @@ using content::WebContents;
|
| [downloadShelfController_ isVisible];
|
| }
|
|
|
| -- (DownloadShelfController*)downloadShelf {
|
| +- (void)createAndAddDownloadShelf {
|
| if (!downloadShelfController_.get()) {
|
| downloadShelfController_.reset([[DownloadShelfController alloc]
|
| initWithBrowser:browser_.get() resizeDelegate:self]);
|
| [[[self window] contentView] addSubview:[downloadShelfController_ view]];
|
| }
|
| +}
|
| +
|
| +- (DownloadShelfController*)downloadShelf {
|
| return downloadShelfController_;
|
| }
|
|
|
| @@ -1564,7 +1584,7 @@ using content::WebContents;
|
| // Create a controller for the findbar.
|
| findBarCocoaController_.reset([findBarCocoaController retain]);
|
| [self layoutSubviews];
|
| - [self updateSubviewZOrder:[self isInFullscreenWithOmniboxSliding]];
|
| + [self updateSubviewZOrder];
|
| }
|
|
|
| - (NSWindow*)createFullscreenWindow {
|
|
|