| Index: Source/core/dom/custom/CustomElementMicrotaskDispatcher.h
|
| diff --git a/Source/core/dom/custom/CustomElementMicrotaskDispatcher.h b/Source/core/dom/custom/CustomElementMicrotaskDispatcher.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b97e2e6354a5e550ca72745d09c416a86995593e
|
| --- /dev/null
|
| +++ b/Source/core/dom/custom/CustomElementMicrotaskDispatcher.h
|
| @@ -0,0 +1,43 @@
|
| +// 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 CustomElementMicrotaskDispatcher_h
|
| +#define CustomElementMicrotaskDispatcher_h
|
| +
|
| +#include "core/dom/custom/CustomElementMicrotaskQueue.h"
|
| +#include "wtf/Noncopyable.h"
|
| +#include "wtf/PassOwnPtr.h"
|
| +#include "wtf/Vector.h"
|
| +
|
| +namespace WebCore {
|
| +
|
| +class CustomElementCallbackQueue;
|
| +class CustomElementMicrotaskStep;
|
| +class HTMLImport;
|
| +
|
| +class CustomElementMicrotaskDispatcher {
|
| + WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskDispatcher);
|
| +public:
|
| + CustomElementMicrotaskDispatcher() : m_phase(Quiescent) { }
|
| + ~CustomElementMicrotaskDispatcher() { }
|
| +
|
| + void enqueue(HTMLImport*, PassOwnPtr<CustomElementMicrotaskStep>);
|
| + void enqueue(CustomElementCallbackQueue*);
|
| + bool dispatch();
|
| + bool elementQueueIsEmpty() { return m_elements.isEmpty(); }
|
| +
|
| +private:
|
| + enum {
|
| + Quiescent,
|
| + Resolving,
|
| + DispatchingCallbacks
|
| + } m_phase;
|
| +
|
| + CustomElementMicrotaskQueue m_resolutionAndImports;
|
| + Vector<CustomElementCallbackQueue*> m_elements;
|
| +};
|
| +
|
| +}
|
| +
|
| +#endif // CustomElementMicrotaskDispatcher_h
|
|
|