Index: chrome/browser/ui/views/bar_control_button.cc |
diff --git a/chrome/browser/ui/views/bar_control_button.cc b/chrome/browser/ui/views/bar_control_button.cc |
index 0e4336d5533964aabfe476257ce75bcf48ac4f9f..1b57d5e8738feb38d38f1247490a344e9b2bf50a 100644 |
--- a/chrome/browser/ui/views/bar_control_button.cc |
+++ b/chrome/browser/ui/views/bar_control_button.cc |
@@ -23,7 +23,7 @@ BarControlButton::BarControlButton(views::ButtonListener* listener) |
id_(gfx::VectorIconId::VECTOR_ICON_NONE), |
ink_drop_animation_controller_( |
views::InkDropAnimationControllerFactory:: |
- CreateInkDropAnimationController(this)) { |
+ CreateInkDropAnimationController(this, this)) { |
const int kInkDropLargeSize = 32; |
const int kInkDropLargeCornerRadius = 4; |
const int kInkDropSmallSize = 24; |
@@ -129,9 +129,25 @@ void BarControlButton::OnMouseReleased(const ui::MouseEvent& event) { |
ImageButton::OnMouseReleased(event); |
} |
+void BarControlButton::OnMouseEntered(const ui::MouseEvent& event) { |
+ UpdateInkDropHoverState(); |
+} |
+ |
+void BarControlButton::OnMouseExited(const ui::MouseEvent& event) { |
+ UpdateInkDropHoverState(); |
+} |
+ |
void BarControlButton::NotifyClick(const ui::Event& event) { |
ink_drop_animation_controller_->AnimateToState( |
views::InkDropState::QUICK_ACTION); |
ImageButton::NotifyClick(event); |
} |
+ |
+void BarControlButton::OnEnabledChanged() { |
+ UpdateInkDropHoverState(); |
+} |
+ |
+void BarControlButton::UpdateInkDropHoverState() { |
+ ink_drop_animation_controller_->SetHovered(ShouldShowInkDropHover()); |
+} |