Chromium Code Reviews| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 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(); |
|
Nina
2016/01/21 13:55:36
I can't figure out what this does. Mind giving me
| |
| 175 consumeWindowInteraction(nullptr); | 175 consumeWindowInteraction(nullptr); |
| 176 break; | 176 break; |
| 177 case NotificationClose: | |
| 178 // TODO(nsatragno): figure out what consumeWindowInteraction does. | |
| 179 client->didHandleNotificationCloseEvent(m_eventID, result); | |
| 180 break; | |
| 177 case Push: | 181 case Push: |
| 178 client->didHandlePushEvent(m_eventID, result); | 182 client->didHandlePushEvent(m_eventID, result); |
| 179 break; | 183 break; |
| 180 case Sync: | 184 case Sync: |
| 181 client->didHandleSyncEvent(m_eventID, result); | 185 client->didHandleSyncEvent(m_eventID, result); |
| 182 break; | 186 break; |
| 183 } | 187 } |
| 184 setContext(nullptr); | 188 setContext(nullptr); |
| 185 } | 189 } |
| 186 | 190 |
| 187 void WaitUntilObserver::consumeWindowInteraction(Timer<WaitUntilObserver>*) | 191 void WaitUntilObserver::consumeWindowInteraction(Timer<WaitUntilObserver>*) |
| 188 { | 192 { |
| 189 if (!executionContext()) | 193 if (!executionContext()) |
| 190 return; | 194 return; |
| 191 executionContext()->consumeWindowInteraction(); | 195 executionContext()->consumeWindowInteraction(); |
| 192 } | 196 } |
| 193 | 197 |
| 194 DEFINE_TRACE(WaitUntilObserver) | 198 DEFINE_TRACE(WaitUntilObserver) |
| 195 { | 199 { |
| 196 ContextLifecycleObserver::trace(visitor); | 200 ContextLifecycleObserver::trace(visitor); |
| 197 } | 201 } |
| 198 | 202 |
| 199 } // namespace blink | 203 } // namespace blink |
| OLD | NEW |