| 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" |
| 11 #include "core/dom/ExceptionCode.h" | 11 #include "core/dom/ExceptionCode.h" |
| 12 #include "core/dom/ExecutionContext.h" | 12 #include "core/dom/ExecutionContext.h" |
| 13 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h" | 13 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h" |
| 14 #include "platform/LayoutTestSupport.h" | 14 #include "platform/LayoutTestSupport.h" |
| 15 #include "platform/NotImplemented.h" | |
| 16 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" | 15 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" |
| 17 #include "wtf/Assertions.h" | 16 #include "wtf/Assertions.h" |
| 18 #include "wtf/RefCounted.h" | 17 #include "wtf/RefCounted.h" |
| 19 #include "wtf/RefPtr.h" | 18 #include "wtf/RefPtr.h" |
| 20 #include <v8.h> | 19 #include <v8.h> |
| 21 | 20 |
| 22 namespace blink { | 21 namespace blink { |
| 23 | 22 |
| 24 namespace { | 23 namespace { |
| 25 | 24 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 , m_pendingActivity(0) | 136 , m_pendingActivity(0) |
| 138 , m_hasError(false) | 137 , m_hasError(false) |
| 139 , m_eventDispatched(false) | 138 , m_eventDispatched(false) |
| 140 , m_consumeWindowInteractionTimer(this, &WaitUntilObserver::consumeWindowInt
eraction) | 139 , m_consumeWindowInteractionTimer(this, &WaitUntilObserver::consumeWindowInt
eraction) |
| 141 { | 140 { |
| 142 } | 141 } |
| 143 | 142 |
| 144 void WaitUntilObserver::reportError(const ScriptValue& value) | 143 void WaitUntilObserver::reportError(const ScriptValue& value) |
| 145 { | 144 { |
| 146 // FIXME: Propagate error message to the client for onerror handling. | 145 // FIXME: Propagate error message to the client for onerror handling. |
| 147 notImplemented(); | 146 NOTIMPLEMENTED(); |
| 148 | 147 |
| 149 m_hasError = true; | 148 m_hasError = true; |
| 150 } | 149 } |
| 151 | 150 |
| 152 void WaitUntilObserver::incrementPendingActivity() | 151 void WaitUntilObserver::incrementPendingActivity() |
| 153 { | 152 { |
| 154 ++m_pendingActivity; | 153 ++m_pendingActivity; |
| 155 } | 154 } |
| 156 | 155 |
| 157 void WaitUntilObserver::decrementPendingActivity() | 156 void WaitUntilObserver::decrementPendingActivity() |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 return; | 195 return; |
| 197 getExecutionContext()->consumeWindowInteraction(); | 196 getExecutionContext()->consumeWindowInteraction(); |
| 198 } | 197 } |
| 199 | 198 |
| 200 DEFINE_TRACE(WaitUntilObserver) | 199 DEFINE_TRACE(WaitUntilObserver) |
| 201 { | 200 { |
| 202 ContextLifecycleObserver::trace(visitor); | 201 ContextLifecycleObserver::trace(visitor); |
| 203 } | 202 } |
| 204 | 203 |
| 205 } // namespace blink | 204 } // namespace blink |
| OLD | NEW |