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 26 matching lines...) Expand all Loading... |
37 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 class AnimationTimeline; | 41 class AnimationTimeline; |
42 class ExceptionState; | 42 class ExceptionState; |
43 | 43 |
44 class AnimationPlayer FINAL : public RefCountedWillBeRefCountedGarbageCollected<
AnimationPlayer> | 44 class AnimationPlayer FINAL : public RefCountedWillBeRefCountedGarbageCollected<
AnimationPlayer> |
45 , public ActiveDOMObject | 45 , public ActiveDOMObject |
46 , public EventTargetWithInlineData { | 46 , public EventTargetWithInlineData { |
47 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<A
nimationPlayer>); | 47 REFCOUNTED_EVENT_TARGET(AnimationPlayer); |
| 48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AnimationPlayer); |
48 public: | 49 public: |
49 | 50 |
50 ~AnimationPlayer(); | 51 ~AnimationPlayer(); |
51 static PassRefPtrWillBeRawPtr<AnimationPlayer> create(ExecutionContext*, Ani
mationTimeline&, AnimationNode*); | 52 static PassRefPtrWillBeRawPtr<AnimationPlayer> create(ExecutionContext*, Ani
mationTimeline&, AnimationNode*); |
52 | 53 |
53 // Returns whether the player is finished. | 54 // Returns whether the player is finished. |
54 bool update(TimingUpdateReason); | 55 bool update(TimingUpdateReason); |
55 | 56 |
56 // timeToEffectChange returns: | 57 // timeToEffectChange returns: |
57 // infinity - if this player is no longer in effect | 58 // infinity - if this player is no longer in effect |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 } | 147 } |
147 | 148 |
148 #if !ENABLE(OILPAN) | 149 #if !ENABLE(OILPAN) |
149 // Checks if the AnimationStack is the last reference holder to the Player. | 150 // Checks if the AnimationStack is the last reference holder to the Player. |
150 // This won't be needed when AnimationPlayer is moved to Oilpan. | 151 // This won't be needed when AnimationPlayer is moved to Oilpan. |
151 bool canFree() const; | 152 bool canFree() const; |
152 #endif | 153 #endif |
153 | 154 |
154 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) OVERRIDE; | 155 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) OVERRIDE; |
155 | 156 |
156 void trace(Visitor*); | 157 virtual void trace(Visitor*) OVERRIDE; |
157 | 158 |
158 private: | 159 private: |
159 AnimationPlayer(ExecutionContext*, AnimationTimeline&, AnimationNode*); | 160 AnimationPlayer(ExecutionContext*, AnimationTimeline&, AnimationNode*); |
160 double sourceEnd() const; | 161 double sourceEnd() const; |
161 bool limited(double currentTime) const; | 162 bool limited(double currentTime) const; |
162 double currentTimeWithoutLag() const; | 163 double currentTimeWithoutLag() const; |
163 double currentTimeWithLag() const; | 164 double currentTimeWithLag() const; |
164 void updateTimingState(double newCurrentTime); | 165 void updateTimingState(double newCurrentTime); |
165 void updateCurrentTimingState(); | 166 void updateCurrentTimingState(); |
166 | 167 |
(...skipping 18 matching lines...) Expand all Loading... |
185 bool m_finished; | 186 bool m_finished; |
186 // Holds a 'finished' event queued for asynchronous dispatch via the | 187 // Holds a 'finished' event queued for asynchronous dispatch via the |
187 // ScriptedAnimationController. This object remains active until the | 188 // ScriptedAnimationController. This object remains active until the |
188 // event is actually dispatched. | 189 // event is actually dispatched. |
189 RefPtrWillBeMember<Event> m_pendingFinishedEvent; | 190 RefPtrWillBeMember<Event> m_pendingFinishedEvent; |
190 }; | 191 }; |
191 | 192 |
192 } // namespace | 193 } // namespace |
193 | 194 |
194 #endif | 195 #endif |
OLD | NEW |