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 bb4550098ee142bdc6194be9f87886aecb609036..cbbeb2554cbbb0637abfc08cb20950b4cfb23253 100644 |
--- a/ui/views/controls/button/custom_button.cc |
+++ b/ui/views/controls/button/custom_button.cc |
@@ -140,8 +140,11 @@ const char* CustomButton::GetClassName() const { |
bool CustomButton::OnMousePressed(const ui::MouseEvent& event) { |
if (state_ == STATE_DISABLED) |
return true; |
- if (ShouldEnterPushedState(event) && HitTestPoint(event.location())) |
+ if (ShouldEnterPushedState(event) && HitTestPoint(event.location())) { |
SetState(STATE_PRESSED); |
+ if (ink_drop_delegate_) |
+ ink_drop_delegate_->OnAction(views::InkDropState::ACTION_PENDING); |
+ } |
if (request_focus_on_press_) |
RequestFocus(); |
if (IsTriggerableEvent(event) && notify_action_ == NOTIFY_ON_PRESS) { |
@@ -406,6 +409,18 @@ void CustomButton::OnBlur() { |
SetState(STATE_NORMAL); |
} |
+void CustomButton::NotifyClick(const ui::Event& event) { |
+ Button::NotifyClick(event); |
+ if (ink_drop_delegate()) |
+ ink_drop_delegate()->OnAction(views::InkDropState::QUICK_ACTION); |
+} |
+ |
+void CustomButton::OnClickCanceled(const ui::Event& event) { |
+ Button::OnClickCanceled(event); |
+ if (ink_drop_delegate()) |
+ ink_drop_delegate()->OnAction(views::InkDropState::HIDDEN); |
+} |
+ |
bool CustomButton::IsChildWidget() const { |
return GetWidget() && GetWidget()->GetTopLevelWidget() != GetWidget(); |
} |