| 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/ServiceWorkerContainerClient.h" | 5 #include "modules/serviceworkers/ServiceWorkerContainerClient.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/loader/FrameLoaderClient.h" | 10 #include "core/loader/FrameLoaderClient.h" |
| 11 #include "core/workers/WorkerGlobalScope.h" | 11 #include "core/workers/WorkerGlobalScope.h" |
| 12 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" | 12 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 RawPtr<ServiceWorkerContainerClient> ServiceWorkerContainerClient::create(PassOw
nPtr<WebServiceWorkerProvider> provider) | 16 ServiceWorkerContainerClient* ServiceWorkerContainerClient::create(PassOwnPtr<We
bServiceWorkerProvider> provider) |
| 17 { | 17 { |
| 18 return new ServiceWorkerContainerClient(provider); | 18 return new ServiceWorkerContainerClient(provider); |
| 19 } | 19 } |
| 20 | 20 |
| 21 ServiceWorkerContainerClient::ServiceWorkerContainerClient(PassOwnPtr<WebService
WorkerProvider> provider) | 21 ServiceWorkerContainerClient::ServiceWorkerContainerClient(PassOwnPtr<WebService
WorkerProvider> provider) |
| 22 : m_provider(provider) | 22 : m_provider(provider) |
| 23 { | 23 { |
| 24 } | 24 } |
| 25 | 25 |
| 26 ServiceWorkerContainerClient::~ServiceWorkerContainerClient() | 26 ServiceWorkerContainerClient::~ServiceWorkerContainerClient() |
| (...skipping 23 matching lines...) Expand all Loading... |
| 50 } | 50 } |
| 51 return client; | 51 return client; |
| 52 } | 52 } |
| 53 | 53 |
| 54 void provideServiceWorkerContainerClientToWorker(WorkerClients* clients, PassOwn
Ptr<WebServiceWorkerProvider> provider) | 54 void provideServiceWorkerContainerClientToWorker(WorkerClients* clients, PassOwn
Ptr<WebServiceWorkerProvider> provider) |
| 55 { | 55 { |
| 56 clients->provideSupplement(ServiceWorkerContainerClient::supplementName(), S
erviceWorkerContainerClient::create(provider)); | 56 clients->provideSupplement(ServiceWorkerContainerClient::supplementName(), S
erviceWorkerContainerClient::create(provider)); |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // namespace blink | 59 } // namespace blink |
| OLD | NEW |