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

Side by Side Diff: Source/core/animation/AnimationTimeline.h

Issue 293893003: Web Animations: Rename TimedItem to AnimationSource (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update expectations. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/AnimationTest.cpp ('k') | Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 #include "core/events/Event.h" 37 #include "core/events/Event.h"
38 #include "platform/Timer.h" 38 #include "platform/Timer.h"
39 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
40 #include "wtf/RefCounted.h" 40 #include "wtf/RefCounted.h"
41 #include "wtf/RefPtr.h" 41 #include "wtf/RefPtr.h"
42 #include "wtf/Vector.h" 42 #include "wtf/Vector.h"
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 class Document; 46 class Document;
47 class TimedItem; 47 class AnimationSource;
48 48
49 // AnimationTimeline is constructed and owned by Document, and tied to its lifec ycle. 49 // AnimationTimeline is constructed and owned by Document, and tied to its lifec ycle.
50 class AnimationTimeline : public RefCountedWillBeGarbageCollectedFinalized<Anima tionTimeline> { 50 class AnimationTimeline : public RefCountedWillBeGarbageCollectedFinalized<Anima tionTimeline> {
51 public: 51 public:
52 class PlatformTiming : public NoBaseWillBeGarbageCollectedFinalized<Platform Timing> { 52 class PlatformTiming : public NoBaseWillBeGarbageCollectedFinalized<Platform Timing> {
53 53
54 public: 54 public:
55 // Calls AnimationTimeline's wake() method after duration seconds. 55 // Calls AnimationTimeline's wake() method after duration seconds.
56 virtual void wakeAfter(double duration) = 0; 56 virtual void wakeAfter(double duration) = 0;
57 virtual void cancelWake() = 0; 57 virtual void cancelWake() = 0;
58 virtual void serviceOnNextFrame() = 0; 58 virtual void serviceOnNextFrame() = 0;
59 virtual ~PlatformTiming() { } 59 virtual ~PlatformTiming() { }
60 virtual void trace(Visitor*) { } 60 virtual void trace(Visitor*) { }
61 }; 61 };
62 62
63 static PassRefPtrWillBeRawPtr<AnimationTimeline> create(Document*, PassOwnPt rWillBeRawPtr<PlatformTiming> = nullptr); 63 static PassRefPtrWillBeRawPtr<AnimationTimeline> create(Document*, PassOwnPt rWillBeRawPtr<PlatformTiming> = nullptr);
64 ~AnimationTimeline(); 64 ~AnimationTimeline();
65 65
66 void serviceAnimations(TimingUpdateReason); 66 void serviceAnimations(TimingUpdateReason);
67 67
68 // Creates a player attached to this timeline, but without a start time. 68 // Creates a player attached to this timeline, but without a start time.
69 AnimationPlayer* createAnimationPlayer(TimedItem*); 69 AnimationPlayer* createAnimationPlayer(AnimationSource*);
70 AnimationPlayer* play(TimedItem*); 70 AnimationPlayer* play(AnimationSource*);
71 71
72 #if !ENABLE(OILPAN) 72 #if !ENABLE(OILPAN)
73 void playerDestroyed(AnimationPlayer* player) 73 void playerDestroyed(AnimationPlayer* player)
74 { 74 {
75 ASSERT(m_players.contains(player)); 75 ASSERT(m_players.contains(player));
76 m_players.remove(player); 76 m_players.remove(player);
77 } 77 }
78 #endif 78 #endif
79 79
80 bool hasPendingUpdates() const { return !m_playersNeedingUpdate.isEmpty(); } 80 bool hasPendingUpdates() const { return !m_playersNeedingUpdate.isEmpty(); }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 RawPtrWillBeMember<AnimationTimeline> m_timeline; 134 RawPtrWillBeMember<AnimationTimeline> m_timeline;
135 Timer<AnimationTimelineTiming> m_timer; 135 Timer<AnimationTimelineTiming> m_timer;
136 }; 136 };
137 137
138 friend class AnimationAnimationTimelineTest; 138 friend class AnimationAnimationTimelineTest;
139 }; 139 };
140 140
141 } // namespace 141 } // namespace
142 142
143 #endif 143 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationTest.cpp ('k') | Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698