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

Unified Diff: ui/views/controls/styled_label.h

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
« no previous file with comments | « ui/views/controls/slider.cc ('k') | ui/views/controls/styled_label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/styled_label.h
diff --git a/ui/views/controls/styled_label.h b/ui/views/controls/styled_label.h
index d74def2308605d3fb4bacb1fb9d3582761ff1d3c..4c599a0d438c5de58e98cd5cde3927a8ccdb7e86 100644
--- a/ui/views/controls/styled_label.h
+++ b/ui/views/controls/styled_label.h
@@ -87,7 +87,7 @@ class VIEWS_EXPORT StyledLabel : public View, public LinkListener {
// View implementation:
virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual int GetHeightForWidth(int w) OVERRIDE;
+ virtual int GetHeightForWidth(int w) const OVERRIDE;
virtual void Layout() OVERRIDE;
virtual void PreferredSizeChanged() OVERRIDE;
@@ -138,7 +138,7 @@ class VIEWS_EXPORT StyledLabel : public View, public LinkListener {
// This variable saves the result of the last GetHeightForWidth call in order
// to avoid repeated calculation.
- gfx::Size calculated_size_;
+ mutable gfx::Size calculated_size_;
// Background color on which the label is drawn, for auto color readability.
SkColor displayed_on_background_color_;
« no previous file with comments | « ui/views/controls/slider.cc ('k') | ui/views/controls/styled_label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698