| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 public: | 68 public: |
| 69 enum AnimationPlayState { | 69 enum AnimationPlayState { |
| 70 kUnset, | 70 kUnset, |
| 71 kIdle, | 71 kIdle, |
| 72 kPending, | 72 kPending, |
| 73 kRunning, | 73 kRunning, |
| 74 kPaused, | 74 kPaused, |
| 75 kFinished | 75 kFinished |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 static Animation* Create(AnimationEffectReadOnly*, SuperAnimationTimeline*); | 78 static Animation* Create(AnimationEffectReadOnly*, AnimationTimeline*); |
| 79 | 79 |
| 80 // Web Animations API IDL constructors. | 80 // Web Animations API IDL constructors. |
| 81 static Animation* Create(ExecutionContext*, | 81 static Animation* Create(ExecutionContext*, |
| 82 AnimationEffectReadOnly*, | 82 AnimationEffectReadOnly*, |
| 83 ExceptionState&); | 83 ExceptionState&); |
| 84 static Animation* Create(ExecutionContext*, | 84 static Animation* Create(ExecutionContext*, |
| 85 AnimationEffectReadOnly*, | 85 AnimationEffectReadOnly*, |
| 86 SuperAnimationTimeline*, | 86 AnimationTimeline*, |
| 87 ExceptionState&); | 87 ExceptionState&); |
| 88 | 88 |
| 89 ~Animation(); | 89 ~Animation(); |
| 90 void Dispose(); | 90 void Dispose(); |
| 91 | 91 |
| 92 // Returns whether the animation is finished. | 92 // Returns whether the animation is finished. |
| 93 bool Update(TimingUpdateReason); | 93 bool Update(TimingUpdateReason); |
| 94 | 94 |
| 95 // timeToEffectChange returns: | 95 // timeToEffectChange returns: |
| 96 // infinity - if this animation is no longer in effect | 96 // infinity - if this animation is no longer in effect |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 DEFINE_ATTRIBUTE_EVENT_LISTENER(finish); | 132 DEFINE_ATTRIBUTE_EVENT_LISTENER(finish); |
| 133 DEFINE_ATTRIBUTE_EVENT_LISTENER(cancel); | 133 DEFINE_ATTRIBUTE_EVENT_LISTENER(cancel); |
| 134 | 134 |
| 135 const AtomicString& InterfaceName() const override; | 135 const AtomicString& InterfaceName() const override; |
| 136 ExecutionContext* GetExecutionContext() const override; | 136 ExecutionContext* GetExecutionContext() const override; |
| 137 bool HasPendingActivity() const final; | 137 bool HasPendingActivity() const final; |
| 138 void ContextDestroyed(ExecutionContext*) override; | 138 void ContextDestroyed(ExecutionContext*) override; |
| 139 | 139 |
| 140 double playbackRate() const; | 140 double playbackRate() const; |
| 141 void setPlaybackRate(double); | 141 void setPlaybackRate(double); |
| 142 SuperAnimationTimeline* timeline() { | 142 AnimationTimeline* timeline() { |
| 143 return static_cast<SuperAnimationTimeline*>(timeline_); | 143 return static_cast<AnimationTimeline*>(timeline_); |
| 144 } | 144 } |
| 145 const DocumentTimeline* TimelineInternal() const { return timeline_; } | 145 const DocumentTimeline* TimelineInternal() const { return timeline_; } |
| 146 DocumentTimeline* TimelineInternal() { return timeline_; } | 146 DocumentTimeline* TimelineInternal() { return timeline_; } |
| 147 | 147 |
| 148 double CalculateStartTime(double current_time) const; | 148 double CalculateStartTime(double current_time) const; |
| 149 bool HasStartTime() const { return !IsNull(start_time_); } | 149 bool HasStartTime() const { return !IsNull(start_time_); } |
| 150 double startTime(bool& is_null) const; | 150 double startTime(bool& is_null) const; |
| 151 double startTime() const; | 151 double startTime() const; |
| 152 double StartTimeInternal() const { return start_time_; } | 152 double StartTimeInternal() const { return start_time_; } |
| 153 void setStartTime(double, bool is_null); | 153 void setStartTime(double, bool is_null); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 370 |
| 371 bool effect_suppressed_; | 371 bool effect_suppressed_; |
| 372 | 372 |
| 373 FRIEND_TEST_ALL_PREFIXES(AnimationAnimationTest, | 373 FRIEND_TEST_ALL_PREFIXES(AnimationAnimationTest, |
| 374 NoCompositeWithoutCompositedElementId); | 374 NoCompositeWithoutCompositedElementId); |
| 375 }; | 375 }; |
| 376 | 376 |
| 377 } // namespace blink | 377 } // namespace blink |
| 378 | 378 |
| 379 #endif // Animation_h | 379 #endif // Animation_h |
| OLD | NEW |