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

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

Issue 435863002: Fix some infobar problems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated CL Created 6 years, 4 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 bd550e350d05c759184857c1c34c19cd70d1a987..6316f327c2f7222e162350187b2e7a8052204caf 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -1957,6 +1957,12 @@ using content::WebContents;
[toolbarController_ setDividerOpacity:[self toolbarDividerOpacity]];
[self adjustToolbarAndBookmarkBarForCompression:
[controller getDesiredToolbarHeightCompression]];
+
+ // Stretch the top infobar's arrow if the bookmark has been shown.
+ NSInteger arrowHeight = [infoBarContainerController_ defaultArrowHeight];
+ if (newState == BookmarkBar::SHOW)
+ arrowHeight += controller.view.frame.size.height;
+ [infoBarContainerController_ setMaxTopArrowHeight:arrowHeight];
}
// (Needed for |BookmarkBarControllerDelegate| protocol.)
@@ -1966,6 +1972,12 @@ willAnimateFromState:(BookmarkBar::State)oldState
[toolbarController_ setDividerOpacity:[self toolbarDividerOpacity]];
[self adjustToolbarAndBookmarkBarForCompression:
[controller getDesiredToolbarHeightCompression]];
+
+ // Shorten the top infobar's arrow if the bookmark is going to be hidden
+ // or detached.
+ NSInteger arrowHeight = [infoBarContainerController_ defaultArrowHeight];
+ if (newState != BookmarkBar::SHOW)
+ [infoBarContainerController_ setMaxTopArrowHeight:arrowHeight];
}
// (Private/TestingAPI)

Powered by Google App Engine
This is Rietveld 408576698