| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 client->didHandleActivateEvent(m_eventID, result); | 167 client->didHandleActivateEvent(m_eventID, result); |
| 168 break; | 168 break; |
| 169 case Install: | 169 case Install: |
| 170 client->didHandleInstallEvent(m_eventID, result); | 170 client->didHandleInstallEvent(m_eventID, result); |
| 171 break; | 171 break; |
| 172 case NotificationClick: | 172 case NotificationClick: |
| 173 client->didHandleNotificationClickEvent(m_eventID, result); | 173 client->didHandleNotificationClickEvent(m_eventID, result); |
| 174 m_consumeWindowInteractionTimer.stop(); | 174 m_consumeWindowInteractionTimer.stop(); |
| 175 consumeWindowInteraction(nullptr); | 175 consumeWindowInteraction(nullptr); |
| 176 break; | 176 break; |
| 177 case NotificationClose: |
| 178 client->didHandleNotificationCloseEvent(m_eventID, result); |
| 179 break; |
| 177 case Push: | 180 case Push: |
| 178 client->didHandlePushEvent(m_eventID, result); | 181 client->didHandlePushEvent(m_eventID, result); |
| 179 break; | 182 break; |
| 180 case Sync: | 183 case Sync: |
| 181 client->didHandleSyncEvent(m_eventID, result); | 184 client->didHandleSyncEvent(m_eventID, result); |
| 182 break; | 185 break; |
| 183 } | 186 } |
| 184 setContext(nullptr); | 187 setContext(nullptr); |
| 185 } | 188 } |
| 186 | 189 |
| 187 void WaitUntilObserver::consumeWindowInteraction(Timer<WaitUntilObserver>*) | 190 void WaitUntilObserver::consumeWindowInteraction(Timer<WaitUntilObserver>*) |
| 188 { | 191 { |
| 189 if (!executionContext()) | 192 if (!executionContext()) |
| 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 |