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 "wtf/OwnPtr.h" | 33 #include "wtf/OwnPtr.h" |
34 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
35 | 35 |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 class Event; | 38 class Event; |
39 class DOMWindowEventQueueTimer; | 39 class DOMWindowEventQueueTimer; |
40 class Node; | 40 class Node; |
41 class ExecutionContext; | 41 class ExecutionContext; |
42 | 42 |
43 class DOMWindowEventQueue FINAL : public RefCounted<DOMWindowEventQueue>, public
EventQueue { | 43 #if ENABLE(OILPAN) |
| 44 #define DOMWINDOWEVENTQUEUE_BASE_CLASSES public EventQueue |
| 45 #else |
| 46 #define DOMWINDOWEVENTQUEUE_BASE_CLASSES public RefCounted<DOMWindowEventQueue>,
public EventQueue |
| 47 #endif |
| 48 |
| 49 class DOMWindowEventQueue FINAL : DOMWINDOWEVENTQUEUE_BASE_CLASSES { |
44 public: | 50 public: |
45 static PassRefPtr<DOMWindowEventQueue> create(ExecutionContext*); | 51 static PassRefPtrWillBeRawPtr<DOMWindowEventQueue> create(ExecutionContext*)
; |
46 virtual ~DOMWindowEventQueue(); | 52 virtual ~DOMWindowEventQueue(); |
47 | 53 |
48 // EventQueue | 54 // EventQueue |
| 55 virtual void trace(Visitor*) OVERRIDE; |
49 virtual bool enqueueEvent(PassRefPtrWillBeRawPtr<Event>) OVERRIDE; | 56 virtual bool enqueueEvent(PassRefPtrWillBeRawPtr<Event>) OVERRIDE; |
50 virtual bool cancelEvent(Event*) OVERRIDE; | 57 virtual bool cancelEvent(Event*) OVERRIDE; |
51 virtual void close() OVERRIDE; | 58 virtual void close() OVERRIDE; |
52 | 59 |
53 private: | 60 private: |
54 explicit DOMWindowEventQueue(ExecutionContext*); | 61 explicit DOMWindowEventQueue(ExecutionContext*); |
55 | 62 |
56 void pendingEventTimerFired(); | 63 void pendingEventTimerFired(); |
57 void dispatchEvent(PassRefPtrWillBeRawPtr<Event>); | 64 void dispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
58 | 65 |
59 OwnPtr<DOMWindowEventQueueTimer> m_pendingEventTimer; | 66 OwnPtrWillBeMember<DOMWindowEventQueueTimer> m_pendingEventTimer; |
60 // FIXME: oilpan: This should be HeapListHashSet once it's implemented. | 67 WillBeHeapListHashSet<RefPtrWillBeMember<Event>, 16> m_queuedEvents; |
61 ListHashSet<RefPtrWillBePersistent<Event>, 16> m_queuedEvents; | |
62 bool m_isClosed; | 68 bool m_isClosed; |
63 | 69 |
64 friend class DOMWindowEventQueueTimer; | 70 friend class DOMWindowEventQueueTimer; |
65 }; | 71 }; |
66 | 72 |
67 } | 73 } |
68 | 74 |
69 #endif // DOMWindowEventQueue_h | 75 #endif // DOMWindowEventQueue_h |
OLD | NEW |