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

Unified Diff: cc/animation/animation_player.h

Issue 2966793002: NOT FOR REVIEW - convert to cc animation
Patch Set: switch to transform operations Created 3 years, 6 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 | « cc/animation/animation_observer.h ('k') | cc/animation/animation_player.cc » ('j') | no next file with comments »
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 98475a602b315069d9f431ff03a7a19eaeda7c21..c93699b061e606e95b278c13a8751505d7685078 100644
--- a/cc/animation/animation_player.h
+++ b/cc/animation/animation_player.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/observer_list.h"
#include "base/time/time.h"
#include "cc/animation/animation.h"
#include "cc/animation/animation_curve.h"
@@ -21,6 +22,7 @@ namespace cc {
class AnimationDelegate;
class AnimationEvents;
class AnimationHost;
+class AnimationObserver;
class AnimationTimeline;
struct AnimationEvent;
struct PropertyAnimationState;
@@ -170,6 +172,11 @@ class CC_ANIMATION_EXPORT AnimationPlayer
return scroll_offset_animation_was_interrupted_;
}
+ // This controls the list of entities who are informed of updates as
+ // animations are ticked.
+ void AddObserver(AnimationObserver* observer);
+ void RemoveObserver(AnimationObserver* observer);
+
private:
friend class base::RefCounted<AnimationPlayer>;
@@ -218,6 +225,8 @@ class CC_ANIMATION_EXPORT AnimationPlayer
bool scroll_offset_animation_was_interrupted_;
+ base::ObserverList<AnimationObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(AnimationPlayer);
};
« no previous file with comments | « cc/animation/animation_observer.h ('k') | cc/animation/animation_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698