| Index: ui/views/animation/ink_drop_animation.h
|
| diff --git a/ui/views/animation/ink_drop_animation_controller_impl.h b/ui/views/animation/ink_drop_animation.h
|
| similarity index 69%
|
| copy from ui/views/animation/ink_drop_animation_controller_impl.h
|
| copy to ui/views/animation/ink_drop_animation.h
|
| index c41f261217c67ea0996ded861386ed3589fe1d95..9c50f3a47d98d9d734fe9f07b4e6b17cf1e30d14 100644
|
| --- a/ui/views/animation/ink_drop_animation_controller_impl.h
|
| +++ b/ui/views/animation/ink_drop_animation.h
|
| @@ -2,41 +2,45 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_
|
| -#define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_
|
| +#ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_
|
| +#define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_
|
|
|
| +#include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/time/time.h"
|
| -#include "ui/events/event_handler.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| -#include "ui/gfx/geometry/size.h"
|
| -#include "ui/views/animation/ink_drop_animation_controller.h"
|
| +#include "ui/views/animation/ink_drop_state.h"
|
| #include "ui/views/views_export.h"
|
|
|
| namespace ui {
|
| class Layer;
|
| -}
|
| +} // namespace ui
|
|
|
| namespace views {
|
| class AppearAnimationObserver;
|
| class InkDropDelegate;
|
| -class InkDropHost;
|
| -class View;
|
|
|
| -// Controls an ink drop animation which is hosted by an InkDropHost.
|
| -class VIEWS_EXPORT InkDropAnimationControllerImpl
|
| - : public InkDropAnimationController {
|
| +// An ink drop animation that animates between the different InkDropStates.
|
| +class VIEWS_EXPORT InkDropAnimation {
|
| public:
|
| - // Constructs an ink drop controller that will attach the ink drop to the
|
| - // given |ink_drop_host|.
|
| - explicit InkDropAnimationControllerImpl(InkDropHost* ink_drop_host);
|
| - ~InkDropAnimationControllerImpl() override;
|
| + InkDropAnimation();
|
| + ~InkDropAnimation();
|
|
|
| - // InkDropAnimationController:
|
| - void AnimateToState(InkDropState state) override;
|
| - void SetInkDropSize(const gfx::Size& size) override;
|
| - gfx::Rect GetInkDropBounds() const override;
|
| - void SetInkDropBounds(const gfx::Rect& bounds) override;
|
| + // The root that can be added in to a Layer tree.
|
| + ui::Layer* root_layer() { return root_layer_.get(); }
|
| +
|
| + // Animates from the current |state_| to |state|.
|
| + void AnimateToState(InkDropState state);
|
| +
|
| + // Sets the size of the ink drop.
|
| + void SetInkDropSize(const gfx::Size& size);
|
| +
|
| + // Returns the ink drop bounds.
|
| + gfx::Rect GetInkDropBounds() const;
|
| +
|
| + // Sets the bounds for the ink drop. |bounds| are in the coordinate space of
|
| + // the parent ui::Layer that the ink drop layer is added to.
|
| + void SetInkDropBounds(const gfx::Rect& bounds);
|
|
|
| private:
|
| // Starts the animation of a touch event.
|
| @@ -62,8 +66,6 @@ class VIEWS_EXPORT InkDropAnimationControllerImpl
|
| // Initializes |layer|'s properties.
|
| void SetupAnimationLayer(ui::Layer* layer, InkDropDelegate* delegate);
|
|
|
| - InkDropHost* ink_drop_host_;
|
| -
|
| // The root layer that parents the animating layers.
|
| scoped_ptr<ui::Layer> root_layer_;
|
|
|
| @@ -91,9 +93,9 @@ class VIEWS_EXPORT InkDropAnimationControllerImpl
|
| // parent ui::Layer that the ink drop layers were added to.
|
| gfx::Rect ink_drop_bounds_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(InkDropAnimation);
|
| };
|
|
|
| } // namespace views
|
|
|
| -#endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_
|
| +#endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_
|
|
|