| Index: ui/views/animation/ink_drop_animation_controller_factory.cc
|
| diff --git a/ui/views/animation/ink_drop_animation_controller_factory.cc b/ui/views/animation/ink_drop_animation_controller_factory.cc
|
| index f260d9d6ac731bd9377edaffdc5abb3bdaec5ae0..c3300dc6a62f7d1be23b12c9a8782614a2aacf57 100644
|
| --- a/ui/views/animation/ink_drop_animation_controller_factory.cc
|
| +++ b/ui/views/animation/ink_drop_animation_controller_factory.cc
|
| @@ -26,6 +26,8 @@ class InkDropAnimationControllerStub
|
| // InkDropAnimationController:
|
| InkDropState GetInkDropState() const override;
|
| void AnimateToState(InkDropState state) override;
|
| + void SetHovered(bool is_hovered) override;
|
| + bool IsHovered() const override;
|
| gfx::Size GetInkDropLargeSize() const override;
|
| void SetInkDropSize(const gfx::Size& large_size,
|
| int large_corner_radius,
|
| @@ -34,10 +36,15 @@ class InkDropAnimationControllerStub
|
| void SetInkDropCenter(const gfx::Point& center_point) override;
|
|
|
| private:
|
| + // Tracks whether the ink drop is hovered or not. This is used to ensure that
|
| + // this behaves like all other InkDropAnimationController implementations.
|
| + bool is_hovered_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerStub);
|
| };
|
|
|
| -InkDropAnimationControllerStub::InkDropAnimationControllerStub() {}
|
| +InkDropAnimationControllerStub::InkDropAnimationControllerStub()
|
| + : is_hovered_(false) {}
|
|
|
| InkDropAnimationControllerStub::~InkDropAnimationControllerStub() {}
|
|
|
| @@ -45,7 +52,17 @@ InkDropState InkDropAnimationControllerStub::GetInkDropState() const {
|
| return InkDropState::HIDDEN;
|
| }
|
|
|
| -void InkDropAnimationControllerStub::AnimateToState(InkDropState state) {}
|
| +void InkDropAnimationControllerStub::AnimateToState(InkDropState state) {
|
| + SetHovered(false);
|
| +}
|
| +
|
| +void InkDropAnimationControllerStub::SetHovered(bool is_hovered) {
|
| + is_hovered_ = is_hovered;
|
| +}
|
| +
|
| +bool InkDropAnimationControllerStub::IsHovered() const {
|
| + return is_hovered_;
|
| +}
|
|
|
| gfx::Size InkDropAnimationControllerStub::GetInkDropLargeSize() const {
|
| return gfx::Size();
|
| @@ -67,10 +84,11 @@ InkDropAnimationControllerFactory::~InkDropAnimationControllerFactory() {}
|
|
|
| scoped_ptr<InkDropAnimationController>
|
| InkDropAnimationControllerFactory::CreateInkDropAnimationController(
|
| - InkDropHost* ink_drop_host) {
|
| + InkDropHost* ink_drop_host,
|
| + InkDropConsumer* ink_drop_consumer) {
|
| if (ui::MaterialDesignController::IsModeMaterial()) {
|
| return scoped_ptr<InkDropAnimationController>(
|
| - new InkDropAnimationControllerImpl(ink_drop_host));
|
| + new InkDropAnimationControllerImpl(ink_drop_host, ink_drop_consumer));
|
| }
|
|
|
| return scoped_ptr<InkDropAnimationController>(
|
|
|