| 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 <array> | 8 #include <array> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 void EnableCanvasFlippingForRTLUI(bool flip) override; | 100 void EnableCanvasFlippingForRTLUI(bool flip) override; |
| 101 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; | 101 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
| 102 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; | 102 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
| 103 std::unique_ptr<InkDrop> CreateInkDrop() override; | 103 std::unique_ptr<InkDrop> CreateInkDrop() override; |
| 104 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; | 104 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; |
| 105 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override; | 105 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override; |
| 106 | 106 |
| 107 protected: | 107 protected: |
| 108 ImageView* image() const { return image_; } | 108 ImageView* image() const { return image_; } |
| 109 Label* label() const { return label_; } | 109 Label* label() const { return label_; } |
| 110 InkDropContainerView* ink_drop_container() const { |
| 111 return ink_drop_container_; |
| 112 } |
| 110 | 113 |
| 111 bool explicitly_set_normal_color() const { | 114 bool explicitly_set_normal_color() const { |
| 112 return explicitly_set_colors_[STATE_NORMAL]; | 115 return explicitly_set_colors_[STATE_NORMAL]; |
| 113 } | 116 } |
| 114 | 117 |
| 115 // Returns the available area for the label and image. Subclasses can change | 118 // Returns the available area for the label and image. Subclasses can change |
| 116 // these bounds if they need room to do manual painting. | 119 // these bounds if they need room to do manual painting. |
| 117 virtual gfx::Rect GetChildAreaBounds(); | 120 virtual gfx::Rect GetChildAreaBounds(); |
| 118 | 121 |
| 119 // Sets the font list used by this button. | 122 // Sets the font list used by this button. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 gfx::HorizontalAlignment horizontal_alignment_; | 237 gfx::HorizontalAlignment horizontal_alignment_; |
| 235 | 238 |
| 236 std::unique_ptr<Painter> focus_painter_; | 239 std::unique_ptr<Painter> focus_painter_; |
| 237 | 240 |
| 238 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 241 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
| 239 }; | 242 }; |
| 240 | 243 |
| 241 } // namespace views | 244 } // namespace views |
| 242 | 245 |
| 243 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 246 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| OLD | NEW |