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

Unified Diff: views/controls/label.cc

Issue 6622002: Do all OOLing in the views code. linux_views now builds clean with the clang plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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: views/controls/label.cc
diff --git a/views/controls/label.cc b/views/controls/label.cc
index 1b105f0542d53deeb64389c2bc96523a5d206e3b..810769a445af25db0a27ca24d744e4c0d946c757 100644
--- a/views/controls/label.cc
+++ b/views/controls/label.cc
@@ -77,6 +77,10 @@ void Label::OnBoundsChanged() {
text_size_valid_ &= !is_multi_line_;
}
+std::string Label::GetClassName() const {
+ return kViewClassName;
+}
+
void Label::OnPaint(gfx::Canvas* canvas) {
OnPaintBackground(canvas);
@@ -128,6 +132,14 @@ const GURL Label::GetURL() const {
return url_set_ ? url_ : GURL(UTF16ToUTF8(text_));
}
+void Label::SetColor(const SkColor& color) {
+ color_ = color;
+}
+
+SkColor Label::GetColor() const {
+ return color_;
+}
+
void Label::SetHorizontalAlignment(Alignment alignment) {
// If the View's UI layout is right-to-left and rtl_alignment_mode_ is
// USE_UI_ALIGNMENT, we need to flip the alignment so that the alignment

Powered by Google App Engine
This is Rietveld 408576698