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

Unified Diff: cc/animation/layer_animation_controller.h

Issue 1893253002: CC Animation: Make LayerAnimationController to have just one event observer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rc
Patch Set: 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.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 323a069371e4efbdbecfb64dbf35896c22d97882..24f5bc8005d7716bb9d66ba0a30fbb94d921fb7c 100644
--- a/cc/animation/layer_animation_controller.h
+++ b/cc/animation/layer_animation_controller.h
@@ -11,7 +11,6 @@
#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/layer_animation_event_observer.h"
@@ -121,8 +120,7 @@ class CC_EXPORT LayerAnimationController
needs_pending_value_observations_ = needs_pending_value_observations;
}
- void AddEventObserver(LayerAnimationEventObserver* observer);
- void RemoveEventObserver(LayerAnimationEventObserver* observer);
+ void SetEventObserver(LayerAnimationEventObserver* observer);
void set_value_provider(LayerAnimationValueProvider* provider) {
value_provider_ = provider;
@@ -169,8 +167,7 @@ class CC_EXPORT LayerAnimationController
// Sets |max_scale| to the maximum scale along any dimension at any
// destination in active animations. Returns false if the maximum scale cannot
// be computed.
- bool MaximumTargetScale(ObserverType event_observers_,
- float* max_scale) const;
+ bool MaximumTargetScale(ObserverType observer_type, float* max_scale) const;
// When a scroll animation is removed on the main thread, its compositor
// thread counterpart continues producing scroll deltas until activation.
@@ -252,7 +249,7 @@ class CC_EXPORT LayerAnimationController
base::TimeTicks last_tick_time_;
- base::ObserverList<LayerAnimationEventObserver> event_observers_;
+ LayerAnimationEventObserver* event_observer_;
LayerAnimationValueObserver* value_observer_;
LayerAnimationValueProvider* value_provider_;
AnimationDelegate* layer_animation_delegate_;
« no previous file with comments | « cc/animation/element_animations.cc ('k') | cc/animation/layer_animation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698