| 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/ServiceWorkerRegistration.h" | 5 #include "modules/serviceworkers/ServiceWorkerRegistration.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" | 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 ServiceWorkerRegistration::~ServiceWorkerRegistration() | 117 ServiceWorkerRegistration::~ServiceWorkerRegistration() |
| 118 { | 118 { |
| 119 } | 119 } |
| 120 | 120 |
| 121 DEFINE_TRACE(ServiceWorkerRegistration) | 121 DEFINE_TRACE(ServiceWorkerRegistration) |
| 122 { | 122 { |
| 123 visitor->trace(m_installing); | 123 visitor->trace(m_installing); |
| 124 visitor->trace(m_waiting); | 124 visitor->trace(m_waiting); |
| 125 visitor->trace(m_active); | 125 visitor->trace(m_active); |
| 126 RefCountedGarbageCollectedEventTargetWithInlineData<ServiceWorkerRegistratio
n>::trace(visitor); | 126 RefCountedGarbageCollectedEventTargetWithInlineData<ServiceWorkerRegistratio
n>::trace(visitor); |
| 127 HeapSupplementable<ServiceWorkerRegistration>::trace(visitor); | |
| 128 ActiveDOMObject::trace(visitor); | 127 ActiveDOMObject::trace(visitor); |
| 128 Supplementable<ServiceWorkerRegistration>::trace(visitor); |
| 129 } | 129 } |
| 130 | 130 |
| 131 bool ServiceWorkerRegistration::hasPendingActivity() const | 131 bool ServiceWorkerRegistration::hasPendingActivity() const |
| 132 { | 132 { |
| 133 return !m_stopped; | 133 return !m_stopped; |
| 134 } | 134 } |
| 135 | 135 |
| 136 void ServiceWorkerRegistration::stop() | 136 void ServiceWorkerRegistration::stop() |
| 137 { | 137 { |
| 138 if (m_stopped) | 138 if (m_stopped) |
| 139 return; | 139 return; |
| 140 m_stopped = true; | 140 m_stopped = true; |
| 141 m_handle->registration()->proxyStopped(); | 141 m_handle->registration()->proxyStopped(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |