| 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 |
| 102 virtual void SetDefaultBorderInsets(views::LabelButtonBorder* border); |
| 101 | 103 |
| 102 // Updates the image view to contain the appropriate button state image. | 104 // Updates the image view to contain the appropriate button state image. |
| 103 void UpdateImage(); | 105 void UpdateImage(); |
| 104 | 106 |
| 105 // Updates the border as per the NativeTheme, unless a different border was | 107 // Updates the border as per the NativeTheme, unless a different border was |
| 106 // set with SetBorder. | 108 // set with SetBorder. |
| 107 void UpdateThemedBorder(); | 109 void UpdateThemedBorder(); |
| 108 | 110 |
| 109 // NativeThemeDelegate: | 111 // NativeThemeDelegate: |
| 110 virtual gfx::Rect GetThemePaintRect() const OVERRIDE; | 112 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_; | 166 bool border_is_themed_border_; |
| 165 | 167 |
| 166 scoped_ptr<Painter> focus_painter_; | 168 scoped_ptr<Painter> focus_painter_; |
| 167 | 169 |
| 168 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 170 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
| 169 }; | 171 }; |
| 170 | 172 |
| 171 } // namespace views | 173 } // namespace views |
| 172 | 174 |
| 173 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 175 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| OLD | NEW |