Index: Source/core/dom/custom/CustomElementMicrotaskStepDispatcher.h |
diff --git a/Source/core/dom/custom/CustomElementMicrotaskStepDispatcher.h b/Source/core/dom/custom/CustomElementMicrotaskStepDispatcher.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6e715ed1b5a125b0041997b1267e186b1a617e71 |
--- /dev/null |
+++ b/Source/core/dom/custom/CustomElementMicrotaskStepDispatcher.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CustomElementMicrotaskStepDispatcher_h |
+#define CustomElementMicrotaskStepDispatcher_h |
+ |
+#include "core/dom/custom/CustomElementAsyncImportMicrotaskQueue.h" |
+#include "core/dom/custom/CustomElementSyncMicrotaskQueue.h" |
+#include "platform/heap/Handle.h" |
+ |
+namespace WebCore { |
+ |
+class HTMLImportLoader; |
+ |
+class CustomElementMicrotaskStepDispatcher : public RefCountedWillBeGarbageCollectedFinalized<CustomElementMicrotaskStepDispatcher> { |
+ WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskStepDispatcher); |
+public: |
+ static PassRefPtrWillBeRawPtr<CustomElementMicrotaskStepDispatcher> create() { return adoptRefWillBeNoop(new CustomElementMicrotaskStepDispatcher()); } |
+ |
+ void enqueue(HTMLImportLoader* parentLoader, PassOwnPtrWillBeRawPtr<CustomElementMicrotaskStep>); |
+ void enqueue(HTMLImportLoader* parentLoader, PassOwnPtrWillBeRawPtr<CustomElementMicrotaskImportStep>, bool importIsSync); |
+ |
+ void dispatch(); |
+ void trace(Visitor*); |
+ |
+#if !defined(NDEBUG) |
+ void show(unsigned indent); |
+#endif |
+ |
+private: |
+ CustomElementMicrotaskStepDispatcher(); |
+ |
+ RefPtrWillBeMember<CustomElementSyncMicrotaskQueue> m_syncQueue; |
+ RefPtrWillBeMember<CustomElementAsyncImportMicrotaskQueue> m_asyncQueue; |
+}; |
+ |
+} |
+ |
+#endif // CustomElementMicrotaskStepDispatcher_h |