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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 void AttachedDetachedInvocation::dispatch(Element* element) { | 60 void AttachedDetachedInvocation::dispatch(Element* element) { |
61 switch (m_which) { | 61 switch (m_which) { |
62 case V0CustomElementLifecycleCallbacks::AttachedCallback: | 62 case V0CustomElementLifecycleCallbacks::AttachedCallback: |
63 callbacks()->attached(element); | 63 callbacks()->attached(element); |
64 break; | 64 break; |
65 case V0CustomElementLifecycleCallbacks::DetachedCallback: | 65 case V0CustomElementLifecycleCallbacks::DetachedCallback: |
66 callbacks()->detached(element); | 66 callbacks()->detached(element); |
67 break; | 67 break; |
68 default: | 68 default: |
69 ASSERT_NOT_REACHED(); | 69 NOTREACHED(); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 class AttributeChangedInvocation final | 73 class AttributeChangedInvocation final |
74 : public V0CustomElementCallbackInvocation { | 74 : public V0CustomElementCallbackInvocation { |
75 public: | 75 public: |
76 AttributeChangedInvocation(V0CustomElementLifecycleCallbacks*, | 76 AttributeChangedInvocation(V0CustomElementLifecycleCallbacks*, |
77 const AtomicString& name, | 77 const AtomicString& name, |
78 const AtomicString& oldValue, | 78 const AtomicString& oldValue, |
79 const AtomicString& newValue); | 79 const AtomicString& newValue); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 V0CustomElementLifecycleCallbacks* callbacks, | 123 V0CustomElementLifecycleCallbacks* callbacks, |
124 V0CustomElementLifecycleCallbacks::CallbackType which) { | 124 V0CustomElementLifecycleCallbacks::CallbackType which) { |
125 switch (which) { | 125 switch (which) { |
126 case V0CustomElementLifecycleCallbacks::CreatedCallback: | 126 case V0CustomElementLifecycleCallbacks::CreatedCallback: |
127 return new CreatedInvocation(callbacks); | 127 return new CreatedInvocation(callbacks); |
128 | 128 |
129 case V0CustomElementLifecycleCallbacks::AttachedCallback: | 129 case V0CustomElementLifecycleCallbacks::AttachedCallback: |
130 case V0CustomElementLifecycleCallbacks::DetachedCallback: | 130 case V0CustomElementLifecycleCallbacks::DetachedCallback: |
131 return new AttachedDetachedInvocation(callbacks, which); | 131 return new AttachedDetachedInvocation(callbacks, which); |
132 default: | 132 default: |
133 ASSERT_NOT_REACHED(); | 133 NOTREACHED(); |
134 return nullptr; | 134 return nullptr; |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 V0CustomElementCallbackInvocation* | 138 V0CustomElementCallbackInvocation* |
139 V0CustomElementCallbackInvocation::createAttributeChangedInvocation( | 139 V0CustomElementCallbackInvocation::createAttributeChangedInvocation( |
140 V0CustomElementLifecycleCallbacks* callbacks, | 140 V0CustomElementLifecycleCallbacks* callbacks, |
141 const AtomicString& name, | 141 const AtomicString& name, |
142 const AtomicString& oldValue, | 142 const AtomicString& oldValue, |
143 const AtomicString& newValue) { | 143 const AtomicString& newValue) { |
144 return new AttributeChangedInvocation(callbacks, name, oldValue, newValue); | 144 return new AttributeChangedInvocation(callbacks, name, oldValue, newValue); |
145 } | 145 } |
146 | 146 |
147 DEFINE_TRACE(V0CustomElementCallbackInvocation) { | 147 DEFINE_TRACE(V0CustomElementCallbackInvocation) { |
148 visitor->trace(m_callbacks); | 148 visitor->trace(m_callbacks); |
149 V0CustomElementProcessingStep::trace(visitor); | 149 V0CustomElementProcessingStep::trace(visitor); |
150 } | 150 } |
151 | 151 |
152 } // namespace blink | 152 } // namespace blink |
OLD | NEW |