OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; | 90 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; |
91 | 91 |
92 // Fill |params| with information about the button. | 92 // Fill |params| with information about the button. |
93 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const; | 93 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const; |
94 | 94 |
95 // Resets colors from the NativeTheme, explicitly set colors are unchanged. | 95 // Resets colors from the NativeTheme, explicitly set colors are unchanged. |
96 virtual void ResetColorsFromNativeTheme(); | 96 virtual void ResetColorsFromNativeTheme(); |
97 | 97 |
98 // Creates the default border for this button. This can be overridden by | 98 // Creates the default border for this button. This can be overridden by |
99 // subclasses or by LinuxUI. | 99 // subclasses or by LinuxUI. |
100 virtual scoped_ptr<Border> CreateDefaultBorder() const; | 100 virtual scoped_ptr<LabelButtonBorder> CreateDefaultBorder() const; |
101 | 101 |
102 // Updates the image view to contain the appropriate button state image. | 102 // Updates the image view to contain the appropriate button state image. |
103 void UpdateImage(); | 103 void UpdateImage(); |
104 | 104 |
105 // Updates the border as per the NativeTheme, unless a different border was | 105 // Updates the border as per the NativeTheme, unless a different border was |
106 // set with SetBorder. | 106 // set with SetBorder. |
107 void UpdateThemedBorder(); | 107 void UpdateThemedBorder(); |
108 | 108 |
109 // NativeThemeDelegate: | 109 // NativeThemeDelegate: |
110 virtual gfx::Rect GetThemePaintRect() const OVERRIDE; | 110 virtual gfx::Rect GetThemePaintRect() const OVERRIDE; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 bool border_is_themed_border_; | 164 bool border_is_themed_border_; |
165 | 165 |
166 scoped_ptr<Painter> focus_painter_; | 166 scoped_ptr<Painter> focus_painter_; |
167 | 167 |
168 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 168 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
169 }; | 169 }; |
170 | 170 |
171 } // namespace views | 171 } // namespace views |
172 | 172 |
173 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 173 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
OLD | NEW |