Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 555243002: mac: Refactor browser_window_controller layout logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreen_layout
Patch Set: Comments from andresantoso. Renames, header file changes, no functional changes. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b4a86ea76da342baf412e8dfde5b5e69085302ef 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,17 @@ 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 the toolbar.
+ if (view == [infoBarContainerController_ view]) {
+ height += [BrowserWindowLayout
+ infoBarContainerHeightFromInfoBarHeight:height
+ maxTopArrowHeight:
+ [self infoBarMaxTopArrowHeight]];
+ }
+
// 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
@@ -1564,7 +1576,7 @@ using content::WebContents;
// Create a controller for the findbar.
findBarCocoaController_.reset([findBarCocoaController retain]);
[self layoutSubviews];
- [self updateSubviewZOrder:[self isInFullscreenWithOmniboxSliding]];
+ [self updateSubviewZOrder];
}
- (NSWindow*)createFullscreenWindow {

Powered by Google App Engine
This is Rietveld 408576698