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

Unified Diff: chrome/browser/ui/views/infobars/extension_infobar.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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/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;
}
« no previous file with comments | « chrome/browser/ui/views/infobars/extension_infobar.h ('k') | chrome/browser/ui/views/infobars/infobar_container_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698