| Index: Source/core/dom/CustomElementCallbackDispatcher.h
|
| diff --git a/Source/core/dom/CustomElementCallbackDispatcher.h b/Source/core/dom/CustomElementCallbackDispatcher.h
|
| index a52e7f308f8e8cc6bdeb7f584e8a37ce3967fc1f..5e04d604f19f263d2dcb49c10ba25075c9156043 100644
|
| --- a/Source/core/dom/CustomElementCallbackDispatcher.h
|
| +++ b/Source/core/dom/CustomElementCallbackDispatcher.h
|
| @@ -40,6 +40,8 @@
|
|
|
| namespace WebCore {
|
|
|
| +class Element;
|
| +
|
| class CustomElementCallbackDispatcher {
|
| WTF_MAKE_NONCOPYABLE(CustomElementCallbackDispatcher);
|
| public:
|
| @@ -56,7 +58,9 @@ public:
|
| }
|
| };
|
|
|
| - void enqueueReadyCallback(CustomElementCallback*, Element*);
|
| + void enqueueCreationCallbacks(CustomElementCallback*, Element*, bool createdByParser);
|
| + void enqueueInsertedCallback(CustomElementCallback*, Element*);
|
| + void enqueueRemovedCallback(CustomElementCallback*, Element*);
|
|
|
| // Returns true if more work may have to be performed at the
|
| // checkpoint by this or other workers (for example, this work
|
| @@ -67,24 +71,24 @@ public:
|
| // createElementNS and generated constructors.
|
| void dispatchReadyCallback(Element*);
|
|
|
| -private:
|
| - explicit CustomElementCallbackDispatcher() { }
|
| -
|
| - bool hasQueuedCallbacks() { return !m_invocations.isEmpty(); }
|
| -
|
| - class ReadyInvocation {
|
| + class Invocation {
|
| public:
|
| - ReadyInvocation(PassRefPtr<CustomElementCallback>, PassRefPtr<Element>);
|
| - virtual ~ReadyInvocation() { }
|
| - void invoke() { m_callback->ready(m_element.get()); }
|
| + Invocation(CustomElementCallback::CallbackType, PassRefPtr<CustomElementCallback>, PassRefPtr<Element>);
|
| Element* element() { return m_element.get(); }
|
| + CustomElementCallback::CallbackType type() { return m_type; }
|
| + void invoke();
|
|
|
| private:
|
| + CustomElementCallback::CallbackType m_type;
|
| RefPtr<CustomElementCallback> m_callback;
|
| RefPtr<Element> m_element;
|
| };
|
|
|
| - typedef Vector<OwnPtr<ReadyInvocation> > InvocationList;
|
| +private:
|
| + explicit CustomElementCallbackDispatcher() { }
|
| + bool hasQueuedCallbacks() { return !m_invocations.isEmpty(); }
|
| +
|
| + typedef Vector<OwnPtr<Invocation> > InvocationList;
|
| InvocationList m_invocations;
|
| };
|
|
|
|
|