X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Source%2FWebCore%2Freplay%2FEventLoopInput.h;h=1081ac09c8e949de2af7432e28b77ecbd3c0c745;hp=b4e3b70a0612e5316584005bccb985afef316a67;hb=2252541616c4d7172c6d10c54ab66e3a14328efd;hpb=adcd960b104115958f9b73202ee34d77c13bc79f diff --git a/Source/WebCore/replay/EventLoopInput.h b/Source/WebCore/replay/EventLoopInput.h index b4e3b70..1081ac0 100644 --- a/Source/WebCore/replay/EventLoopInput.h +++ b/Source/WebCore/replay/EventLoopInput.h @@ -33,26 +33,33 @@ #include #include +namespace JSC { +class InputCursor; +}; + namespace WebCore { class ReplayController; -class EventLoopInputBase : public NondeterministicInputBase { +// This is an RAII helper used during capturing which sets a flag on the input cursor +// to track the dynamic extent of a captured event loop input. This extent approximates +// the interval in which EventLoopInputDispatcher::dispatching() is true. +class EventLoopInputExtent { + WTF_MAKE_NONCOPYABLE(EventLoopInputExtent); public: - EventLoopInputBase() - : m_timestamp(monotonicallyIncreasingTime()) - { - } + EventLoopInputExtent(JSC::InputCursor&); + EventLoopInputExtent(JSC::InputCursor*); + ~EventLoopInputExtent(); +private: + JSC::InputCursor* m_cursor; +}; +class EventLoopInputBase : public NondeterministicInputBase { +public: virtual ~EventLoopInputBase() { } virtual InputQueue queue() const override final { return InputQueue::EventLoopInput; } virtual void dispatch(ReplayController&) = 0; - - double timestamp() const { return m_timestamp; } - void setTimestamp(double timestamp) { m_timestamp = timestamp; } -protected: - double m_timestamp; }; template