Chromium Code Reviews| Index: ui/views/controls/button/custom_button.h |
| diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h |
| index 2f3508f453fb2536847deacccf41e29e8d288dba..99969ef37d6f082641fa4f184218b17a377fa4d2 100644 |
| --- a/ui/views/controls/button/custom_button.h |
| +++ b/ui/views/controls/button/custom_button.h |
| @@ -8,12 +8,9 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "ui/events/event_constants.h" |
| #include "ui/gfx/animation/animation_delegate.h" |
| +#include "ui/gfx/animation/throb_animation.h" |
| #include "ui/views/controls/button/button.h" |
| -namespace gfx { |
| -class ThrobAnimation; |
| -} |
| - |
| namespace views { |
| class InkDropDelegate; |
| @@ -126,22 +123,19 @@ class VIEWS_EXPORT CustomButton : public Button, |
| // state). This does not take into account enabled state. |
| bool ShouldEnterHoveredState(); |
| - InkDropDelegate* ink_drop_delegate() const { return ink_drop_delegate_; } |
| - void set_ink_drop_delegate(InkDropDelegate* ink_drop_delegate) { |
| - ink_drop_delegate_ = ink_drop_delegate; |
| - } |
| - |
| // Overridden from View: |
| void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
| void ViewHierarchyChanged( |
| const ViewHierarchyChangedDetails& details) override; |
| void OnBlur() override; |
| - // The button state (defined in implementation) |
| - ButtonState state_; |
| - |
| - // Hover animation. |
| - scoped_ptr<gfx::ThrobAnimation> hover_animation_; |
| + const gfx::ThrobAnimation& hover_animation() const { |
| + return hover_animation_; |
| + } |
| + InkDropDelegate* ink_drop_delegate() const { return ink_drop_delegate_; } |
| + void set_ink_drop_delegate(InkDropDelegate* ink_drop_delegate) { |
| + ink_drop_delegate_ = ink_drop_delegate; |
| + } |
| private: |
| // Returns true if this is not a top level widget. Virtual for tests. |
| @@ -149,6 +143,12 @@ class VIEWS_EXPORT CustomButton : public Button, |
| // Returns true if the focus is not in a top level widget. Virtual for tests. |
| virtual bool FocusInChildWidget() const; |
| + // The button state. |
| + ButtonState state_; |
| + |
| + // Hover animation. |
|
sadrul
2015/12/21 22:05:31
The comments aren't probably necessary really.
Evan Stade
2015/12/21 22:27:16
Done.
|
| + gfx::ThrobAnimation hover_animation_; |
| + |
| // Should we animate when the state changes? Defaults to true. |
| bool animate_on_state_change_; |