| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 // CustomButton: | 125 // CustomButton: |
| 126 void StateChanged() override; | 126 void StateChanged() override; |
| 127 | 127 |
| 128 // Fills |params| with information about the button. | 128 // Fills |params| with information about the button. |
| 129 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const; | 129 virtual void GetExtraParams(ui::NativeTheme::ExtraParams* params) const; |
| 130 | 130 |
| 131 // Resets colors from the NativeTheme, explicitly set colors are unchanged. | 131 // Resets colors from the NativeTheme, explicitly set colors are unchanged. |
| 132 virtual void ResetColorsFromNativeTheme(); | 132 virtual void ResetColorsFromNativeTheme(); |
| 133 | 133 |
| 134 // Changes the visual styling of this button to reflect the state of |
| 135 // |is_default()|. |
| 136 virtual void UpdateStyleToIndicateDefaultStatus(); |
| 137 |
| 134 // Updates the image view to contain the appropriate button state image. | 138 // Updates the image view to contain the appropriate button state image. |
| 135 void UpdateImage(); | 139 void UpdateImage(); |
| 136 | 140 |
| 137 // Updates the border as per the NativeTheme, unless a different border was | 141 // Updates the border as per the NativeTheme, unless a different border was |
| 138 // set with SetBorder. | 142 // set with SetBorder. |
| 139 void UpdateThemedBorder(); | 143 void UpdateThemedBorder(); |
| 140 | 144 |
| 141 // NativeThemeDelegate: | 145 // NativeThemeDelegate: |
| 142 gfx::Rect GetThemePaintRect() const override; | 146 gfx::Rect GetThemePaintRect() const override; |
| 143 | 147 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 gfx::HorizontalAlignment horizontal_alignment_; | 226 gfx::HorizontalAlignment horizontal_alignment_; |
| 223 | 227 |
| 224 std::unique_ptr<Painter> focus_painter_; | 228 std::unique_ptr<Painter> focus_painter_; |
| 225 | 229 |
| 226 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 230 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
| 227 }; | 231 }; |
| 228 | 232 |
| 229 } // namespace views | 233 } // namespace views |
| 230 | 234 |
| 231 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 235 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| OLD | NEW |