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 22 matching lines...) Expand all Loading... | |
33 #include "core/inspector/InspectorInstrumentation.h" | 33 #include "core/inspector/InspectorInstrumentation.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 class DOMWindowEventQueueTimer : public NoBaseWillBeGarbageCollectedFinalized<DO MWindowEventQueueTimer>, public SuspendableTimer { | 37 class DOMWindowEventQueueTimer : public NoBaseWillBeGarbageCollectedFinalized<DO MWindowEventQueueTimer>, public SuspendableTimer { |
38 WTF_MAKE_NONCOPYABLE(DOMWindowEventQueueTimer); | 38 WTF_MAKE_NONCOPYABLE(DOMWindowEventQueueTimer); |
39 public: | 39 public: |
40 DOMWindowEventQueueTimer(DOMWindowEventQueue* eventQueue, ExecutionContext* context) | 40 DOMWindowEventQueueTimer(DOMWindowEventQueue* eventQueue, ExecutionContext* context) |
41 : SuspendableTimer(context) | 41 : SuspendableTimer(context) |
42 , m_eventQueue(eventQueue) { } | 42 , m_eventQueue(eventQueue) { } |
43 void trace(Visitor* visitor) { visitor->trace(m_eventQueue); } | 43 virtual void trace(Visitor* visitor) |
Mads Ager (chromium)
2014/08/12 06:07:04
Separate the constructor and the trace method with
| |
44 { | |
45 visitor->trace(m_eventQueue); | |
46 SuspendableTimer::trace(visitor); | |
47 } | |
44 | 48 |
45 private: | 49 private: |
46 virtual void fired() { m_eventQueue->pendingEventTimerFired(); } | 50 virtual void fired() { m_eventQueue->pendingEventTimerFired(); } |
47 | 51 |
48 RawPtrWillBeMember<DOMWindowEventQueue> m_eventQueue; | 52 RawPtrWillBeMember<DOMWindowEventQueue> m_eventQueue; |
49 }; | 53 }; |
50 | 54 |
51 PassRefPtrWillBeRawPtr<DOMWindowEventQueue> DOMWindowEventQueue::create(Executio nContext* context) | 55 PassRefPtrWillBeRawPtr<DOMWindowEventQueue> DOMWindowEventQueue::create(Executio nContext* context) |
52 { | 56 { |
53 return adoptRefWillBeNoop(new DOMWindowEventQueue(context)); | 57 return adoptRefWillBeNoop(new DOMWindowEventQueue(context)); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 void DOMWindowEventQueue::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 148 void DOMWindowEventQueue::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) |
145 { | 149 { |
146 EventTarget* eventTarget = event->target(); | 150 EventTarget* eventTarget = event->target(); |
147 if (eventTarget->toDOMWindow()) | 151 if (eventTarget->toDOMWindow()) |
148 eventTarget->toDOMWindow()->dispatchEvent(event, nullptr); | 152 eventTarget->toDOMWindow()->dispatchEvent(event, nullptr); |
149 else | 153 else |
150 eventTarget->dispatchEvent(event); | 154 eventTarget->dispatchEvent(event); |
151 } | 155 } |
152 | 156 |
153 } | 157 } |
OLD | NEW |