| 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 SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTMICROTASKQUEUEBASE_H_ | |
| 6 #define SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTMICROTASKQUEUEBASE_H_ | |
| 7 | |
| 8 #include "sky/engine/core/dom/custom/CustomElementMicrotaskStep.h" | |
| 9 #include "sky/engine/platform/heap/Handle.h" | |
| 10 #include "sky/engine/wtf/OwnPtr.h" | |
| 11 #include "sky/engine/wtf/PassOwnPtr.h" | |
| 12 #include "sky/engine/wtf/PassRefPtr.h" | |
| 13 #include "sky/engine/wtf/RefCounted.h" | |
| 14 #include "sky/engine/wtf/RefPtr.h" | |
| 15 #include "sky/engine/wtf/Vector.h" | |
| 16 | |
| 17 namespace blink { | |
| 18 | |
| 19 class CustomElementMicrotaskQueueBase : public RefCounted<CustomElementMicrotask
QueueBase> { | |
| 20 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueueBase); | |
| 21 public: | |
| 22 virtual ~CustomElementMicrotaskQueueBase() { } | |
| 23 | |
| 24 bool isEmpty() const { return m_queue.isEmpty(); } | |
| 25 void dispatch(); | |
| 26 | |
| 27 protected: | |
| 28 CustomElementMicrotaskQueueBase() : m_inDispatch(false) { } | |
| 29 virtual void doDispatch() = 0; | |
| 30 | |
| 31 Vector<OwnPtr<CustomElementMicrotaskStep> > m_queue; | |
| 32 bool m_inDispatch; | |
| 33 }; | |
| 34 | |
| 35 } | |
| 36 | |
| 37 #endif // SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTMICROTASKQUEUEBASE_H_ | |
| OLD | NEW |