| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #include "platform/wtf/RefPtr.h" | 49 #include "platform/wtf/RefPtr.h" |
| 50 | 50 |
| 51 namespace blink { | 51 namespace blink { |
| 52 | 52 |
| 53 class AnimationTimeline; | 53 class AnimationTimeline; |
| 54 class CompositorAnimationPlayer; | 54 class CompositorAnimationPlayer; |
| 55 class Element; | 55 class Element; |
| 56 class ExceptionState; | 56 class ExceptionState; |
| 57 class TreeScope; | 57 class TreeScope; |
| 58 | 58 |
| 59 class CORE_EXPORT Animation final : public EventTargetWithInlineData, | 59 class CORE_EXPORT Animation : public EventTargetWithInlineData, |
| 60 public ActiveScriptWrappable<Animation>, | 60 public ActiveScriptWrappable<Animation>, |
| 61 public ContextLifecycleObserver, | 61 public ContextLifecycleObserver, |
| 62 public CompositorAnimationDelegate, | 62 public CompositorAnimationDelegate, |
| 63 public CompositorAnimationPlayerClient { | 63 public CompositorAnimationPlayerClient { |
| 64 DEFINE_WRAPPERTYPEINFO(); | 64 DEFINE_WRAPPERTYPEINFO(); |
| 65 USING_GARBAGE_COLLECTED_MIXIN(Animation); | 65 USING_GARBAGE_COLLECTED_MIXIN(Animation); |
| 66 | 66 |
| 67 public: | 67 public: |
| 68 enum AnimationPlayState { | 68 enum AnimationPlayState { |
| 69 kUnset, | 69 kUnset, |
| 70 kIdle, | 70 kIdle, |
| 71 kPending, | 71 kPending, |
| 72 kRunning, | 72 kRunning, |
| 73 kPaused, | 73 kPaused, |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool EffectSuppressed() const { return effect_suppressed_; } | 195 bool EffectSuppressed() const { return effect_suppressed_; } |
| 196 void SetEffectSuppressed(bool); | 196 void SetEffectSuppressed(bool); |
| 197 | 197 |
| 198 void InvalidateKeyframeEffect(const TreeScope&); | 198 void InvalidateKeyframeEffect(const TreeScope&); |
| 199 | 199 |
| 200 DECLARE_VIRTUAL_TRACE(); | 200 DECLARE_VIRTUAL_TRACE(); |
| 201 | 201 |
| 202 protected: | 202 protected: |
| 203 Animation(ExecutionContext*, AnimationTimeline&, AnimationEffectReadOnly*); |
| 204 |
| 203 DispatchEventResult DispatchEventInternal(Event*) override; | 205 DispatchEventResult DispatchEventInternal(Event*) override; |
| 204 void AddedEventListener(const AtomicString& event_type, | 206 void AddedEventListener(const AtomicString& event_type, |
| 205 RegisteredEventListener&) override; | 207 RegisteredEventListener&) override; |
| 206 | 208 |
| 207 private: | 209 private: |
| 208 Animation(ExecutionContext*, AnimationTimeline&, AnimationEffectReadOnly*); | |
| 209 | |
| 210 void ClearOutdated(); | 210 void ClearOutdated(); |
| 211 void ForceServiceOnNextFrame(); | 211 void ForceServiceOnNextFrame(); |
| 212 | 212 |
| 213 double EffectEnd() const; | 213 double EffectEnd() const; |
| 214 bool Limited(double current_time) const; | 214 bool Limited(double current_time) const; |
| 215 | 215 |
| 216 AnimationPlayState CalculatePlayState(); | 216 AnimationPlayState CalculatePlayState(); |
| 217 double CalculateCurrentTime() const; | 217 double CalculateCurrentTime() const; |
| 218 | 218 |
| 219 void UnpauseInternal(); | 219 void UnpauseInternal(); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 353 |
| 354 bool current_time_pending_; | 354 bool current_time_pending_; |
| 355 bool state_is_being_updated_; | 355 bool state_is_being_updated_; |
| 356 | 356 |
| 357 bool effect_suppressed_; | 357 bool effect_suppressed_; |
| 358 }; | 358 }; |
| 359 | 359 |
| 360 } // namespace blink | 360 } // namespace blink |
| 361 | 361 |
| 362 #endif // Animation_h | 362 #endif // Animation_h |
| OLD | NEW |