| Index: ui/views/animation/ink_drop_host_view.cc
|
| diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc
|
| index faf32b07d816bab75fed2fe7b3ae2dd0148570d4..8bb6270599d8d82110462277d73d38bd914dc05f 100644
|
| --- a/ui/views/animation/ink_drop_host_view.cc
|
| +++ b/ui/views/animation/ink_drop_host_view.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "ui/gfx/color_palette.h"
|
| #include "ui/gfx/geometry/size_conversions.h"
|
| +#include "ui/views/animation/ink_drop.h"
|
| #include "ui/views/animation/ink_drop_hover.h"
|
| #include "ui/views/animation/square_ink_drop_ripple.h"
|
|
|
| @@ -62,6 +63,18 @@ std::unique_ptr<InkDropHover> InkDropHostView::CreateInkDropHover() const {
|
| return hover;
|
| }
|
|
|
| +void InkDropHostView::OnFocus() {
|
| + views::View::OnFocus();
|
| + if (ink_drop_delegate() && ShouldShowInkDropForFocus())
|
| + ink_drop_delegate()->GetInkDrop()->SnapToHovered(true);
|
| +}
|
| +
|
| +void InkDropHostView::OnBlur() {
|
| + views::View::OnBlur();
|
| + if (ink_drop_delegate() && ShouldShowInkDropForFocus())
|
| + ink_drop_delegate()->GetInkDrop()->SnapToHovered(false);
|
| +}
|
| +
|
| gfx::Point InkDropHostView::GetInkDropCenter() const {
|
| return GetLocalBounds().CenterPoint();
|
| }
|
| @@ -71,4 +84,8 @@ SkColor InkDropHostView::GetInkDropBaseColor() const {
|
| return gfx::kPlaceholderColor;
|
| }
|
|
|
| +bool InkDropHostView::ShouldShowInkDropForFocus() const {
|
| + return false;
|
| +}
|
| +
|
| } // namespace views
|
|
|