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

Side by Side Diff: ui/compositor/layer_animation_element.h

Issue 2291923002: Check target value
Patch Set: Test Created 4 years, 3 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 | « components/exo/shell_surface.cc ('k') | ui/compositor/layer_animation_element.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMPOSITOR_LAYER_ANIMATION_ELEMENT_H_ 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_ELEMENT_H_
6 #define UI_COMPOSITOR_LAYER_ANIMATION_ELEMENT_H_ 6 #define UI_COMPOSITOR_LAYER_ANIMATION_ELEMENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Called once each time the animation element is run before any call to 197 // Called once each time the animation element is run before any call to
198 // OnProgress. 198 // OnProgress.
199 virtual void OnStart(LayerAnimationDelegate* delegate) = 0; 199 virtual void OnStart(LayerAnimationDelegate* delegate) = 0;
200 virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) = 0; 200 virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) = 0;
201 virtual void OnGetTarget(TargetValue* target) const = 0; 201 virtual void OnGetTarget(TargetValue* target) const = 0;
202 virtual void OnAbort(LayerAnimationDelegate* delegate) = 0; 202 virtual void OnAbort(LayerAnimationDelegate* delegate) = 0;
203 203
204 // Actually start the animation, dispatching to another thread if needed. 204 // Actually start the animation, dispatching to another thread if needed.
205 virtual void RequestEffectiveStart(LayerAnimationDelegate* delegate); 205 virtual void RequestEffectiveStart(LayerAnimationDelegate* delegate);
206 206
207 virtual bool AreStartAndTargetSame() = 0;
208
207 LayerAnimationElement(const LayerAnimationElement& element); 209 LayerAnimationElement(const LayerAnimationElement& element);
208 210
209 private: 211 private:
210 // For debugging purposes, we sometimes alter the duration we actually use. 212 // For debugging purposes, we sometimes alter the duration we actually use.
211 // For example, during tests we often set duration = 0, and it is sometimes 213 // For example, during tests we often set duration = 0, and it is sometimes
212 // useful to slow animations down to see them more clearly. 214 // useful to slow animations down to see them more clearly.
213 base::TimeDelta GetEffectiveDuration(const base::TimeDelta& delta); 215 base::TimeDelta GetEffectiveDuration(const base::TimeDelta& delta);
214 216
215 bool first_frame_; 217 bool first_frame_;
216 const AnimatableProperties properties_; 218 const AnimatableProperties properties_;
(...skipping 10 matching lines...) Expand all
227 double last_progressed_fraction_; 229 double last_progressed_fraction_;
228 230
229 base::WeakPtrFactory<LayerAnimationElement> weak_ptr_factory_; 231 base::WeakPtrFactory<LayerAnimationElement> weak_ptr_factory_;
230 232
231 DISALLOW_ASSIGN(LayerAnimationElement); 233 DISALLOW_ASSIGN(LayerAnimationElement);
232 }; 234 };
233 235
234 } // namespace ui 236 } // namespace ui
235 237
236 #endif // UI_COMPOSITOR_LAYER_ANIMATION_ELEMENT_H_ 238 #endif // UI_COMPOSITOR_LAYER_ANIMATION_ELEMENT_H_
OLDNEW
« no previous file with comments | « components/exo/shell_surface.cc ('k') | ui/compositor/layer_animation_element.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698