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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 return false; | 99 return false; |
100 } | 100 } |
101 | 101 |
102 void V0CustomElement::define(Element* element, | 102 void V0CustomElement::define(Element* element, |
103 V0CustomElementDefinition* definition) { | 103 V0CustomElementDefinition* definition) { |
104 switch (element->getV0CustomElementState()) { | 104 switch (element->getV0CustomElementState()) { |
105 case Element::V0NotCustomElement: | 105 case Element::V0NotCustomElement: |
106 case Element::V0Upgraded: | 106 case Element::V0Upgraded: |
107 ASSERT_NOT_REACHED(); | 107 NOTREACHED(); |
108 break; | 108 break; |
109 | 109 |
110 case Element::V0WaitingForUpgrade: | 110 case Element::V0WaitingForUpgrade: |
111 element->v0SetCustomElementDefinition(definition); | 111 element->v0SetCustomElementDefinition(definition); |
112 V0CustomElementScheduler::scheduleCallback( | 112 V0CustomElementScheduler::scheduleCallback( |
113 definition->callbacks(), element, | 113 definition->callbacks(), element, |
114 V0CustomElementLifecycleCallbacks::CreatedCallback); | 114 V0CustomElementLifecycleCallbacks::CreatedCallback); |
115 break; | 115 break; |
116 } | 116 } |
117 } | 117 } |
(...skipping 22 matching lines...) Expand all Loading... |
140 if (!document.domWindow()) | 140 if (!document.domWindow()) |
141 return; | 141 return; |
142 V0CustomElementScheduler::scheduleCallback( | 142 V0CustomElementScheduler::scheduleCallback( |
143 element->v0CustomElementDefinition()->callbacks(), element, | 143 element->v0CustomElementDefinition()->callbacks(), element, |
144 V0CustomElementLifecycleCallbacks::DetachedCallback); | 144 V0CustomElementLifecycleCallbacks::DetachedCallback); |
145 } | 145 } |
146 | 146 |
147 void V0CustomElement::wasDestroyed(Element* element) { | 147 void V0CustomElement::wasDestroyed(Element* element) { |
148 switch (element->getV0CustomElementState()) { | 148 switch (element->getV0CustomElementState()) { |
149 case Element::V0NotCustomElement: | 149 case Element::V0NotCustomElement: |
150 ASSERT_NOT_REACHED(); | 150 NOTREACHED(); |
151 break; | 151 break; |
152 | 152 |
153 case Element::V0WaitingForUpgrade: | 153 case Element::V0WaitingForUpgrade: |
154 case Element::V0Upgraded: | 154 case Element::V0Upgraded: |
155 V0CustomElementObserver::notifyElementWasDestroyed(element); | 155 V0CustomElementObserver::notifyElementWasDestroyed(element); |
156 break; | 156 break; |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 } // namespace blink | 160 } // namespace blink |
OLD | NEW |