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 22 matching lines...) Expand all Loading... |
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" | 36 #include "wtf/PassOwnPtr.h" |
37 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
39 #include "wtf/text/AtomicString.h" | 39 #include "wtf/text/AtomicString.h" |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 // FIXME: Rename to CustomElementCallbackStep | |
44 class CustomElementCallbackInvocation : public CustomElementProcessingStep { | 43 class CustomElementCallbackInvocation : public CustomElementProcessingStep { |
45 WTF_MAKE_NONCOPYABLE(CustomElementCallbackInvocation); | 44 WTF_MAKE_NONCOPYABLE(CustomElementCallbackInvocation); |
46 public: | 45 public: |
47 static PassOwnPtr<CustomElementCallbackInvocation> createInvocation(PassRefP
tr<CustomElementLifecycleCallbacks>, CustomElementLifecycleCallbacks::CallbackTy
pe); | 46 static PassOwnPtr<CustomElementCallbackInvocation> createInvocation(PassRefP
tr<CustomElementLifecycleCallbacks>, CustomElementLifecycleCallbacks::CallbackTy
pe); |
48 static PassOwnPtr<CustomElementCallbackInvocation> createAttributeChangedInv
ocation(PassRefPtr<CustomElementLifecycleCallbacks>, const AtomicString& name, c
onst AtomicString& oldValue, const AtomicString& newValue); | 47 static PassOwnPtr<CustomElementCallbackInvocation> createAttributeChangedInv
ocation(PassRefPtr<CustomElementLifecycleCallbacks>, const AtomicString& name, c
onst AtomicString& oldValue, const AtomicString& newValue); |
49 | 48 |
50 protected: | 49 protected: |
51 CustomElementCallbackInvocation(PassRefPtr<CustomElementLifecycleCallbacks>
callbacks) | 50 CustomElementCallbackInvocation(PassRefPtr<CustomElementLifecycleCallbacks>
callbacks) |
52 : m_callbacks(callbacks) | 51 : m_callbacks(callbacks) |
53 { | 52 { |
54 } | 53 } |
55 | 54 |
56 CustomElementLifecycleCallbacks* callbacks() { return m_callbacks.get(); } | 55 CustomElementLifecycleCallbacks* callbacks() { return m_callbacks.get(); } |
57 | 56 |
58 private: | 57 private: |
59 RefPtr<CustomElementLifecycleCallbacks> m_callbacks; | 58 RefPtr<CustomElementLifecycleCallbacks> m_callbacks; |
60 }; | 59 }; |
61 | 60 |
62 } | 61 } |
63 | 62 |
64 #endif // CustomElementCallbackInvocation_h | 63 #endif // CustomElementCallbackInvocation_h |
OLD | NEW |