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 V0CustomElementMicrotaskQueueBase_h |
| 6 #define V0CustomElementMicrotaskQueueBase_h |
| 7 |
| 8 #include "core/dom/custom/V0CustomElementMicrotaskStep.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/Vector.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class V0CustomElementMicrotaskQueueBase : public GarbageCollectedFinalized<V0Cus
tomElementMicrotaskQueueBase> { |
| 15 WTF_MAKE_NONCOPYABLE(V0CustomElementMicrotaskQueueBase); |
| 16 public: |
| 17 virtual ~V0CustomElementMicrotaskQueueBase() { } |
| 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 V0CustomElementMicrotaskQueueBase() : m_inDispatch(false) { } |
| 30 virtual void doDispatch() = 0; |
| 31 |
| 32 HeapVector<Member<V0CustomElementMicrotaskStep>> m_queue; |
| 33 bool m_inDispatch; |
| 34 }; |
| 35 |
| 36 } // namespace blink |
| 37 |
| 38 #endif // V0CustomElementMicrotaskQueueBase_h |
OLD | NEW |