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

Unified Diff: chrome/browser/ui/views/message_center/message_center_widget_delegate.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/message_center/message_center_widget_delegate.cc
diff --git a/chrome/browser/ui/views/message_center/message_center_widget_delegate.cc b/chrome/browser/ui/views/message_center/message_center_widget_delegate.cc
index 2225dc99aed0841ee4085499a9f0d03e0270cbb0..623ce681845362e86271e209aee1a0a5365a19ed 100644
--- a/chrome/browser/ui/views/message_center/message_center_widget_delegate.cc
+++ b/chrome/browser/ui/views/message_center/message_center_widget_delegate.cc
@@ -112,7 +112,7 @@ void MessageCenterWidgetDelegate::PreferredSizeChanged() {
views::View::PreferredSizeChanged();
}
-gfx::Size MessageCenterWidgetDelegate::GetPreferredSize() {
+gfx::Size MessageCenterWidgetDelegate::GetPreferredSize() const {
int preferred_width = kNotificationWidth + 2 * kMarginBetweenItems;
return gfx::Size(preferred_width, GetHeightForWidth(preferred_width));
}
@@ -122,7 +122,7 @@ gfx::Size MessageCenterWidgetDelegate::GetMaximumSize() {
return size;
}
-int MessageCenterWidgetDelegate::GetHeightForWidth(int width) {
+int MessageCenterWidgetDelegate::GetHeightForWidth(int width) const {
int height = MessageCenterView::GetHeightForWidth(width);
return (pos_info_.max_height != 0) ?
std::min(height, pos_info_.max_height - border_insets_.height()) : height;

Powered by Google App Engine
This is Rietveld 408576698