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

Unified Diff: third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h

Issue 2338803003: Blink Compositor Animation: CompositorPlayer::addAnimation to use unique_ptr. (Closed)
Patch Set: Created 4 years, 3 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
Index: third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h
diff --git a/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h b/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h
index 399e63aa656ed70c3eed94a601aef386a023e856..b9ca0e8171ef1bd7f237e70d5021e2ab0a934bfc 100644
--- a/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h
+++ b/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h
@@ -6,8 +6,6 @@
#define CompositorAnimationPlayer_h
#include "base/memory/ref_counted.h"
-#include "cc/animation/animation.h"
-#include "cc/animation/animation_curve.h"
#include "cc/animation/animation_delegate.h"
#include "cc/animation/animation_player.h"
#include "platform/PlatformExport.h"
@@ -16,11 +14,14 @@
#include "wtf/PtrUtil.h"
#include <memory>
+namespace cc {
+class AnimationCurve;
+}
+
namespace blink {
class CompositorAnimation;
class CompositorAnimationDelegate;
-class WebLayer;
// A compositor representation for AnimationPlayer.
class PLATFORM_EXPORT CompositorAnimationPlayer : public cc::AnimationDelegate {
@@ -33,7 +34,7 @@ public:
~CompositorAnimationPlayer();
- cc::AnimationPlayer* animationPlayer() const;
+ cc::AnimationPlayer* ccAnimationPlayer() const;
// An animation delegate is notified when animations are started and
// stopped. The CompositorAnimationPlayer does not take ownership of the delegate, and it is
@@ -45,10 +46,10 @@ public:
void detachElement();
bool isElementAttached() const;
- void addAnimation(CompositorAnimation*);
- void removeAnimation(uint64_t animationId);
- void pauseAnimation(uint64_t animationId, double timeOffset);
- void abortAnimation(uint64_t animationId);
+ void addAnimation(std::unique_ptr<CompositorAnimation>);
+ void removeAnimation(int animationId);
+ void pauseAnimation(int animationId, double timeOffset);
+ void abortAnimation(int animationId);
private:
CompositorAnimationPlayer();

Powered by Google App Engine
This is Rietveld 408576698