OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CustomElementMicrotaskQueueBase_h | |
6 #define CustomElementMicrotaskQueueBase_h | |
7 | |
8 #include "core/dom/custom/CustomElementMicrotaskStep.h" | |
9 #include "platform/heap/Handle.h" | |
10 #include "wtf/Vector.h" | |
11 | |
12 namespace blink { | |
13 | |
14 class CustomElementMicrotaskQueueBase : public GarbageCollectedFinalized<CustomE
lementMicrotaskQueueBase> { | |
15 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueueBase); | |
16 public: | |
17 virtual ~CustomElementMicrotaskQueueBase() { } | |
18 | |
19 bool isEmpty() const { return m_queue.isEmpty(); } | |
20 void dispatch(); | |
21 | |
22 DECLARE_TRACE(); | |
23 | |
24 #if !defined(NDEBUG) | |
25 void show(unsigned indent); | |
26 #endif | |
27 | |
28 protected: | |
29 CustomElementMicrotaskQueueBase() : m_inDispatch(false) { } | |
30 virtual void doDispatch() = 0; | |
31 | |
32 HeapVector<Member<CustomElementMicrotaskStep>> m_queue; | |
33 bool m_inDispatch; | |
34 }; | |
35 | |
36 } // namespace blink | |
37 | |
38 #endif // CustomElementMicrotaskQueueBase_h | |
OLD | NEW |