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

Unified Diff: third_party/WebKit/Source/core/animation/AnimationTimeline.h

Issue 2944423003: Implement new AnimationTimeline superclass (Closed)
Patch Set: Rebase 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
Index: third_party/WebKit/Source/core/animation/AnimationTimeline.h
diff --git a/third_party/WebKit/Source/core/animation/AnimationTimeline.h b/third_party/WebKit/Source/core/animation/AnimationTimeline.h
index b370096436aa5b70643ea1f5dc4c456796aea3ac..5b5bf24b1e01c9656991b51299639a3c52511dec 100644
--- a/third_party/WebKit/Source/core/animation/AnimationTimeline.h
+++ b/third_party/WebKit/Source/core/animation/AnimationTimeline.h
@@ -33,8 +33,9 @@
#include <memory>
#include "core/CoreExport.h"
-#include "core/animation/Animation.h"
+#include "core/animation/AnimationEffectReadOnly.h"
#include "core/animation/EffectModel.h"
+#include "core/animation/SuperAnimationTimeline.h"
#include "core/dom/Element.h"
#include "core/dom/TaskRunnerHelper.h"
#include "platform/Timer.h"
@@ -46,14 +47,13 @@
namespace blink {
-class Document;
+class Animation;
class AnimationEffectReadOnly;
+class Document;
// AnimationTimeline is constructed and owned by Document, and tied to its
// lifecycle.
-class CORE_EXPORT AnimationTimeline
- : public GarbageCollectedFinalized<AnimationTimeline>,
- public ScriptWrappable {
+class CORE_EXPORT AnimationTimeline : public SuperAnimationTimeline {
DEFINE_WRAPPERTYPEINFO();
public:
@@ -70,6 +70,8 @@ class CORE_EXPORT AnimationTimeline
virtual ~AnimationTimeline() {}
+ bool IsAnimationTimeline() const final { return true; }
+
void ServiceAnimations(TimingUpdateReason);
void ScheduleNextService();
@@ -83,7 +85,7 @@ class CORE_EXPORT AnimationTimeline
return !animations_needing_update_.IsEmpty();
}
double ZeroTime();
- double currentTime(bool& is_null);
+ double currentTime(bool& is_null) override;
double currentTime();
double CurrentTimeInternal(bool& is_null);
double CurrentTimeInternal();
@@ -108,7 +110,7 @@ class CORE_EXPORT AnimationTimeline
void Wake();
void ResetForTesting();
- DECLARE_TRACE();
+ DECLARE_VIRTUAL_TRACE();
protected:
AnimationTimeline(Document*, PlatformTiming*);
@@ -159,6 +161,12 @@ class CORE_EXPORT AnimationTimeline
friend class AnimationAnimationTimelineTest;
};
+DEFINE_TYPE_CASTS(AnimationTimeline,
+ SuperAnimationTimeline,
+ timeline,
+ timeline->IsAnimationTimeline(),
+ timeline.IsAnimationTimeline());
+
} // namespace blink
#endif
« no previous file with comments | « third_party/WebKit/Source/core/animation/Animation.cpp ('k') | third_party/WebKit/Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698