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

Side by Side Diff: cc/animation/element_animations.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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/animation/element_animations.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_ANIMATION_ELEMENT_ANIMATIONS_H_ 5 #ifndef CC_ANIMATION_ELEMENT_ANIMATIONS_H_
6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_ 6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/containers/linked_list.h" 10 #include "base/containers/linked_list.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 void AbortAnimations(TargetProperty::Type target_property, 83 void AbortAnimations(TargetProperty::Type target_property,
84 bool needs_completion = false); 84 bool needs_completion = false);
85 85
86 // Returns the active animation animating the given property that is either 86 // Returns the active animation animating the given property that is either
87 // running, or is next to run, if such an animation exists. 87 // running, or is next to run, if such an animation exists.
88 Animation* GetAnimation(TargetProperty::Type target_property) const; 88 Animation* GetAnimation(TargetProperty::Type target_property) const;
89 89
90 // Returns the active animation for the given unique animation id. 90 // Returns the active animation for the given unique animation id.
91 Animation* GetAnimationById(int animation_id) const; 91 Animation* GetAnimationById(int animation_id) const;
92 92
93 void AddEventObserver(LayerAnimationEventObserver* observer); 93 void SetEventObserver(LayerAnimationEventObserver* observer);
94 void RemoveEventObserver(LayerAnimationEventObserver* observer);
95 94
96 private: 95 private:
97 friend class base::RefCounted<ElementAnimations>; 96 friend class base::RefCounted<ElementAnimations>;
98 97
99 // TODO(loyso): Erase this when LAC merged into ElementAnimations. 98 // TODO(loyso): Erase this when LAC merged into ElementAnimations.
100 friend class AnimationHost; 99 friend class AnimationHost;
101 100
102 explicit ElementAnimations(AnimationHost* host); 101 explicit ElementAnimations(AnimationHost* host);
103 ~ElementAnimations() override; 102 ~ElementAnimations() override;
104 103
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // LAC is owned by ElementAnimations (1:1 relationship). 142 // LAC is owned by ElementAnimations (1:1 relationship).
144 scoped_refptr<LayerAnimationController> layer_animation_controller_; 143 scoped_refptr<LayerAnimationController> layer_animation_controller_;
145 AnimationHost* animation_host_; 144 AnimationHost* animation_host_;
146 145
147 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); 146 DISALLOW_COPY_AND_ASSIGN(ElementAnimations);
148 }; 147 };
149 148
150 } // namespace cc 149 } // namespace cc
151 150
152 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ 151 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_
OLDNEW
« no previous file with comments | « no previous file | cc/animation/element_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698