Chromium Code Reviews| Index: chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm |
| index 5c7346849aa51c49137999eca90afff45ff5d865..795a4141d8b6634932e884bed9dda23c4bddac26 100644 |
| --- a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm |
| +++ b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm |
| @@ -158,8 +158,8 @@ class InfoBarNotificationObserver : public NotificationObserver { |
| return [infobarControllers_ count] - [closingInfoBars_ count]; |
| } |
| -- (CGFloat)antiSpoofHeight { |
| - return 0; |
| +- (CGFloat)overlappingTipHeight { |
| + return [self infobarCount] ? infobars::kTipHeight : 0; |
| } |
| - (void)resizeView:(NSView*)view newHeight:(CGFloat)height { |
| @@ -180,8 +180,15 @@ class InfoBarNotificationObserver : public NotificationObserver { |
| - (CGFloat)desiredHeight { |
| CGFloat height = 0; |
| + |
| for (InfoBarController* controller in infobarControllers_.get()) |
|
rohitrao (ping after 24h)
2011/08/05 14:24:12
Add a comment reminding us that NSHeight(eachInfob
Robert Sesek
2011/08/05 15:10:40
Done.
|
| - height += NSHeight([[controller view] frame]); |
| + height += NSHeight([[controller view] frame]) - infobars::kTipHeight; |
| + |
| + // If there's any infobars, add a little extra room for the tip of the first |
|
rohitrao (ping after 24h)
2011/08/05 14:24:12
s/there's/there are/
Robert Sesek
2011/08/05 15:10:40
Done.
|
| + // infobar. |
| + if (height) |
| + height += infobars::kTipHeight; |
| + |
| return height; |
| } |
| @@ -243,7 +250,7 @@ class InfoBarNotificationObserver : public NotificationObserver { |
| frame.size.width = NSWidth(containerBounds); |
| [view setFrame:frame]; |
| - minY += NSHeight(frame); |
| + minY += NSHeight(frame) - infobars::kTipHeight; |
| } |
| [resizeDelegate_ resizeView:[self view] newHeight:[self desiredHeight]]; |