| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override; | 107 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override; |
| 108 | 108 |
| 109 protected: | 109 protected: |
| 110 ImageView* image() const { return image_; } | 110 ImageView* image() const { return image_; } |
| 111 Label* label() const { return label_; } | 111 Label* label() const { return label_; } |
| 112 | 112 |
| 113 bool explicitly_set_normal_color() const { | 113 bool explicitly_set_normal_color() const { |
| 114 return explicitly_set_colors_[STATE_NORMAL]; | 114 return explicitly_set_colors_[STATE_NORMAL]; |
| 115 } | 115 } |
| 116 | 116 |
| 117 void ResetExplicitnessOfEnabledTextColors(); |
| 118 |
| 117 // Returns the available area for the label and image. Subclasses can change | 119 // Returns the available area for the label and image. Subclasses can change |
| 118 // these bounds if they need room to do manual painting. | 120 // these bounds if they need room to do manual painting. |
| 119 virtual gfx::Rect GetChildAreaBounds(); | 121 virtual gfx::Rect GetChildAreaBounds(); |
| 120 | 122 |
| 121 // Sets the font list used by this button. | 123 // Sets the font list used by this button. |
| 122 virtual void SetFontList(const gfx::FontList& font_list); | 124 virtual void SetFontList(const gfx::FontList& font_list); |
| 123 | 125 |
| 124 // View: | 126 // View: |
| 125 void OnPaint(gfx::Canvas* canvas) override; | 127 void OnPaint(gfx::Canvas* canvas) override; |
| 126 void OnFocus() override; | 128 void OnFocus() override; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 gfx::HorizontalAlignment horizontal_alignment_; | 238 gfx::HorizontalAlignment horizontal_alignment_; |
| 237 | 239 |
| 238 std::unique_ptr<Painter> focus_painter_; | 240 std::unique_ptr<Painter> focus_painter_; |
| 239 | 241 |
| 240 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 242 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
| 241 }; | 243 }; |
| 242 | 244 |
| 243 } // namespace views | 245 } // namespace views |
| 244 | 246 |
| 245 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 247 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| OLD | NEW |