Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(848)

Side by Side Diff: ui/views/animation/square_ink_drop_ripple.h

Issue 2805753002: Remove SquareInkDropRipple::AnimateToCenterPoint (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/animation/square_ink_drop_ripple.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SQUARE_INK_DROP_RIPPLE_H_ 5 #ifndef UI_VIEWS_ANIMATION_SQUARE_INK_DROP_RIPPLE_H_
6 #define UI_VIEWS_ANIMATION_SQUARE_INK_DROP_RIPPLE_H_ 6 #define UI_VIEWS_ANIMATION_SQUARE_INK_DROP_RIPPLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 float GetCurrentOpacity() const; 102 float GetCurrentOpacity() const;
103 103
104 // InkDropRipple: 104 // InkDropRipple:
105 void AnimateStateChange(InkDropState old_ink_drop_state, 105 void AnimateStateChange(InkDropState old_ink_drop_state,
106 InkDropState new_ink_drop_state, 106 InkDropState new_ink_drop_state,
107 ui::LayerAnimationObserver* observer) override; 107 ui::LayerAnimationObserver* observer) override;
108 void SetStateToHidden() override; 108 void SetStateToHidden() override;
109 void AbortAllAnimations() override; 109 void AbortAllAnimations() override;
110 110
111 // Animates the |root_layer_| to the specified |center_point|. The animation
112 // will be configured with the given |duration|, |tween|, and
113 // |preemption_strategy| values. The |observer| will be added to all
114 // LayerAnimationSequences if not null.
115 void AnimateCenterPoint(
116 const gfx::Point& center_point,
117 base::TimeDelta duration,
118 ui::LayerAnimator::PreemptionStrategy preemption_strategy,
119 gfx::Tween::Type tween,
120 ui::LayerAnimationObserver* observer);
121
122 // Animates all of the painted shape layers to the specified |transforms|. The 111 // Animates all of the painted shape layers to the specified |transforms|. The
123 // animation will be configured with the given |duration|, |tween|, and 112 // animation will be configured with the given |duration|, |tween|, and
124 // |preemption_strategy| values. The |observer| will be added to all 113 // |preemption_strategy| values. The |observer| will be added to all
125 // LayerAnimationSequences if not null. 114 // LayerAnimationSequences if not null.
126 void AnimateToTransforms( 115 void AnimateToTransforms(
127 const InkDropTransforms transforms, 116 const InkDropTransforms transforms,
128 base::TimeDelta duration, 117 base::TimeDelta duration,
129 ui::LayerAnimator::PreemptionStrategy preemption_strategy, 118 ui::LayerAnimator::PreemptionStrategy preemption_strategy,
130 gfx::Tween::Type tween, 119 gfx::Tween::Type tween,
131 ui::LayerAnimationObserver* observer); 120 ui::LayerAnimationObserver* observer);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // Transforms for the DEACTIVATED animation. 161 // Transforms for the DEACTIVATED animation.
173 void GetDeactivatedTargetTransforms(InkDropTransforms* transforms_out) const; 162 void GetDeactivatedTargetTransforms(InkDropTransforms* transforms_out) const;
174 163
175 // Adds and configures a new |painted_shape| layer to |painted_layers_|. 164 // Adds and configures a new |painted_shape| layer to |painted_layers_|.
176 void AddPaintLayer(PaintedShape painted_shape); 165 void AddPaintLayer(PaintedShape painted_shape);
177 166
178 // The shape used for the ACTIVATED/DEACTIVATED states. 167 // The shape used for the ACTIVATED/DEACTIVATED states.
179 ActivatedShape activated_shape_; 168 ActivatedShape activated_shape_;
180 169
181 // Ink drop opacity when it is visible. 170 // Ink drop opacity when it is visible.
182 float visible_opacity_; 171 const float visible_opacity_;
183 172
184 // The center point that the ripple will animate to. 173 // The center point that the ripple will animate to.
185 gfx::Point target_center_point_; 174 const gfx::Point target_center_point_;
bruthig 2017/04/11 17:23:43 nit: Remove
Evan Stade 2017/04/11 18:01:27 we'll need to bring it back in the next CL but don
186 175
187 // Maximum size that an ink drop will be drawn to for any InkDropState whose 176 // Maximum size that an ink drop will be drawn to for any InkDropState whose
188 // final frame should be large. 177 // final frame should be large.
189 gfx::Size large_size_; 178 const gfx::Size large_size_;
190 179
191 // Corner radius used to draw the rounded rectangles corner for any 180 // Corner radius used to draw the rounded rectangles corner for any
192 // InkDropState whose final frame should be large. 181 // InkDropState whose final frame should be large.
193 int large_corner_radius_; 182 const int large_corner_radius_;
194 183
195 // Maximum size that an ink drop will be drawn to for any InkDropState whose 184 // Maximum size that an ink drop will be drawn to for any InkDropState whose
196 // final frame should be small. 185 // final frame should be small.
197 gfx::Size small_size_; 186 const gfx::Size small_size_;
198 187
199 // Corner radius used to draw the rounded rectangles corner for any 188 // Corner radius used to draw the rounded rectangles corner for any
200 // InkDropState whose final frame should be small. 189 // InkDropState whose final frame should be small.
201 int small_corner_radius_; 190 const int small_corner_radius_;
202 191
203 // ui::LayerDelegate to paint circles for all the circle layers. 192 // ui::LayerDelegate to paint circles for all the circle layers.
204 std::unique_ptr<CircleLayerDelegate> circle_layer_delegate_; 193 std::unique_ptr<CircleLayerDelegate> circle_layer_delegate_;
205 194
206 // ui::LayerDelegate to paint rectangles for all the rectangle layers. 195 // ui::LayerDelegate to paint rectangles for all the rectangle layers.
207 std::unique_ptr<RectangleLayerDelegate> rect_layer_delegate_; 196 std::unique_ptr<RectangleLayerDelegate> rect_layer_delegate_;
208 197
209 // The root layer that parents the animating layers. The root layer is used to 198 // The root layer that parents the animating layers. The root layer is used to
210 // manipulate opacity and location, and its children are used to manipulate 199 // manipulate opacity and location, and its children are used to manipulate
211 // the different painted shapes that compose the ink drop. 200 // the different painted shapes that compose the ink drop.
212 ui::Layer root_layer_; 201 ui::Layer root_layer_;
213 202
214 // ui::Layers for all of the painted shape layers that compose the ink drop. 203 // ui::Layers for all of the painted shape layers that compose the ink drop.
215 std::unique_ptr<ui::Layer> painted_layers_[PAINTED_SHAPE_COUNT]; 204 std::unique_ptr<ui::Layer> painted_layers_[PAINTED_SHAPE_COUNT];
216 205
217 DISALLOW_COPY_AND_ASSIGN(SquareInkDropRipple); 206 DISALLOW_COPY_AND_ASSIGN(SquareInkDropRipple);
218 }; 207 };
219 208
220 } // namespace views 209 } // namespace views
221 210
222 #endif // UI_VIEWS_ANIMATION_SQUARE_INK_DROP_RIPPLE_H_ 211 #endif // UI_VIEWS_ANIMATION_SQUARE_INK_DROP_RIPPLE_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/animation/square_ink_drop_ripple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698