OLD | NEW |
---|---|
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 13 matching lines...) Expand all Loading... | |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef DocumentTimeline_h | 31 #ifndef DocumentTimeline_h |
32 #define DocumentTimeline_h | 32 #define DocumentTimeline_h |
33 | 33 |
34 #include "core/animation/AnimationStack.h" | |
34 #include "core/animation/Player.h" | 35 #include "core/animation/Player.h" |
35 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
36 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
37 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
38 | 39 |
39 namespace WebCore { | 40 namespace WebCore { |
40 | 41 |
41 class Document; | 42 class Document; |
42 class TimedItem; | 43 class TimedItem; |
43 | 44 |
44 // DocumentTimeline is constructed and owned by Document, and tied to its lifecy cle. | 45 // DocumentTimeline is constructed and owned by Document, and tied to its lifecy cle. |
45 class DocumentTimeline : public RefCounted<DocumentTimeline> { | 46 class DocumentTimeline : public RefCounted<DocumentTimeline> { |
46 | 47 |
47 public: | 48 public: |
48 static PassRefPtr<DocumentTimeline> create(Document*); | 49 static PassRefPtr<DocumentTimeline> create(Document*); |
49 void serviceAnimations(double); | 50 void serviceAnimations(double); |
50 PassRefPtr<Player> play(TimedItem*); | 51 PassRefPtr<Player> play(TimedItem*); |
51 double currentTime() { return m_currentTime; } | 52 double currentTime() { return m_currentTime; } |
52 void pauseAnimationsForTesting(double); | 53 void pauseAnimationsForTesting(double); |
54 AnimationStack& animationStack() { return m_active; } | |
53 | 55 |
54 private: | 56 private: |
55 DocumentTimeline(Document*); | 57 DocumentTimeline(Document*); |
56 double m_currentTime; | 58 double m_currentTime; |
57 Document* m_document; | 59 Document* m_document; |
60 AnimationStack m_active; | |
esprehn
2013/07/17 06:48:01
m_animationStack, m_active is not very descriptive
dstockwell
2013/07/17 13:10:19
Done.
| |
58 Vector<RefPtr<Player> > m_players; | 61 Vector<RefPtr<Player> > m_players; |
59 }; | 62 }; |
60 | 63 |
61 } // namespace | 64 } // namespace |
62 | 65 |
63 #endif | 66 #endif |
OLD | NEW |