Chromium Code Reviews| Index: Source/core/dom/CustomElementCallbackInvocation.h |
| diff --git a/Source/core/dom/CustomElementCallbackInvocation.h b/Source/core/dom/CustomElementCallbackInvocation.h |
| index 0e46c6354aa684344334219cabd95157e2f27a1e..5c0f9a3e4b5a846a06a1362a0241d97969e940cd 100644 |
| --- a/Source/core/dom/CustomElementCallbackInvocation.h |
| +++ b/Source/core/dom/CustomElementCallbackInvocation.h |
| @@ -31,24 +31,37 @@ |
| #ifndef CustomElementCallbackInvocation_h |
| #define CustomElementCallbackInvocation_h |
| +#include "core/dom/CustomElementLifecycleCallbacks.h" |
| #include "wtf/PassOwnPtr.h" |
| +#include "wtf/PassRefPtr.h" |
| +#include "wtf/RefPtr.h" |
| #include "wtf/text/AtomicString.h" |
| namespace WebCore { |
| -class CustomElementLifecycleCallbacks; |
| class Element; |
| class CustomElementCallbackInvocation { |
| WTF_MAKE_NONCOPYABLE(CustomElementCallbackInvocation); |
| public: |
| - static PassOwnPtr<CustomElementCallbackInvocation> createCreatedInvocation(); |
| - static PassOwnPtr<CustomElementCallbackInvocation> createAttributeChangedInvocation(const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue); |
| + static PassOwnPtr<CustomElementCallbackInvocation> createInvocation(PassRefPtr<CustomElementLifecycleCallbacks>, CustomElementLifecycleCallbacks::CallbackType); |
| + static PassOwnPtr<CustomElementCallbackInvocation> createAttributeChangedInvocation(PassRefPtr<CustomElementLifecycleCallbacks>, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue); |
| - CustomElementCallbackInvocation() { } |
| virtual ~CustomElementCallbackInvocation() { } |
| + virtual void dispatch(Element*); |
| - virtual void dispatch(CustomElementLifecycleCallbacks*, Element*) = 0; |
| +protected: |
| + CustomElementCallbackInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callbacks, CustomElementLifecycleCallbacks::CallbackType which) |
| + : m_callbacks(callbacks), |
| + m_which(which) |
|
Yuta Kitamura
2013/07/08 03:40:49
nit: Comma should be prepended.
|
| + { |
| + } |
| + |
| + CustomElementLifecycleCallbacks* callbacks() { return m_callbacks.get(); } |
| + |
| +private: |
| + RefPtr<CustomElementLifecycleCallbacks> m_callbacks; |
| + CustomElementLifecycleCallbacks::CallbackType m_which; |
| }; |
| } |