| 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 V0CustomElementMicrotaskDispatcher_h | 5 #ifndef V0CustomElementMicrotaskDispatcher_h |
| 6 #define V0CustomElementMicrotaskDispatcher_h | 6 #define V0CustomElementMicrotaskDispatcher_h |
| 7 | 7 |
| 8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 #include "wtf/Noncopyable.h" | |
| 10 #include "wtf/Vector.h" | 9 #include "wtf/Vector.h" |
| 11 | 10 |
| 12 namespace blink { | 11 namespace blink { |
| 13 | 12 |
| 14 class V0CustomElementCallbackQueue; | 13 class V0CustomElementCallbackQueue; |
| 15 | 14 |
| 16 class V0CustomElementMicrotaskDispatcher final : public GarbageCollected<V0Custo
mElementMicrotaskDispatcher> { | 15 class V0CustomElementMicrotaskDispatcher final : public GarbageCollected<V0Custo
mElementMicrotaskDispatcher> { |
| 17 WTF_MAKE_NONCOPYABLE(V0CustomElementMicrotaskDispatcher); | 16 DISALLOW_COPY_AND_ASSIGN(V0CustomElementMicrotaskDispatcher); |
| 18 public: | 17 public: |
| 19 static V0CustomElementMicrotaskDispatcher& instance(); | 18 static V0CustomElementMicrotaskDispatcher& instance(); |
| 20 | 19 |
| 21 void enqueue(V0CustomElementCallbackQueue*); | 20 void enqueue(V0CustomElementCallbackQueue*); |
| 22 | 21 |
| 23 bool elementQueueIsEmpty() { return m_elements.isEmpty(); } | 22 bool elementQueueIsEmpty() { return m_elements.isEmpty(); } |
| 24 | 23 |
| 25 DECLARE_TRACE(); | 24 DECLARE_TRACE(); |
| 26 | 25 |
| 27 private: | 26 private: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 39 Resolving, | 38 Resolving, |
| 40 DispatchingCallbacks | 39 DispatchingCallbacks |
| 41 } m_phase; | 40 } m_phase; |
| 42 | 41 |
| 43 HeapVector<Member<V0CustomElementCallbackQueue>> m_elements; | 42 HeapVector<Member<V0CustomElementCallbackQueue>> m_elements; |
| 44 }; | 43 }; |
| 45 | 44 |
| 46 } // namespace blink | 45 } // namespace blink |
| 47 | 46 |
| 48 #endif // V0CustomElementMicrotaskDispatcher_h | 47 #endif // V0CustomElementMicrotaskDispatcher_h |
| OLD | NEW |