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

Unified Diff: cc/animation/animation_player.h

Issue 2189813002: ElementAnimations should hold an ObservableList of AnimationPlayers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + fix blink_platform_unittests compile error Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/animation/animation_player.cc » ('j') | cc/animation/element_animations_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_player.h
diff --git a/cc/animation/animation_player.h b/cc/animation/animation_player.h
index 247b24c3d23c5fcc7ec66bedd5c2c0a70519d0db..186b530b77b66efd7b8b9db9375cb79c35446bb6 100644
--- a/cc/animation/animation_player.h
+++ b/cc/animation/animation_player.h
@@ -31,8 +31,7 @@ class ElementAnimations;
// same-property animations.
// Each AnimationPlayer has its copy on the impl thread.
// This is a CC counterpart for blink::AnimationPlayer (in 1:1 relationship).
-class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer>,
- public base::LinkNode<AnimationPlayer> {
+class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer> {
public:
static scoped_refptr<AnimationPlayer> Create(int id);
scoped_refptr<AnimationPlayer> CreateImplInstance() const;
@@ -75,31 +74,32 @@ class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer>,
void PushPropertiesTo(AnimationPlayer* player_impl);
// AnimationDelegate routing.
- void NotifyAnimationStarted(base::TimeTicks monotonic_time,
- TargetProperty::Type target_property,
- int group);
- void NotifyAnimationFinished(base::TimeTicks monotonic_time,
- TargetProperty::Type target_property,
- int group);
- void NotifyAnimationAborted(base::TimeTicks monotonic_time,
- TargetProperty::Type target_property,
- int group);
- void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
- TargetProperty::Type target_property,
- double animation_start_time,
- std::unique_ptr<AnimationCurve> curve);
+ virtual void OnAnimationStarted(base::TimeTicks monotonic_time,
loyso (OOO) 2016/08/04 06:32:10 It's very sad to make it polymorphic only for the
loyso (OOO) 2016/08/04 06:50:37 I'm severely jet lagged but... Can we use Animatio
ymalik 2016/08/04 15:31:47 Yes, I am detaching the player from the timeline f
+ TargetProperty::Type target_property,
+ int group);
+ virtual void OnAnimationFinished(base::TimeTicks monotonic_time,
+ TargetProperty::Type target_property,
+ int group);
+ virtual void OnAnimationAborted(base::TimeTicks monotonic_time,
+ TargetProperty::Type target_property,
+ int group);
+ virtual void OnAnimationTakeover(base::TimeTicks monotonic_time,
+ TargetProperty::Type target_property,
+ double animation_start_time,
+ std::unique_ptr<AnimationCurve> curve);
// Whether this player has animations waiting to get sent to ElementAnimations
bool has_pending_animations_for_testing() const {
return !animations_.empty();
}
+ protected:
+ explicit AnimationPlayer(int id);
+ virtual ~AnimationPlayer();
+
private:
friend class base::RefCounted<AnimationPlayer>;
- explicit AnimationPlayer(int id);
- ~AnimationPlayer();
-
void SetNeedsCommit();
void RegisterPlayer();
« no previous file with comments | « no previous file | cc/animation/animation_player.cc » ('j') | cc/animation/element_animations_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698