| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/animation/AnimationSource.h" | 34 #include "core/animation/AnimationSource.h" |
| 35 #include "core/events/EventTarget.h" | 35 #include "core/events/EventTarget.h" |
| 36 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 class AnimationTimeline; | 40 class AnimationTimeline; |
| 41 class ExceptionState; | 41 class ExceptionState; |
| 42 | 42 |
| 43 class AnimationPlayer FINAL : public RefCountedWillBeRefCountedGarbageCollected<
AnimationPlayer>, public EventTargetWithInlineData { | 43 class AnimationPlayer FINAL : public RefCountedWillBeRefCountedGarbageCollected<
AnimationPlayer>, public EventTargetWithInlineData { |
| 44 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<A
nimationPlayer>); | 44 REFCOUNTED_EVENT_TARGET(AnimationPlayer); |
| 45 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AnimationPlayer); |
| 45 public: | 46 public: |
| 46 | 47 |
| 47 ~AnimationPlayer(); | 48 ~AnimationPlayer(); |
| 48 static PassRefPtrWillBeRawPtr<AnimationPlayer> create(AnimationTimeline&, An
imationSource*); | 49 static PassRefPtrWillBeRawPtr<AnimationPlayer> create(AnimationTimeline&, An
imationSource*); |
| 49 | 50 |
| 50 // Returns whether the player is finished. | 51 // Returns whether the player is finished. |
| 51 bool update(TimingUpdateReason); | 52 bool update(TimingUpdateReason); |
| 52 | 53 |
| 53 // timeToEffectChange returns: | 54 // timeToEffectChange returns: |
| 54 // infinity - if this player is no longer in effect | 55 // infinity - if this player is no longer in effect |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 141 } |
| 141 | 142 |
| 142 #if !ENABLE(OILPAN) | 143 #if !ENABLE(OILPAN) |
| 143 // Checks if the AnimationStack is the last reference holder to the Player. | 144 // Checks if the AnimationStack is the last reference holder to the Player. |
| 144 // This won't be needed when AnimationPlayer is moved to Oilpan. | 145 // This won't be needed when AnimationPlayer is moved to Oilpan. |
| 145 bool canFree() const; | 146 bool canFree() const; |
| 146 #endif | 147 #endif |
| 147 | 148 |
| 148 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) OVERRIDE; | 149 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) OVERRIDE; |
| 149 | 150 |
| 150 void trace(Visitor*); | 151 virtual void trace(Visitor*) OVERRIDE; |
| 151 | 152 |
| 152 private: | 153 private: |
| 153 AnimationPlayer(AnimationTimeline&, AnimationSource*); | 154 AnimationPlayer(AnimationTimeline&, AnimationSource*); |
| 154 double sourceEnd() const; | 155 double sourceEnd() const; |
| 155 bool limited(double currentTime) const; | 156 bool limited(double currentTime) const; |
| 156 double currentTimeWithoutLag() const; | 157 double currentTimeWithoutLag() const; |
| 157 double currentTimeWithLag() const; | 158 double currentTimeWithLag() const; |
| 158 void updateTimingState(double newCurrentTime); | 159 void updateTimingState(double newCurrentTime); |
| 159 void updateCurrentTimingState(); | 160 void updateCurrentTimingState(); |
| 160 | 161 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 175 // This indicates timing information relevant to the player has changed by | 176 // This indicates timing information relevant to the player has changed by |
| 176 // means other than the ordinary progression of time | 177 // means other than the ordinary progression of time |
| 177 bool m_outdated; | 178 bool m_outdated; |
| 178 | 179 |
| 179 bool m_finished; | 180 bool m_finished; |
| 180 }; | 181 }; |
| 181 | 182 |
| 182 } // namespace | 183 } // namespace |
| 183 | 184 |
| 184 #endif | 185 #endif |
| OLD | NEW |