| Index: ui/views/controls/button/menu_button.cc
|
| diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc
|
| index 3602b45bc9cfbe483d28189ef9b6c93d3f8aed56..d5796b0e21cbe0c402aeed7b88f916582080ef8a 100644
|
| --- a/ui/views/controls/button/menu_button.cc
|
| +++ b/ui/views/controls/button/menu_button.cc
|
| @@ -18,7 +18,6 @@
|
| #include "ui/gfx/text_constants.h"
|
| #include "ui/resources/grit/ui_resources.h"
|
| #include "ui/strings/grit/ui_strings.h"
|
| -#include "ui/views/animation/ink_drop_delegate.h"
|
| #include "ui/views/controls/button/button.h"
|
| #include "ui/views/controls/button/menu_button_listener.h"
|
| #include "ui/views/mouse_constants.h"
|
| @@ -148,10 +147,8 @@ bool MenuButton::Activate(const ui::Event* event) {
|
|
|
| menu_closed_time_ = TimeTicks::Now();
|
|
|
| - if (ink_drop_delegate() && !increment_pressed_lock_called &&
|
| - pressed_lock_count_ == 0) {
|
| - ink_drop_delegate()->OnAction(InkDropState::ACTION_TRIGGERED);
|
| - }
|
| + if (!increment_pressed_lock_called && pressed_lock_count_ == 0)
|
| + AnimateInkDrop(InkDropState::ACTION_TRIGGERED);
|
|
|
| // We must return false here so that the RootView does not get stuck
|
| // sending all mouse pressed events to us instead of the appropriate
|
| @@ -159,8 +156,7 @@ bool MenuButton::Activate(const ui::Event* event) {
|
| return false;
|
| }
|
|
|
| - if (ink_drop_delegate())
|
| - ink_drop_delegate()->OnAction(InkDropState::HIDDEN);
|
| + AnimateInkDrop(InkDropState::HIDDEN);
|
| return true;
|
| }
|
|
|
| @@ -226,8 +222,7 @@ void MenuButton::OnMouseReleased(const ui::MouseEvent& event) {
|
| HitTestPoint(event.location()) && !InDrag()) {
|
| Activate(&event);
|
| } else {
|
| - if (ink_drop_delegate())
|
| - ink_drop_delegate()->OnAction(InkDropState::HIDDEN);
|
| + AnimateInkDrop(InkDropState::HIDDEN);
|
| LabelButton::OnMouseReleased(event);
|
| }
|
| }
|
| @@ -377,11 +372,11 @@ void MenuButton::IncrementPressedLocked(bool snap_ink_drop_to_activated) {
|
| if (increment_pressed_lock_called_)
|
| *increment_pressed_lock_called_ = true;
|
| should_disable_after_press_ = state() == STATE_DISABLED;
|
| - if (state() != STATE_PRESSED && ink_drop_delegate()) {
|
| + if (state() != STATE_PRESSED) {
|
| if (snap_ink_drop_to_activated)
|
| - ink_drop_delegate()->SnapToActivated();
|
| + ink_drop()->SnapToActivated();
|
| else
|
| - ink_drop_delegate()->OnAction(InkDropState::ACTIVATED);
|
| + AnimateInkDrop(InkDropState::ACTIVATED);
|
| }
|
| SetState(STATE_PRESSED);
|
| }
|
| @@ -400,8 +395,8 @@ void MenuButton::DecrementPressedLocked() {
|
| desired_state = STATE_HOVERED;
|
| }
|
| SetState(desired_state);
|
| - if (ink_drop_delegate() && state() != STATE_PRESSED)
|
| - ink_drop_delegate()->OnAction(InkDropState::DEACTIVATED);
|
| + if (state() != STATE_PRESSED)
|
| + AnimateInkDrop(InkDropState::DEACTIVATED);
|
| }
|
| }
|
|
|
|
|