| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 virtual void cancelWake() = 0; | 56 virtual void cancelWake() = 0; |
| 57 virtual void serviceOnNextFrame() = 0; | 57 virtual void serviceOnNextFrame() = 0; |
| 58 virtual ~PlatformTiming() { } | 58 virtual ~PlatformTiming() { } |
| 59 | 59 |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 static PassRefPtr<DocumentTimeline> create(Document*, PassOwnPtr<PlatformTim
ing> = nullptr); | 62 static PassRefPtr<DocumentTimeline> create(Document*, PassOwnPtr<PlatformTim
ing> = nullptr); |
| 63 // Returns whether style recalc was triggered. | 63 // Returns whether style recalc was triggered. |
| 64 bool serviceAnimations(); | 64 bool serviceAnimations(); |
| 65 | 65 |
| 66 // Creates a player attached to this timeline, but without a start time. |
| 67 PassRefPtr<Player> createPlayer(TimedItem*); |
| 66 PassRefPtr<Player> play(TimedItem*); | 68 PassRefPtr<Player> play(TimedItem*); |
| 67 | 69 |
| 68 // Called from setReadyState() in Document.cpp to set m_zeroTime to | 70 // Called from setReadyState() in Document.cpp to set m_zeroTime to |
| 69 // performance.timing.domInteractive | 71 // performance.timing.domInteractive |
| 70 void setZeroTime(double); | 72 void setZeroTime(double); |
| 71 bool hasStarted() const { return !isNull(m_zeroTime); } | 73 bool hasStarted() const { return !isNull(m_zeroTime); } |
| 74 double zeroTime() const { return m_zeroTime; } |
| 72 double currentTime(); | 75 double currentTime(); |
| 73 void pauseAnimationsForTesting(double); | 76 void pauseAnimationsForTesting(double); |
| 74 size_t numberOfActiveAnimationsForTesting() const; | 77 size_t numberOfActiveAnimationsForTesting() const; |
| 75 | 78 |
| 76 void addEventToDispatch(EventTarget* target, PassRefPtr<Event> event) | 79 void addEventToDispatch(EventTarget* target, PassRefPtr<Event> event) |
| 77 { | 80 { |
| 78 m_events.append(EventToDispatch(target, event)); | 81 m_events.append(EventToDispatch(target, event)); |
| 79 } | 82 } |
| 80 | 83 |
| 81 void dispatchEvents(); | 84 void dispatchEvents(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 Timer<DocumentTimelineTiming> m_timer; | 129 Timer<DocumentTimelineTiming> m_timer; |
| 127 | 130 |
| 128 }; | 131 }; |
| 129 | 132 |
| 130 friend class CoreAnimationDocumentTimelineTest; | 133 friend class CoreAnimationDocumentTimelineTest; |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 } // namespace | 136 } // namespace |
| 134 | 137 |
| 135 #endif | 138 #endif |
| OLD | NEW |