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

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

Issue 435863002: Fix some infobar problems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add 4 spaces indent 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_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 00bc9a2d7f6f39bcc704b66cfc704b58e0758ef1..f4bc80a871cda38e9f04533a02623e23758bc340 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -475,6 +475,8 @@ willPositionSheet:(NSWindow*)sheet
containerFrame.origin.y = maxY;
containerFrame.size.width = width;
[containerView setFrame:containerFrame];
+ [infoBarContainerController_ setMaxTopArrowHeight:[self
+ infoBarMaxTopArrowHeight]];
return maxY;
}
@@ -1058,4 +1060,21 @@ willPositionSheet:(NSWindow*)sheet
setShouldSuppressTopInfoBarTip:![self hasToolbar]];
}
+- (NSInteger)infoBarMaxTopArrowHeight {
+ NSInteger topArrowHeight = 0;
+ LocationBarViewMac* locationBarView = [self locationBarBridge];
+ NSPoint iconBottom = locationBarView->GetPageInfoBubblePoint();
+
+ CGFloat overlappingTipHeight =
+ [infoBarContainerController_ overlappingTipHeight];
+ NSPoint infoBarTop =
+ NSMakePoint(0, NSHeight([infoBarContainerController_ view].frame) -
+ overlappingTipHeight);
+ infoBarTop = [[infoBarContainerController_ view] convertPoint:infoBarTop
+ toView:nil];
+
+ topArrowHeight = iconBottom.y - infoBarTop.y;
+ return topArrowHeight;
+}
+
@end // @implementation BrowserWindowController(Private)

Powered by Google App Engine
This is Rietveld 408576698