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

Unified Diff: cc/animation/layer_animation_controller.h

Issue 1882733005: CC Animation: Make LayerAnimationController to have just one value observer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@privatelac
Patch Set: Fix codereview issues. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/element_animations_unittest.cc ('k') | cc/animation/layer_animation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/layer_animation_controller.h
diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h
index 73c7d7690ce4d6abf900af50a523ba2d8a4d2f6d..323a069371e4efbdbecfb64dbf35896c22d97882 100644
--- a/cc/animation/layer_animation_controller.h
+++ b/cc/animation/layer_animation_controller.h
@@ -101,8 +101,25 @@ class CC_EXPORT LayerAnimationController
void NotifyAnimationPropertyUpdate(const AnimationEvent& event);
void NotifyAnimationTakeover(const AnimationEvent& event);
- void AddValueObserver(LayerAnimationValueObserver* observer);
- void RemoveValueObserver(LayerAnimationValueObserver* observer);
+ void set_value_observer(LayerAnimationValueObserver* observer) {
+ value_observer_ = observer;
+ }
+
+ bool needs_active_value_observations() const {
+ return needs_active_value_observations_;
+ }
+ bool needs_pending_value_observations() const {
+ return needs_pending_value_observations_;
+ }
+
+ void set_needs_active_value_observations(
+ bool needs_active_value_observations) {
+ needs_active_value_observations_ = needs_active_value_observations;
+ }
+ void set_needs_pending_value_observations(
+ bool needs_pending_value_observations) {
+ needs_pending_value_observations_ = needs_pending_value_observations;
+ }
void AddEventObserver(LayerAnimationEventObserver* observer);
void RemoveEventObserver(LayerAnimationEventObserver* observer);
@@ -235,13 +252,14 @@ class CC_EXPORT LayerAnimationController
base::TimeTicks last_tick_time_;
- base::ObserverList<LayerAnimationValueObserver> value_observers_;
base::ObserverList<LayerAnimationEventObserver> event_observers_;
-
+ LayerAnimationValueObserver* value_observer_;
LayerAnimationValueProvider* value_provider_;
-
AnimationDelegate* layer_animation_delegate_;
+ bool needs_active_value_observations_;
+ bool needs_pending_value_observations_;
+
// Only try to start animations when new animations are added or when the
// previous attempt at starting animations failed to start all animations.
bool needs_to_start_animations_;
« no previous file with comments | « cc/animation/element_animations_unittest.cc ('k') | cc/animation/layer_animation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698