Chromium Code Reviews| 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 747561dc42f45a0df7f511c95fd17a86889e2bf0..6cee667612a8b4ea92cf21f54e431e5f882640fc 100644 |
| --- a/ui/views/animation/ink_drop_animation_controller_factory.cc |
| +++ b/ui/views/animation/ink_drop_animation_controller_factory.cc |
| @@ -24,16 +24,17 @@ class VIEWS_EXPORT InkDropAnimationControllerStub |
| ~InkDropAnimationControllerStub() override; |
| // InkDropAnimationController: |
| + InkDropState GetInkDropState() const override; |
| void AnimateToState(InkDropState state) override; |
| - void SetInkDropSize(const gfx::Size& size) override; |
| - gfx::Rect GetInkDropBounds() const override; |
| - void SetInkDropBounds(const gfx::Rect& bounds) override; |
| + gfx::Size GetInkDropLargeSize() const override; |
| + void SetInkDropSize(const gfx::Size& large_size, |
| + int large_corner_radius, |
| + const gfx::Size& small_size, |
| + int small_corner_radius) override; |
| + gfx::Point GetInkDropOrigin() const override; |
| + void SetInkDropOrigin(const gfx::Point& origin) override; |
| private: |
| - // The bounds of the ink drop layers. Defined in the coordinate space of the |
| - // parent ui::Layer that the ink drop layers were added to. |
| - gfx::Rect ink_drop_bounds_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerStub); |
| }; |
| @@ -42,20 +43,28 @@ InkDropAnimationControllerStub::InkDropAnimationControllerStub( |
| InkDropAnimationControllerStub::~InkDropAnimationControllerStub() {} |
| +InkDropState InkDropAnimationControllerStub::GetInkDropState() const { |
| + return InkDropState::HIDDEN; |
| +} |
| + |
| void InkDropAnimationControllerStub::AnimateToState(InkDropState state) {} |
| -void InkDropAnimationControllerStub::SetInkDropSize(const gfx::Size& size) { |
| - ink_drop_bounds_.set_size(size); |
| +gfx::Size InkDropAnimationControllerStub::GetInkDropLargeSize() const { |
| + return gfx::Size(); |
| } |
| -gfx::Rect InkDropAnimationControllerStub::GetInkDropBounds() const { |
| - return ink_drop_bounds_; |
| -} |
| +void InkDropAnimationControllerStub::SetInkDropSize(const gfx::Size& large_size, |
| + int large_corner_radius, |
| + const gfx::Size& small_size, |
| + int small_corner_radius) {} |
| -void InkDropAnimationControllerStub::SetInkDropBounds(const gfx::Rect& bounds) { |
| - ink_drop_bounds_ = bounds; |
| +gfx::Point InkDropAnimationControllerStub::GetInkDropOrigin() const { |
| + return gfx::Point(); |
| } |
| +void InkDropAnimationControllerStub::SetInkDropOrigin( |
| + const gfx::Point& origin) {} |
| + |
| } // namespace |
| InkDropAnimationControllerFactory::InkDropAnimationControllerFactory() {} |
| @@ -66,6 +75,8 @@ scoped_ptr<InkDropAnimationController> |
| InkDropAnimationControllerFactory::CreateInkDropAnimationController( |
| InkDropHost* ink_drop_host) { |
| #if defined(OS_CHROMEOS) |
| + // The ink drop animation is only targeted at ChromeOS because there is |
| + // concern it will conflict with OS level touch feedback in a bad way. |
|
tdanderson
2015/08/19 22:11:19
Since this is behind a flag anyway, I don't think
bruthig
2015/08/20 20:35:35
This was the request of the designers. If we do c
|
| if (ui::MaterialDesignController::IsModeMaterial()) { |
| return scoped_ptr<InkDropAnimationController>( |
| new InkDropAnimationControllerImpl(ink_drop_host)); |