Chromium Code Reviews| 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 "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
| 10 #include "ui/gfx/font.h" | 10 #include "ui/gfx/font.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 ButtonStyle style() const { return style_; } | 65 ButtonStyle style() const { return style_; } |
| 66 void SetStyle(ButtonStyle style); | 66 void SetStyle(ButtonStyle style); |
| 67 | 67 |
| 68 // Overridden from View: | 68 // Overridden from View: |
| 69 virtual gfx::Size GetPreferredSize() OVERRIDE; | 69 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 70 virtual void Layout() OVERRIDE; | 70 virtual void Layout() OVERRIDE; |
| 71 virtual const char* GetClassName() const OVERRIDE; | 71 virtual const char* GetClassName() const OVERRIDE; |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 Label* label() const { return label_; } | 74 Label* label() const { return label_; } |
| 75 ImageView* image() const { return image_; } | |
|
Peter Kasting
2013/11/19 02:28:50
Nit: Put this above label() to match the member de
Greg Billock
2013/11/20 00:59:03
Yeah, you're probably right there. I mean technica
Peter Kasting
2013/11/20 01:10:20
Bonus points if you get them to return const X* in
Greg Billock
2013/11/20 01:30:46
:-) yeah. I realized even what I want to do with t
| |
| 75 | 76 |
| 76 // Fill |params| with information about the button. | 77 // Fill |params| with information about the button. |
| 77 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const; | 78 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const; |
| 78 | 79 |
| 79 // Resets colors from the NativeTheme, explicitly set colors are unchanged. | 80 // Resets colors from the NativeTheme, explicitly set colors are unchanged. |
| 80 virtual void ResetColorsFromNativeTheme(); | 81 virtual void ResetColorsFromNativeTheme(); |
| 81 | 82 |
| 82 // Updates the image view to contain the appropriate button state image. | 83 // Updates the image view to contain the appropriate button state image. |
| 83 void UpdateImage(); | 84 void UpdateImage(); |
| 84 | 85 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 | 131 |
| 131 // The button's overall style. | 132 // The button's overall style. |
| 132 ButtonStyle style_; | 133 ButtonStyle style_; |
| 133 | 134 |
| 134 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 135 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
| 135 }; | 136 }; |
| 136 | 137 |
| 137 } // namespace views | 138 } // namespace views |
| 138 | 139 |
| 139 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 140 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| OLD | NEW |