OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/controls/menu/radio_button_image_gtk.h" | 5 #include "views/controls/menu/radio_button_image_gtk.h" |
6 | 6 |
7 #include "gfx/canvas_skia.h" | |
8 #include "third_party/skia/include/effects/SkGradientShader.h" | 7 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 8 #include "ui/gfx/canvas_skia.h" |
9 | 9 |
10 namespace { | 10 namespace { |
11 | 11 |
12 // Size of the radio button inciator. | 12 // Size of the radio button inciator. |
13 const int kSelectedIndicatorSize = 5; | 13 const int kSelectedIndicatorSize = 5; |
14 const int kIndicatorSize = 10; | 14 const int kIndicatorSize = 10; |
15 | 15 |
16 // Used for the radio indicator. See theme_draw for details. | 16 // Used for the radio indicator. See theme_draw for details. |
17 const double kGradientStop = .5; | 17 const double kGradientStop = .5; |
18 const SkColor kGradient0 = SkColorSetRGB(255, 255, 255); | 18 const SkColor kGradient0 = SkColorSetRGB(255, 255, 255); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 namespace views { | 84 namespace views { |
85 | 85 |
86 const SkBitmap* GetRadioButtonImage(bool selected) { | 86 const SkBitmap* GetRadioButtonImage(bool selected) { |
87 static const SkBitmap* kRadioOn = CreateRadioButtonImage(true); | 87 static const SkBitmap* kRadioOn = CreateRadioButtonImage(true); |
88 static const SkBitmap* kRadioOff = CreateRadioButtonImage(false); | 88 static const SkBitmap* kRadioOff = CreateRadioButtonImage(false); |
89 | 89 |
90 return selected ? kRadioOn : kRadioOff; | 90 return selected ? kRadioOn : kRadioOff; |
91 } | 91 } |
92 | 92 |
93 } // namespace views; | 93 } // namespace views; |
OLD | NEW |