summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/dom/EventQueue.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/EventQueue.h')
-rw-r--r--Source/WebCore/dom/EventQueue.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/Source/WebCore/dom/EventQueue.h b/Source/WebCore/dom/EventQueue.h
index 7f8d5fb..a589ed8 100644
--- a/Source/WebCore/dom/EventQueue.h
+++ b/Source/WebCore/dom/EventQueue.h
@@ -27,38 +27,51 @@
#ifndef EventQueue_h
#define EventQueue_h
-#include "Timer.h"
#include <wtf/HashSet.h>
#include <wtf/Noncopyable.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
class Event;
+class EventQueueTimer;
class Node;
+class ScriptExecutionContext;
class EventQueue {
WTF_MAKE_NONCOPYABLE(EventQueue);
+
public:
enum ScrollEventTargetType {
ScrollEventDocumentTarget,
ScrollEventElementTarget
};
- EventQueue();
+ static PassOwnPtr<EventQueue> create(ScriptExecutionContext* context)
+ {
+ return adoptPtr(new EventQueue(context));
+ }
+
+ ~EventQueue();
void enqueueEvent(PassRefPtr<Event>);
void enqueueScrollEvent(PassRefPtr<Node>, ScrollEventTargetType);
private:
- void pendingEventTimerFired(Timer<EventQueue>*);
+ explicit EventQueue(ScriptExecutionContext*);
+
+ void pendingEventTimerFired();
void dispatchEvent(PassRefPtr<Event>);
- Timer<EventQueue> m_pendingEventTimer;
+ OwnPtr<EventQueueTimer> m_pendingEventTimer;
Vector<RefPtr<Event> > m_queuedEvents;
HashSet<Node*> m_nodesWithQueuedScrollEvents;
+
+ friend class EventQueueTimer;
};
}