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

Unified Diff: cc/animation/element_animations.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_player.cc ('k') | cc/animation/element_animations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/element_animations.h
diff --git a/cc/animation/element_animations.h b/cc/animation/element_animations.h
index 81ce7aff03d267e20a7eee21a1908d846d8e6b3a..eba818a074e9b0945d5c903dbff2af74a5255b31 100644
--- a/cc/animation/element_animations.h
+++ b/cc/animation/element_animations.h
@@ -12,10 +12,10 @@
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "cc/animation/animation_export.h"
+#include "cc/animation/animation_observer.h"
#include "cc/trees/element_id.h"
#include "cc/trees/property_animation_state.h"
#include "cc/trees/target_property.h"
-#include "ui/gfx/geometry/scroll_offset.h"
#include "ui/gfx/transform.h"
namespace gfx {
@@ -37,7 +37,8 @@ enum class UpdateTickingType { NORMAL, FORCE };
// This is a CC counterpart for blink::ElementAnimations (in 1:1 relationship).
// No pointer to/from respective blink::ElementAnimations object for now.
class CC_ANIMATION_EXPORT ElementAnimations
- : public base::RefCounted<ElementAnimations> {
+ : public base::RefCounted<ElementAnimations>,
+ public AnimationObserver {
public:
static scoped_refptr<ElementAnimations> Create();
@@ -145,25 +146,28 @@ class CC_ANIMATION_EXPORT ElementAnimations
void UpdateClientAnimationState();
void SetNeedsUpdateImplClientState();
+ // AnimationObserver
void NotifyClientOpacityAnimated(float opacity,
bool notify_active_elements,
- bool notify_pending_elements);
- void NotifyClientTransformAnimated(const gfx::Transform& transform,
- bool notify_active_elements,
- bool notify_pending_elements);
+ bool notify_pending_elements) override;
+ void NotifyClientTransformOperationsAnimated(
+ const TransformOperations& operations,
+ bool notify_active_elements,
+ bool notify_pending_elements) override;
void NotifyClientFilterAnimated(const FilterOperations& filter,
bool notify_active_elements,
- bool notify_pending_elements);
+ bool notify_pending_elements) override;
void NotifyClientScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset,
bool notify_active_elements,
- bool notify_pending_elements);
+ bool notify_pending_elements) override;
+
gfx::ScrollOffset ScrollOffsetForAnimation() const;
private:
friend class base::RefCounted<ElementAnimations>;
ElementAnimations();
- ~ElementAnimations();
+ ~ElementAnimations() override;
void OnFilterAnimated(ElementListType list_type,
const FilterOperations& filters);
« no previous file with comments | « cc/animation/animation_player.cc ('k') | cc/animation/element_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698