| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 m_eventDispatchTime); | 198 m_eventDispatchTime); |
| 199 break; | 199 break; |
| 200 case BackgroundFetchAbort: | 200 case BackgroundFetchAbort: |
| 201 client->didHandleBackgroundFetchAbortEvent(m_eventID, result, | 201 client->didHandleBackgroundFetchAbortEvent(m_eventID, result, |
| 202 m_eventDispatchTime); | 202 m_eventDispatchTime); |
| 203 break; | 203 break; |
| 204 case BackgroundFetchClick: | 204 case BackgroundFetchClick: |
| 205 client->didHandleBackgroundFetchClickEvent(m_eventID, result, | 205 client->didHandleBackgroundFetchClickEvent(m_eventID, result, |
| 206 m_eventDispatchTime); | 206 m_eventDispatchTime); |
| 207 break; | 207 break; |
| 208 case BackgroundFetchFail: |
| 209 client->didHandleBackgroundFetchFailEvent(m_eventID, result, |
| 210 m_eventDispatchTime); |
| 211 break; |
| 212 case BackgroundFetched: |
| 213 client->didHandleBackgroundFetchedEvent(m_eventID, result, |
| 214 m_eventDispatchTime); |
| 215 break; |
| 208 } | 216 } |
| 209 m_executionContext = nullptr; | 217 m_executionContext = nullptr; |
| 210 } | 218 } |
| 211 | 219 |
| 212 void WaitUntilObserver::consumeWindowInteraction(TimerBase*) { | 220 void WaitUntilObserver::consumeWindowInteraction(TimerBase*) { |
| 213 if (!m_executionContext) | 221 if (!m_executionContext) |
| 214 return; | 222 return; |
| 215 m_executionContext->consumeWindowInteraction(); | 223 m_executionContext->consumeWindowInteraction(); |
| 216 } | 224 } |
| 217 | 225 |
| 218 DEFINE_TRACE(WaitUntilObserver) { | 226 DEFINE_TRACE(WaitUntilObserver) { |
| 219 visitor->trace(m_executionContext); | 227 visitor->trace(m_executionContext); |
| 220 } | 228 } |
| 221 | 229 |
| 222 } // namespace blink | 230 } // namespace blink |
| OLD | NEW |