| Index: Source/core/animation/TimedItem.h
|
| diff --git a/Source/core/animation/TimedItem.h b/Source/core/animation/TimedItem.h
|
| index 58ca31476bbc71563f7b0afd67016647bc1ee031..f2db3588be5adde8f952747380e4451af20524be 100644
|
| --- a/Source/core/animation/TimedItem.h
|
| +++ b/Source/core/animation/TimedItem.h
|
| @@ -32,6 +32,7 @@
|
| #define TimedItem_h
|
|
|
| #include "core/animation/Timing.h"
|
| +#include "wtf/PassOwnPtr.h"
|
| #include "wtf/RefCounted.h"
|
|
|
| namespace WebCore {
|
| @@ -48,6 +49,12 @@ static inline double nullValue()
|
| return std::numeric_limits<double>::quiet_NaN();
|
| }
|
|
|
| +class TimedItemEventDelegate {
|
| +public:
|
| + virtual ~TimedItemEventDelegate() { };
|
| + virtual void onEventCondition(bool wasInPlay, bool isInPlay, double previousIteration, double currentIteration) = 0;
|
| +};
|
| +
|
| class TimedItem : public RefCounted<TimedItem> {
|
| friend class Player; // Calls attach/detach, updateInheritedTime.
|
| public:
|
| @@ -72,7 +79,7 @@ public:
|
| };
|
|
|
| protected:
|
| - TimedItem(const Timing&);
|
| + TimedItem(const Timing&, PassOwnPtr<TimedItemEventDelegate>);
|
|
|
| // When TimedItem receives a new inherited time via updateInheritedTime
|
| // it will (if necessary) recalculate timings and (if necessary) call
|
| @@ -96,6 +103,7 @@ private:
|
| const double m_startTime;
|
| Player* m_player;
|
| Timing m_specified;
|
| + OwnPtr<TimedItemEventDelegate> m_eventDelegate;
|
|
|
| // FIXME: Should be versioned by monotonic value on player.
|
| mutable struct CalculatedTiming {
|
|
|