Chromium Code Reviews| Index: ui/views/controls/button/custom_button.cc |
| diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc |
| index aafbf2d65a63aa32810d6da8d352f9bf1663f8af..c3d484773946c37005bd2fa00d68f4aa995591c5 100644 |
| --- a/ui/views/controls/button/custom_button.cc |
| +++ b/ui/views/controls/button/custom_button.cc |
| @@ -10,6 +10,7 @@ |
| #include "ui/events/keycodes/keyboard_codes.h" |
| #include "ui/gfx/animation/throb_animation.h" |
| #include "ui/gfx/screen.h" |
| +#include "ui/views/animation/ink_drop_delegate.h" |
| #include "ui/views/controls/button/blue_button.h" |
| #include "ui/views/controls/button/checkbox.h" |
| #include "ui/views/controls/button/image_button.h" |
| @@ -284,6 +285,8 @@ void CustomButton::OnDragDone() { |
| // (since disabled buttons may still be able to be dragged). |
| if (state_ != STATE_DISABLED) |
| SetState(STATE_NORMAL); |
| + if (ink_drop_delegate_) |
| + ink_drop_delegate_->OnAction(InkDropState::HIDDEN); |
| } |
| void CustomButton::GetAccessibleState(ui::AXViewState* state) { |
| @@ -371,9 +374,18 @@ bool CustomButton::ShouldEnterHoveredState() { |
| return check_mouse_position && IsMouseHovered(); |
| } |
| +void CustomButton::set_ink_drop_delegate(InkDropDelegate* ink_drop_delegate) { |
| + ink_drop_delegate_.reset(ink_drop_delegate); |
| +} |
| + |
| //////////////////////////////////////////////////////////////////////////////// |
| // CustomButton, View overrides (protected): |
| +void CustomButton::OnBoundsChanged(const gfx::Rect& previous_bounds) { |
| + if (ink_drop_delegate_) |
|
bruthig
2015/11/26 21:27:33
Correct me if I'm wrong but the intent here was to
varkha
2015/11/26 22:12:40
I have restored override of Layout(). Can you see
|
| + ink_drop_delegate_->OnBoundsChanged(); |
| +} |
| + |
| void CustomButton::ViewHierarchyChanged( |
| const ViewHierarchyChangedDetails& details) { |
| if (!details.is_add && state_ != STATE_DISABLED) |