Index: chrome/browser/ui/views/infobars/extension_infobar.cc |
diff --git a/chrome/browser/ui/views/infobars/extension_infobar.cc b/chrome/browser/ui/views/infobars/extension_infobar.cc |
index 92d665be28d5738ea7796c113093c8b2368201bf..60c8a8f9ae219daed5eac14b974a204f0c98f12e 100644 |
--- a/chrome/browser/ui/views/infobars/extension_infobar.cc |
+++ b/chrome/browser/ui/views/infobars/extension_infobar.cc |
@@ -96,6 +96,7 @@ ExtensionInfoBar::~ExtensionInfoBar() { |
} |
void ExtensionInfoBar::Layout() { |
+ DCHECK(owner()); |
InfoBarView::Layout(); |
infobar_icon_->SetPosition(gfx::Point(StartX(), OffsetY(infobar_icon_))); |
@@ -105,10 +106,11 @@ void ExtensionInfoBar::Layout() { |
// but the NativeViewHost inside does not seem to be clipped by the ClipRect() |
// call in InfoBarView::PaintChildren(), so we have to manually clamp the size |
// here. |
- extension_view->SetSize( |
- gfx::Size(std::max(0, EndX() - StartX() - NonExtensionViewWidth()), |
- std::min(height() - kSeparatorLineHeight - arrow_height(), |
- GetDelegate()->height()))); |
+ const infobars::InfoBarConstants& constants = owner()->GetInfoBarConstants(); |
+ extension_view->SetSize(gfx::Size( |
+ std::max(0, EndX() - StartX() - NonExtensionViewWidth()), |
+ std::min(height() - constants.separator_line_height - arrow_height(), |
+ GetDelegate()->height()))); |
// We do SetPosition() separately after SetSize() so OffsetY() will work. |
extension_view->SetPosition( |
gfx::Point(infobar_icon_->bounds().right() + kIconHorizontalMargin, |