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..debf8d847bdf144c226d8afc136c841b9669f2f2 100644 |
| --- a/ui/views/controls/button/custom_button.h |
| +++ b/ui/views/controls/button/custom_button.h |
| @@ -8,6 +8,7 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "ui/events/event_constants.h" |
| #include "ui/gfx/animation/animation_delegate.h" |
| +#include "ui/views/animation/ink_drop_state.h" |
| #include "ui/views/controls/button/button.h" |
| namespace gfx { |
| @@ -120,6 +121,14 @@ class VIEWS_EXPORT CustomButton : public Button, |
| // we simply return IsTriggerableEvent(event). |
| virtual bool ShouldEnterPushedState(const ui::Event& event); |
| + void set_has_ink_drop_action_on_click(bool has_ink_drop_action_on_click) { |
| + has_ink_drop_action_on_click_ = has_ink_drop_action_on_click; |
| + } |
| + |
| + void set_ink_drop_action_on_click(InkDropState ink_drop_state) { |
| + ink_drop_action_on_click_ = ink_drop_state; |
| + } |
|
sadrul
2015/12/21 22:24:35
It doesn't look like this is actually ever used?
bruthig
2015/12/22 16:49:17
I expect it to be used by buttons that would like
sadrul
2015/12/22 22:34:35
Yeah, let's remove that until we need it.
bruthig
2015/12/22 23:10:15
Done.
|
| + |
| // Returns true if the button should enter hovered state; that is, if the |
| // mouse is over the button, and no other window has capture (which would |
| // prevent the button from receiving MouseExited events and updating its |
| @@ -137,6 +146,10 @@ class VIEWS_EXPORT CustomButton : public Button, |
| const ViewHierarchyChangedDetails& details) override; |
| void OnBlur() override; |
| + // Overridden from Button: |
| + void NotifyClick(const ui::Event& event) override; |
| + void OnClickCanceled(const ui::Event& event) override; |
| + |
| // The button state (defined in implementation) |
| ButtonState state_; |
| @@ -169,6 +182,14 @@ class VIEWS_EXPORT CustomButton : public Button, |
| // The event on which the button should notify its listener. |
| NotifyAction notify_action_; |
| + // True when a button click should trigger an animation action on |
| + // |ink_drop_delegate_|. |
| + bool has_ink_drop_action_on_click_; |
| + |
| + // The animation action to trigger on the |ink_drop_delegate_| when the button |
| + // is clicked. |
| + InkDropState ink_drop_action_on_click_; |
|
sadrul
2015/12/21 22:24:35
Can there be an InkDropState::NONE, instead of hav
bruthig
2015/12/22 16:49:18
There are plans to add an InkDropDelegate::InkDrop
|
| + |
| DISALLOW_COPY_AND_ASSIGN(CustomButton); |
| }; |