| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // Fill |params| with information about the button. | 90 // Fill |params| with information about the button. |
| 91 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const; | 91 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const; |
| 92 | 92 |
| 93 // Resets colors from the NativeTheme, explicitly set colors are unchanged. | 93 // Resets colors from the NativeTheme, explicitly set colors are unchanged. |
| 94 virtual void ResetColorsFromNativeTheme(); | 94 virtual void ResetColorsFromNativeTheme(); |
| 95 | 95 |
| 96 // Updates the image view to contain the appropriate button state image. | 96 // Updates the image view to contain the appropriate button state image. |
| 97 void UpdateImage(); | 97 void UpdateImage(); |
| 98 | 98 |
| 99 // Updates our border with a specific LabelButtonBorder instance which has | 99 // Updates our border with a specific Border instance which has different |
| 100 // different insets, etc. This may wrap the border in an object which will | 100 // insets, etc. This may wrap the border in an object which will draw a |
| 101 // draw a native style border. | 101 // native style border. |
| 102 void UpdateThemedBorder(LabelButtonBorder* label_button_border); | 102 void UpdateThemedBorder(scoped_ptr<Border> border); |
| 103 | 103 |
| 104 // NativeThemeDelegate: | 104 // NativeThemeDelegate: |
| 105 virtual gfx::Rect GetThemePaintRect() const OVERRIDE; | 105 virtual gfx::Rect GetThemePaintRect() const OVERRIDE; |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Init); | 108 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Init); |
| 109 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Label); | 109 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Label); |
| 110 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Image); | 110 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Image); |
| 111 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, LabelAndImage); | 111 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, LabelAndImage); |
| 112 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, FontList); | 112 FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, FontList); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 ButtonStyle style_; | 153 ButtonStyle style_; |
| 154 | 154 |
| 155 scoped_ptr<Painter> focus_painter_; | 155 scoped_ptr<Painter> focus_painter_; |
| 156 | 156 |
| 157 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 157 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace views | 160 } // namespace views |
| 161 | 161 |
| 162 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 162 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| OLD | NEW |