diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 20:07:42 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 20:07:42 +0000 |
commit | ac89f0b08c4d660654b9396cc04e1c9a676707f8 (patch) | |
tree | ddf91320ac7fe3bf6dcc6f4aeafb401c7fdb3250 | |
parent | 075969dc52d6b35c2607eb8078c33b3eedbef4c7 (diff) | |
download | chromium_src-ac89f0b08c4d660654b9396cc04e1c9a676707f8.zip chromium_src-ac89f0b08c4d660654b9396cc04e1c9a676707f8.tar.gz chromium_src-ac89f0b08c4d660654b9396cc04e1c9a676707f8.tar.bz2 |
views: Do not pass SkColor by const-reference as it's defined as POD(integer).
This is a follow up to r128782.
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10091049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132630 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/views/background.cc | 8 | ||||
-rw-r--r-- | ui/views/background.h | 8 | ||||
-rw-r--r-- | ui/views/controls/label.cc | 6 | ||||
-rw-r--r-- | ui/views/controls/label.h | 6 | ||||
-rw-r--r-- | ui/views/controls/link.cc | 4 | ||||
-rw-r--r-- | ui/views/controls/link.h | 6 | ||||
-rw-r--r-- | ui/views/painter.cc | 2 |
7 files changed, 20 insertions, 20 deletions
diff --git a/ui/views/background.cc b/ui/views/background.cc index c84c441..74d2fda 100644 --- a/ui/views/background.cc +++ b/ui/views/background.cc @@ -18,7 +18,7 @@ namespace views { // background in a solid color. class SolidBackground : public Background { public: - explicit SolidBackground(const SkColor& color) { + explicit SolidBackground(SkColor color) { SetNativeControlColor(color); } @@ -87,7 +87,7 @@ HBRUSH Background::GetNativeControlBrush() const { #endif //static -Background* Background::CreateSolidBackground(const SkColor& color) { +Background* Background::CreateSolidBackground(SkColor color) { return new SolidBackground(color); } @@ -103,8 +103,8 @@ Background* Background::CreateStandardPanelBackground() { } //static -Background* Background::CreateVerticalGradientBackground( - const SkColor& color1, const SkColor& color2) { +Background* Background::CreateVerticalGradientBackground(SkColor color1, + SkColor color2) { Background* background = CreateBackgroundPainter( true, Painter::CreateVerticalGradient(color1, color2)); background->SetNativeControlColor( diff --git a/ui/views/background.h b/ui/views/background.h index 64f609c..b455f3b 100644 --- a/ui/views/background.h +++ b/ui/views/background.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -43,7 +43,7 @@ class VIEWS_EXPORT Background { virtual ~Background(); // Creates a background that fills the canvas in the specified color. - static Background* CreateSolidBackground(const SkColor& color); + static Background* CreateSolidBackground(SkColor color); // Creates a background that fills the canvas in the specified color. static Background* CreateSolidBackground(int r, int g, int b) { @@ -57,8 +57,8 @@ class VIEWS_EXPORT Background { // Creates a background that contains a vertical gradient that varies // from |color1| to |color2| - static Background* CreateVerticalGradientBackground(const SkColor& color1, - const SkColor& color2); + static Background* CreateVerticalGradientBackground(SkColor color1, + SkColor color2); // Creates Chrome's standard panel background static Background* CreateStandardPanelBackground(); diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc index 09db759..f42289e 100644 --- a/ui/views/controls/label.cc +++ b/ui/views/controls/label.cc @@ -81,17 +81,17 @@ void Label::SetAutoColorReadabilityEnabled(bool enabled) { RecalculateColors(); } -void Label::SetEnabledColor(const SkColor& color) { +void Label::SetEnabledColor(SkColor color) { requested_enabled_color_ = color; RecalculateColors(); } -void Label::SetDisabledColor(const SkColor& color) { +void Label::SetDisabledColor(SkColor color) { requested_disabled_color_ = color; RecalculateColors(); } -void Label::SetBackgroundColor(const SkColor& color) { +void Label::SetBackgroundColor(SkColor color) { background_color_ = color; RecalculateColors(); } diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h index d82d4f1..5237025 100644 --- a/ui/views/controls/label.h +++ b/ui/views/controls/label.h @@ -83,14 +83,14 @@ class VIEWS_EXPORT Label : public View { // Sets the color. This will automatically force the color to be readable // over the current background color. - virtual void SetEnabledColor(const SkColor& color); - void SetDisabledColor(const SkColor& color); + virtual void SetEnabledColor(SkColor color); + void SetDisabledColor(SkColor color); SkColor enabled_color() const { return actual_enabled_color_; } // Sets the background color. This won't be explicitly drawn, but the label // will force the text color to be readable over it. - void SetBackgroundColor(const SkColor& color); + void SetBackgroundColor(SkColor color); // Enables a drop shadow underneath the text. void SetShadowColors(SkColor enabled_color, SkColor disabled_color); diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc index 20c17d8..5e3e1d1 100644 --- a/ui/views/controls/link.cc +++ b/ui/views/controls/link.cc @@ -127,13 +127,13 @@ void Link::SetFont(const gfx::Font& font) { RecalculateFont(); } -void Link::SetEnabledColor(const SkColor& color) { +void Link::SetEnabledColor(SkColor color) { requested_enabled_color_ = color; if (!pressed_) Label::SetEnabledColor(requested_enabled_color_); } -void Link::SetPressedColor(const SkColor& color) { +void Link::SetPressedColor(SkColor color) { requested_pressed_color_ = color; if (pressed_) Label::SetEnabledColor(requested_pressed_color_); diff --git a/ui/views/controls/link.h b/ui/views/controls/link.h index 2850516..e264b9f 100644 --- a/ui/views/controls/link.h +++ b/ui/views/controls/link.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -47,8 +47,8 @@ class VIEWS_EXPORT Link : public Label { // Overridden from Label: virtual void SetFont(const gfx::Font& font) OVERRIDE; - virtual void SetEnabledColor(const SkColor& color) OVERRIDE; - void SetPressedColor(const SkColor& color); + virtual void SetEnabledColor(SkColor color) OVERRIDE; + void SetPressedColor(SkColor color); static const char kViewClassName[]; diff --git a/ui/views/painter.cc b/ui/views/painter.cc index 2875d14..5df86e7 100644 --- a/ui/views/painter.cc +++ b/ui/views/painter.cc @@ -20,7 +20,7 @@ namespace { class GradientPainter : public Painter { public: - GradientPainter(bool horizontal, const SkColor& top, const SkColor& bottom) + GradientPainter(bool horizontal, SkColor top, SkColor bottom) : horizontal_(horizontal) { colors_[0] = top; colors_[1] = bottom; |