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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 ServiceWorker* newWorker = | 147 ServiceWorker* newWorker = |
148 new ServiceWorker(executionContext, std::move(handle)); | 148 new ServiceWorker(executionContext, std::move(handle)); |
149 newWorker->suspendIfNeeded(); | 149 newWorker->suspendIfNeeded(); |
150 return newWorker; | 150 return newWorker; |
151 } | 151 } |
152 | 152 |
153 ServiceWorker::ServiceWorker(ExecutionContext* executionContext, | 153 ServiceWorker::ServiceWorker(ExecutionContext* executionContext, |
154 std::unique_ptr<WebServiceWorker::Handle> handle) | 154 std::unique_ptr<WebServiceWorker::Handle> handle) |
155 : AbstractWorker(executionContext), | 155 : AbstractWorker(executionContext), |
156 ActiveScriptWrappable(this), | 156 ActiveScriptWrappable<ServiceWorker>(this), |
157 m_handle(std::move(handle)), | 157 m_handle(std::move(handle)), |
158 m_wasStopped(false) { | 158 m_wasStopped(false) { |
159 ASSERT(m_handle); | 159 ASSERT(m_handle); |
160 m_handle->serviceWorker()->setProxy(this); | 160 m_handle->serviceWorker()->setProxy(this); |
161 } | 161 } |
162 | 162 |
163 ServiceWorker::~ServiceWorker() {} | 163 ServiceWorker::~ServiceWorker() {} |
164 | 164 |
165 DEFINE_TRACE(ServiceWorker) { | 165 DEFINE_TRACE(ServiceWorker) { |
166 AbstractWorker::trace(visitor); | 166 AbstractWorker::trace(visitor); |
167 } | 167 } |
168 | 168 |
169 } // namespace blink | 169 } // namespace blink |
OLD | NEW |