| Index: ui/views/animation/ink_drop_animation.h
|
| diff --git a/ui/views/animation/ink_drop_animation.h b/ui/views/animation/ink_drop_animation.h
|
| index 64f39ca95326c71c18b24dc9a9f8d59de04ea111..bde70e2261aa44bf65de19973077c3ac79ac2404 100644
|
| --- a/ui/views/animation/ink_drop_animation.h
|
| +++ b/ui/views/animation/ink_drop_animation.h
|
| @@ -10,6 +10,7 @@
|
| #include "base/observer_list.h"
|
| #include "base/time/time.h"
|
| #include "ui/compositor/layer_animator.h"
|
| +#include "ui/gfx/geometry/point.h"
|
| #include "ui/gfx/geometry/size.h"
|
| #include "ui/gfx/transform.h"
|
| #include "ui/views/animation/ink_drop_state.h"
|
| @@ -88,13 +89,11 @@ class VIEWS_EXPORT InkDropAnimation {
|
| void AnimateToStateInternal(InkDropState ink_drop_state,
|
| ui::LayerAnimationObserver* observer);
|
|
|
| - // Animates all of the painted shape layers to the specified |transforms| and
|
| - // |opacity|. The animation will use the given |duration| and
|
| - // |preemption_strategy|, and |observer| will be added to all
|
| - // LayerAnimationSequences.
|
| + // Animates all of the painted shape layers to the specified |transforms|. The
|
| + // animation will use the given |duration| and |preemption_strategy|, and
|
| + // |observer| will be added to all LayerAnimationSequences.
|
| void AnimateToTransforms(
|
| const InkDropTransforms transforms,
|
| - float opacity,
|
| base::TimeDelta duration,
|
| ui::LayerAnimator::PreemptionStrategy preemption_strategy,
|
| ui::LayerAnimationObserver* observer);
|
| @@ -109,6 +108,15 @@ class VIEWS_EXPORT InkDropAnimation {
|
| // Sets the opacity of the ink drop.
|
| void SetOpacity(float opacity);
|
|
|
| + // Animates all of the painted shape layers to the specified |opacity|. The
|
| + // animation will use the given |duration| and |preemption_strategy|, and
|
| + // |observer| will be added to all LayerAnimationSequences.
|
| + void AnimateToOpacity(
|
| + float opacity,
|
| + base::TimeDelta duration,
|
| + ui::LayerAnimator::PreemptionStrategy preemption_strategy,
|
| + ui::LayerAnimationObserver* animation_observer);
|
| +
|
| // Updates all of the Transforms in |transforms_out| for a circle of the given
|
| // |size|.
|
| void CalculateCircleTransforms(const gfx::Size& size,
|
| @@ -120,15 +128,21 @@ class VIEWS_EXPORT InkDropAnimation {
|
| float corner_radius,
|
| InkDropTransforms* transforms_out) const;
|
|
|
| - // Updates all of the Transforms in |transforms_out| to the current target
|
| - // Transforms of the Layers.
|
| - void GetCurrentTansforms(InkDropTransforms* transforms_out) const;
|
| + // Updates all of the Transforms in |transforms_out| to the current Transforms
|
| + // of the Layers.
|
| + void GetCurrentTransforms(InkDropTransforms* transforms_out) const;
|
|
|
| // Adds and configures a new |painted_shape| layer to |painted_layers_|.
|
| void AddPaintLayer(PaintedShape painted_shape);
|
|
|
| void AbortAllAnimations();
|
|
|
| + // Calculates an estimated distance ratio between 0.0 and 1.0 that estimates
|
| + // how close the painted shape |transforms| are away from the final
|
| + // QUICK_ACTION transforms.
|
| + float CalculateDistanceEstimateToQuickAction(
|
| + const InkDropTransforms& transforms) const;
|
| +
|
| // The Callback invoked when all of the animation sequences for the specific
|
| // |ink_drop_state| animation have started. |observer| is the
|
| // ui::CallbackLayerAnimationObserver which is notifying the callback.
|
|
|