OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef CustomElementCallbackInvocation_h | 31 #ifndef CustomElementCallbackInvocation_h |
32 #define CustomElementCallbackInvocation_h | 32 #define CustomElementCallbackInvocation_h |
33 | 33 |
34 #include "core/dom/custom/CustomElementLifecycleCallbacks.h" | 34 #include "core/dom/custom/CustomElementLifecycleCallbacks.h" |
35 #include "core/dom/custom/CustomElementProcessingStep.h" | 35 #include "core/dom/custom/CustomElementProcessingStep.h" |
36 #include "wtf/PassOwnPtr.h" | |
37 #include "wtf/PassRefPtr.h" | |
38 #include "wtf/RefPtr.h" | |
39 #include "wtf/text/AtomicString.h" | 36 #include "wtf/text/AtomicString.h" |
40 | 37 |
41 namespace blink { | 38 namespace blink { |
42 | 39 |
43 class CustomElementCallbackInvocation : public CustomElementProcessingStep { | 40 class CustomElementCallbackInvocation : public CustomElementProcessingStep { |
44 WTF_MAKE_NONCOPYABLE(CustomElementCallbackInvocation); | 41 WTF_MAKE_NONCOPYABLE(CustomElementCallbackInvocation); |
45 public: | 42 public: |
46 static RawPtr<CustomElementCallbackInvocation> createInvocation(RawPtr<Custo
mElementLifecycleCallbacks>, CustomElementLifecycleCallbacks::CallbackType); | 43 static RawPtr<CustomElementCallbackInvocation> createInvocation(RawPtr<Custo
mElementLifecycleCallbacks>, CustomElementLifecycleCallbacks::CallbackType); |
47 static RawPtr<CustomElementCallbackInvocation> createAttributeChangedInvocat
ion(RawPtr<CustomElementLifecycleCallbacks>, const AtomicString& name, const Ato
micString& oldValue, const AtomicString& newValue); | 44 static RawPtr<CustomElementCallbackInvocation> createAttributeChangedInvocat
ion(RawPtr<CustomElementLifecycleCallbacks>, const AtomicString& name, const Ato
micString& oldValue, const AtomicString& newValue); |
48 | 45 |
49 protected: | 46 protected: |
50 CustomElementCallbackInvocation(RawPtr<CustomElementLifecycleCallbacks> call
backs) | 47 CustomElementCallbackInvocation(RawPtr<CustomElementLifecycleCallbacks> call
backs) |
51 : m_callbacks(callbacks) | 48 : m_callbacks(callbacks) |
52 { | 49 { |
53 } | 50 } |
54 | 51 |
55 CustomElementLifecycleCallbacks* callbacks() { return m_callbacks.get(); } | 52 CustomElementLifecycleCallbacks* callbacks() { return m_callbacks.get(); } |
56 | 53 |
57 DECLARE_VIRTUAL_TRACE(); | 54 DECLARE_VIRTUAL_TRACE(); |
58 | 55 |
59 private: | 56 private: |
60 Member<CustomElementLifecycleCallbacks> m_callbacks; | 57 Member<CustomElementLifecycleCallbacks> m_callbacks; |
61 }; | 58 }; |
62 | 59 |
63 } // namespace blink | 60 } // namespace blink |
64 | 61 |
65 #endif // CustomElementCallbackInvocation_h | 62 #endif // CustomElementCallbackInvocation_h |
OLD | NEW |