Chromium Code Reviews| Index: views/background.cc |
| diff --git a/views/background.cc b/views/background.cc |
| index 1c374e4e5a0101e48a80349effe7264a4728f2be..bf08ae834a0f67b5994085d76755acca33bca41c 100644 |
| --- a/views/background.cc |
| +++ b/views/background.cc |
| @@ -75,10 +75,17 @@ void Background::SetNativeControlColor(SkColor color) { |
| color_ = color; |
| #if defined(OS_WIN) |
| DeleteObject(native_control_brush_); |
|
Ben Goodger (Google)
2011/05/24 02:09:48
Should this also set native_control_brush_ back to
sky
2011/05/24 18:13:50
Definitely. Fixed.
|
| - native_control_brush_ = CreateSolidBrush(skia::SkColorToCOLORREF(color)); |
| #endif |
| } |
| +#if defined(OS_WIN) |
| +HBRUSH Background::GetNativeControlBrush() const { |
| + if (!native_control_brush_) |
| + native_control_brush_ = CreateSolidBrush(skia::SkColorToCOLORREF(color_)); |
| + return native_control_brush_; |
| +} |
| +#endif |
| + |
| //static |
| Background* Background::CreateSolidBackground(const SkColor& color) { |
| return new SolidBackground(color); |