| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 ASSERT(m_pendingActivity > 0); | 159 ASSERT(m_pendingActivity > 0); |
| 160 if (!executionContext() || (!m_hasError && --m_pendingActivity)) | 160 if (!executionContext() || (!m_hasError && --m_pendingActivity)) |
| 161 return; | 161 return; |
| 162 | 162 |
| 163 ServiceWorkerGlobalScopeClient* client = ServiceWorkerGlobalScopeClient::fro
m(executionContext()); | 163 ServiceWorkerGlobalScopeClient* client = ServiceWorkerGlobalScopeClient::fro
m(executionContext()); |
| 164 WebServiceWorkerEventResult result = m_hasError ? WebServiceWorkerEventResul
tRejected : WebServiceWorkerEventResultCompleted; | 164 WebServiceWorkerEventResult result = m_hasError ? WebServiceWorkerEventResul
tRejected : WebServiceWorkerEventResultCompleted; |
| 165 switch (m_type) { | 165 switch (m_type) { |
| 166 case Activate: | 166 case Activate: |
| 167 client->didHandleActivateEvent(m_eventID, result); | 167 client->didHandleActivateEvent(m_eventID, result); |
| 168 break; | 168 break; |
| 169 case ExtendableMessage: |
| 170 client->didHandleExtendableMessageEvent(m_eventID, result); |
| 171 break; |
| 169 case Install: | 172 case Install: |
| 170 client->didHandleInstallEvent(m_eventID, result); | 173 client->didHandleInstallEvent(m_eventID, result); |
| 171 break; | 174 break; |
| 172 case NotificationClick: | 175 case NotificationClick: |
| 173 client->didHandleNotificationClickEvent(m_eventID, result); | 176 client->didHandleNotificationClickEvent(m_eventID, result); |
| 174 m_consumeWindowInteractionTimer.stop(); | 177 m_consumeWindowInteractionTimer.stop(); |
| 175 consumeWindowInteraction(nullptr); | 178 consumeWindowInteraction(nullptr); |
| 176 break; | 179 break; |
| 177 case Push: | 180 case Push: |
| 178 client->didHandlePushEvent(m_eventID, result); | 181 client->didHandlePushEvent(m_eventID, result); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 190 return; | 193 return; |
| 191 executionContext()->consumeWindowInteraction(); | 194 executionContext()->consumeWindowInteraction(); |
| 192 } | 195 } |
| 193 | 196 |
| 194 DEFINE_TRACE(WaitUntilObserver) | 197 DEFINE_TRACE(WaitUntilObserver) |
| 195 { | 198 { |
| 196 ContextLifecycleObserver::trace(visitor); | 199 ContextLifecycleObserver::trace(visitor); |
| 197 } | 200 } |
| 198 | 201 |
| 199 } // namespace blink | 202 } // namespace blink |
| OLD | NEW |