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