OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef VIEWS_BACKGROUND_H_ | 5 #ifndef VIEWS_BACKGROUND_H_ |
6 #define VIEWS_BACKGROUND_H_ | 6 #define VIEWS_BACKGROUND_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Returns the "background color". This is equivalent to the color set in | 77 // Returns the "background color". This is equivalent to the color set in |
78 // SetNativeControlColor(). For solid backgrounds, this is the color; for | 78 // SetNativeControlColor(). For solid backgrounds, this is the color; for |
79 // gradient backgrounds, it's the midpoint of the gradient; for painter | 79 // gradient backgrounds, it's the midpoint of the gradient; for painter |
80 // backgrounds, this is not useful (returns a default color). | 80 // backgrounds, this is not useful (returns a default color). |
81 SkColor get_color() const { return color_; } | 81 SkColor get_color() const { return color_; } |
82 | 82 |
83 #if defined(OS_WIN) | 83 #if defined(OS_WIN) |
84 // TODO(port): Make GetNativeControlBrush portable (currently uses HBRUSH). | 84 // TODO(port): Make GetNativeControlBrush portable (currently uses HBRUSH). |
85 | 85 |
86 // Get the brush that was specified by SetNativeControlColor | 86 // Get the brush that was specified by SetNativeControlColor |
87 HBRUSH GetNativeControlBrush() const { return native_control_brush_; }; | 87 HBRUSH GetNativeControlBrush() const; |
88 #endif // defined(OS_WIN) | 88 #endif // defined(OS_WIN) |
89 | 89 |
90 private: | 90 private: |
91 SkColor color_; | 91 SkColor color_; |
92 #if defined(OS_WIN) | 92 #if defined(OS_WIN) |
93 // TODO(port): Create portable replacement for HBRUSH. | 93 // TODO(port): Create portable replacement for HBRUSH. |
94 HBRUSH native_control_brush_; | 94 mutable HBRUSH native_control_brush_; |
95 #endif // defined(OS_WIN) | 95 #endif // defined(OS_WIN) |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(Background); | 97 DISALLOW_COPY_AND_ASSIGN(Background); |
98 }; | 98 }; |
99 | 99 |
100 } // namespace views | 100 } // namespace views |
101 | 101 |
102 #endif // VIEWS_BACKGROUND_H_ | 102 #endif // VIEWS_BACKGROUND_H_ |
OLD | NEW |