| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ | 5 #ifndef UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ |
| 6 #define UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ | 6 #define UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // will be configured with the given |duration|, |tween|, and | 84 // will be configured with the given |duration|, |tween|, and |
| 85 // |preemption_strategy| values. The |observer| will be added to all | 85 // |preemption_strategy| values. The |observer| will be added to all |
| 86 // LayerAnimationSequences if not null. | 86 // LayerAnimationSequences if not null. |
| 87 void AnimateToTransform( | 87 void AnimateToTransform( |
| 88 const gfx::Transform& transform, | 88 const gfx::Transform& transform, |
| 89 base::TimeDelta duration, | 89 base::TimeDelta duration, |
| 90 ui::LayerAnimator::PreemptionStrategy preemption_strategy, | 90 ui::LayerAnimator::PreemptionStrategy preemption_strategy, |
| 91 gfx::Tween::Type tween, | 91 gfx::Tween::Type tween, |
| 92 ui::LayerAnimationObserver* observer); | 92 ui::LayerAnimationObserver* observer); |
| 93 | 93 |
| 94 // Creates a pause animation for transform property. |
| 95 void PauseTransformAnimation( |
| 96 base::TimeDelta duration, |
| 97 ui::LayerAnimator::PreemptionStrategy preemption_strategy, |
| 98 ui::LayerAnimationObserver* observer); |
| 99 |
| 94 // Sets the opacity of the ink drop. Note that this does not perform any | 100 // Sets the opacity of the ink drop. Note that this does not perform any |
| 95 // animation. | 101 // animation. |
| 96 void SetOpacity(float opacity); | 102 void SetOpacity(float opacity); |
| 97 | 103 |
| 98 // Animates the |painted_layer_| to the specified |opacity|. The animation | 104 // Animates the |painted_layer_| to the specified |opacity|. The animation |
| 99 // will be configured with the given |duration|, |tween|, and | 105 // will be configured with the given |duration|, |tween|, and |
| 100 // |preemption_strategy| values. The |observer| will be added to all | 106 // |preemption_strategy| values. The |observer| will be added to all |
| 101 // LayerAnimationSequences if not null. | 107 // LayerAnimationSequences if not null. |
| 102 void AnimateToOpacity( | 108 void AnimateToOpacity( |
| 103 float opacity, | 109 float opacity, |
| 104 base::TimeDelta duration, | 110 base::TimeDelta duration, |
| 105 ui::LayerAnimator::PreemptionStrategy preemption_strategy, | 111 ui::LayerAnimator::PreemptionStrategy preemption_strategy, |
| 106 gfx::Tween::Type tween, | 112 gfx::Tween::Type tween, |
| 107 ui::LayerAnimationObserver* observer); | 113 ui::LayerAnimationObserver* observer); |
| 108 | 114 |
| 115 // Creates a pause animation for opacity property. |
| 116 void PauseOpacityAnimation( |
| 117 base::TimeDelta duration, |
| 118 ui::LayerAnimator::PreemptionStrategy preemption_strategy, |
| 119 ui::LayerAnimationObserver* observer); |
| 120 |
| 109 // Returns the Transform to be applied to the |painted_layer_| for the given | 121 // Returns the Transform to be applied to the |painted_layer_| for the given |
| 110 // |target_radius|. | 122 // |target_radius|. |
| 111 gfx::Transform CalculateTransform(float target_radius) const; | 123 gfx::Transform CalculateTransform(float target_radius) const; |
| 112 | 124 |
| 113 // Returns the target Transform for when the ink drop is fully shown. | 125 // Returns the target Transform for when the ink drop is fully shown. |
| 114 gfx::Transform GetMaxSizeTargetTransform() const; | 126 gfx::Transform GetMaxSizeTargetTransform() const; |
| 115 | 127 |
| 116 // Returns the largest distance from |point| to the corners of the | 128 // Returns the largest distance from |point| to the corners of the |
| 117 // |root_layer_| bounds. | 129 // |root_layer_| bounds. |
| 118 float MaxDistanceToCorners(const gfx::Point& point) const; | 130 float MaxDistanceToCorners(const gfx::Point& point) const; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 140 | 152 |
| 141 // The current ink drop state. | 153 // The current ink drop state. |
| 142 InkDropState ink_drop_state_; | 154 InkDropState ink_drop_state_; |
| 143 | 155 |
| 144 DISALLOW_COPY_AND_ASSIGN(FloodFillInkDropRipple); | 156 DISALLOW_COPY_AND_ASSIGN(FloodFillInkDropRipple); |
| 145 }; | 157 }; |
| 146 | 158 |
| 147 } // namespace views | 159 } // namespace views |
| 148 | 160 |
| 149 #endif // UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ | 161 #endif // UI_VIEWS_ANIMATION_FLOOD_FILL_INK_DROP_RIPPLE_H_ |
| OLD | NEW |