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 c4d20d2d05c1811553be29ae8aec98f26944bc97..d9ea3c271d598715244c70f2689948f8b4b59826 100644 |
--- a/chrome/browser/ui/views/infobars/extension_infobar.cc |
+++ b/chrome/browser/ui/views/infobars/extension_infobar.cc |
@@ -169,9 +169,10 @@ void ExtensionInfoBar::ViewHierarchyChanged( |
weak_ptr_factory_.GetWeakPtr())); |
} |
-int ExtensionInfoBar::ContentMinimumWidth() { |
+int ExtensionInfoBar::ContentMinimumWidth() const { |
return NonExtensionViewWidth() + |
- GetDelegate()->extension_view_host()->view()->GetMinimumSize().width(); |
+ delegate()->AsExtensionInfoBarDelegate()->extension_view_host()-> |
+ view()->GetMinimumSize().width(); |
} |
void ExtensionInfoBar::OnMenuButtonClicked(views::View* source, |
@@ -222,6 +223,10 @@ ExtensionInfoBarDelegate* ExtensionInfoBar::GetDelegate() { |
return delegate()->AsExtensionInfoBarDelegate(); |
} |
+const ExtensionInfoBarDelegate* ExtensionInfoBar::GetDelegate() const { |
+ return delegate()->AsExtensionInfoBarDelegate(); |
+} |
+ |
int ExtensionInfoBar::NonExtensionViewWidth() const { |
return infobar_icon_->width() + kIconHorizontalMargin; |
} |