| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/events/DOMWindowEventQueue.h" | 28 #include "core/events/DOMWindowEventQueue.h" |
| 29 | 29 |
| 30 #include "core/events/Event.h" | 30 #include "core/events/Event.h" |
| 31 #include "core/frame/LocalDOMWindow.h" | 31 #include "core/frame/LocalDOMWindow.h" |
| 32 #include "core/frame/SuspendableTimer.h" | 32 #include "core/frame/SuspendableTimer.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class DOMWindowEventQueueTimer : public DummyBase<DOMWindowEventQueueTimer>, pub
lic SuspendableTimer { | 36 class DOMWindowEventQueueTimer : public SuspendableTimer { |
| 37 WTF_MAKE_NONCOPYABLE(DOMWindowEventQueueTimer); | 37 WTF_MAKE_NONCOPYABLE(DOMWindowEventQueueTimer); |
| 38 public: | 38 public: |
| 39 DOMWindowEventQueueTimer(DOMWindowEventQueue* eventQueue, ExecutionContext*
context) | 39 DOMWindowEventQueueTimer(DOMWindowEventQueue* eventQueue, ExecutionContext*
context) |
| 40 : SuspendableTimer(context) | 40 : SuspendableTimer(context) |
| 41 , m_eventQueue(eventQueue) { } | 41 , m_eventQueue(eventQueue) { } |
| 42 void trace(Visitor* visitor) { visitor->trace(m_eventQueue); } | 42 void trace(Visitor* visitor) { visitor->trace(m_eventQueue); } |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 virtual void fired() { m_eventQueue->pendingEventTimerFired(); } | 45 virtual void fired() { m_eventQueue->pendingEventTimerFired(); } |
| 46 | 46 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 void DOMWindowEventQueue::dispatchEvent(PassRefPtr<Event> event) | 132 void DOMWindowEventQueue::dispatchEvent(PassRefPtr<Event> event) |
| 133 { | 133 { |
| 134 EventTarget* eventTarget = event->target(); | 134 EventTarget* eventTarget = event->target(); |
| 135 if (eventTarget->toDOMWindow()) | 135 if (eventTarget->toDOMWindow()) |
| 136 eventTarget->toDOMWindow()->dispatchEvent(event, nullptr); | 136 eventTarget->toDOMWindow()->dispatchEvent(event, nullptr); |
| 137 else | 137 else |
| 138 eventTarget->dispatchEvent(event); | 138 eventTarget->dispatchEvent(event); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } | 141 } |
| OLD | NEW |