OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/serviceworkers/WaitUntilObserver.h" | 5 #include "modules/serviceworkers/WaitUntilObserver.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptFunction.h" | 7 #include "bindings/core/v8/ScriptFunction.h" |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "bindings/core/v8/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
10 #include "bindings/core/v8/V8Binding.h" | 10 #include "bindings/core/v8/V8Binding.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 client->didHandleInstallEvent(m_eventID, result); | 170 client->didHandleInstallEvent(m_eventID, result); |
171 break; | 171 break; |
172 case Message: | 172 case Message: |
173 client->didHandleExtendableMessageEvent(m_eventID, result); | 173 client->didHandleExtendableMessageEvent(m_eventID, result); |
174 break; | 174 break; |
175 case NotificationClick: | 175 case NotificationClick: |
176 client->didHandleNotificationClickEvent(m_eventID, result); | 176 client->didHandleNotificationClickEvent(m_eventID, result); |
177 m_consumeWindowInteractionTimer.stop(); | 177 m_consumeWindowInteractionTimer.stop(); |
178 consumeWindowInteraction(nullptr); | 178 consumeWindowInteraction(nullptr); |
179 break; | 179 break; |
| 180 case NotificationClose: |
| 181 client->didHandleNotificationCloseEvent(m_eventID, result); |
| 182 break; |
180 case Push: | 183 case Push: |
181 client->didHandlePushEvent(m_eventID, result); | 184 client->didHandlePushEvent(m_eventID, result); |
182 break; | 185 break; |
183 case Sync: | 186 case Sync: |
184 client->didHandleSyncEvent(m_eventID, result); | 187 client->didHandleSyncEvent(m_eventID, result); |
185 break; | 188 break; |
186 } | 189 } |
187 setContext(nullptr); | 190 setContext(nullptr); |
188 } | 191 } |
189 | 192 |
190 void WaitUntilObserver::consumeWindowInteraction(Timer<WaitUntilObserver>*) | 193 void WaitUntilObserver::consumeWindowInteraction(Timer<WaitUntilObserver>*) |
191 { | 194 { |
192 if (!executionContext()) | 195 if (!executionContext()) |
193 return; | 196 return; |
194 executionContext()->consumeWindowInteraction(); | 197 executionContext()->consumeWindowInteraction(); |
195 } | 198 } |
196 | 199 |
197 DEFINE_TRACE(WaitUntilObserver) | 200 DEFINE_TRACE(WaitUntilObserver) |
198 { | 201 { |
199 ContextLifecycleObserver::trace(visitor); | 202 ContextLifecycleObserver::trace(visitor); |
200 } | 203 } |
201 | 204 |
202 } // namespace blink | 205 } // namespace blink |
OLD | NEW |