| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 105 } |
| 106 RefPtr<EventTarget> target; | 106 RefPtr<EventTarget> target; |
| 107 RefPtr<Event> event; | 107 RefPtr<Event> event; |
| 108 }; | 108 }; |
| 109 Vector<EventToDispatch> m_events; | 109 Vector<EventToDispatch> m_events; |
| 110 | 110 |
| 111 static const double s_minimumDelay; | 111 static const double s_minimumDelay; |
| 112 | 112 |
| 113 OwnPtr<PlatformTiming> m_timing; | 113 OwnPtr<PlatformTiming> m_timing; |
| 114 | 114 |
| 115 class DocumentTimelineTiming : public PlatformTiming { | 115 class DocumentTimelineTiming FINAL : public PlatformTiming { |
| 116 public: | 116 public: |
| 117 DocumentTimelineTiming(DocumentTimeline* documentTimeline) | 117 DocumentTimelineTiming(DocumentTimeline* documentTimeline) |
| 118 : m_timeline(documentTimeline) | 118 : m_timeline(documentTimeline) |
| 119 , m_timer(this, &DocumentTimelineTiming::timerFired) | 119 , m_timer(this, &DocumentTimelineTiming::timerFired) |
| 120 { | 120 { |
| 121 ASSERT(m_timeline); | 121 ASSERT(m_timeline); |
| 122 } | 122 } |
| 123 | 123 |
| 124 virtual void wakeAfter(double duration) OVERRIDE; | 124 virtual void wakeAfter(double duration) OVERRIDE; |
| 125 virtual void cancelWake() OVERRIDE; | 125 virtual void cancelWake() OVERRIDE; |
| 126 virtual void serviceOnNextFrame() OVERRIDE; | 126 virtual void serviceOnNextFrame() OVERRIDE; |
| 127 | 127 |
| 128 void timerFired(Timer<DocumentTimelineTiming>*) { m_timeline->wake(); } | 128 void timerFired(Timer<DocumentTimelineTiming>*) { m_timeline->wake(); } |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 DocumentTimeline* m_timeline; | 131 DocumentTimeline* m_timeline; |
| 132 Timer<DocumentTimelineTiming> m_timer; | 132 Timer<DocumentTimelineTiming> m_timer; |
| 133 | 133 |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 friend class AnimationDocumentTimelineTest; | 136 friend class AnimationDocumentTimelineTest; |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace | 139 } // namespace |
| 140 | 140 |
| 141 #endif | 141 #endif |
| OLD | NEW |