| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 std::unique_ptr<WebServiceWorker::Handle> handle) { | 120 std::unique_ptr<WebServiceWorker::Handle> handle) { |
| 121 return getOrCreate(executionContext, std::move(handle)); | 121 return getOrCreate(executionContext, std::move(handle)); |
| 122 } | 122 } |
| 123 | 123 |
| 124 bool ServiceWorker::hasPendingActivity() const { | 124 bool ServiceWorker::hasPendingActivity() const { |
| 125 if (m_wasStopped) | 125 if (m_wasStopped) |
| 126 return false; | 126 return false; |
| 127 return m_handle->serviceWorker()->state() != WebServiceWorkerStateRedundant; | 127 return m_handle->serviceWorker()->state() != WebServiceWorkerStateRedundant; |
| 128 } | 128 } |
| 129 | 129 |
| 130 void ServiceWorker::contextDestroyed() { | 130 void ServiceWorker::contextDestroyed(ExecutionContext*) { |
| 131 m_wasStopped = true; | 131 m_wasStopped = true; |
| 132 } | 132 } |
| 133 | 133 |
| 134 ServiceWorker* ServiceWorker::getOrCreate( | 134 ServiceWorker* ServiceWorker::getOrCreate( |
| 135 ExecutionContext* executionContext, | 135 ExecutionContext* executionContext, |
| 136 std::unique_ptr<WebServiceWorker::Handle> handle) { | 136 std::unique_ptr<WebServiceWorker::Handle> handle) { |
| 137 if (!handle) | 137 if (!handle) |
| 138 return nullptr; | 138 return nullptr; |
| 139 | 139 |
| 140 ServiceWorker* existingWorker = | 140 ServiceWorker* existingWorker = |
| (...skipping 15 matching lines...) Expand all Loading... |
| 156 m_handle->serviceWorker()->setProxy(this); | 156 m_handle->serviceWorker()->setProxy(this); |
| 157 } | 157 } |
| 158 | 158 |
| 159 ServiceWorker::~ServiceWorker() {} | 159 ServiceWorker::~ServiceWorker() {} |
| 160 | 160 |
| 161 DEFINE_TRACE(ServiceWorker) { | 161 DEFINE_TRACE(ServiceWorker) { |
| 162 AbstractWorker::trace(visitor); | 162 AbstractWorker::trace(visitor); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace blink | 165 } // namespace blink |
| OLD | NEW |