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

Unified Diff: cc/animation/animation_host.h

Issue 1877073006: CC Animation: Make AnimationRegistrar a private member of AnimationHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « no previous file | cc/animation/animation_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_host.h
diff --git a/cc/animation/animation_host.h b/cc/animation/animation_host.h
index ac7abaf1c31c787432bd6120b0f2951362cc7245..5cd6b8f7e100f302988e119ab399b6f601ff6949 100644
--- a/cc/animation/animation_host.h
+++ b/cc/animation/animation_host.h
@@ -77,10 +77,6 @@ class CC_EXPORT AnimationHost {
void PushPropertiesTo(AnimationHost* host_impl);
- AnimationRegistrar* animation_registrar() const {
- return animation_registrar_.get();
- }
-
void SetSupportsScrollAnimations(bool supports_scroll_animations);
bool SupportsScrollAnimations() const;
bool NeedsAnimateLayers() const;
@@ -151,6 +147,26 @@ class CC_EXPORT AnimationHost {
void ScrollAnimationAbort(bool needs_completion);
+ // If an animation has been registered for the given id, return it. Otherwise
+ // creates a new one and returns a scoped_refptr to it.
+ scoped_refptr<LayerAnimationController> GetAnimationControllerForId(int id);
+
+ void SetAnimationRegistrarFor(
+ scoped_refptr<LayerAnimationController> controller);
+ void ResetAnimationRegistrarFor(
+ scoped_refptr<LayerAnimationController> controller);
+
+ // Registers the given controller as alive.
+ void RegisterAnimationController(LayerAnimationController* controller);
+ // Unregisters the given controller as alive.
+ void UnregisterAnimationController(LayerAnimationController* controller);
+
+ using AnimationControllerMap =
+ std::unordered_map<int, LayerAnimationController*>;
+ const AnimationControllerMap& active_animation_controllers_for_testing()
+ const;
+ const AnimationControllerMap& all_animation_controllers_for_testing() const;
+
private:
explicit AnimationHost(ThreadInstance thread_instance);
« no previous file with comments | « no previous file | cc/animation/animation_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698