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 <memory> |
7 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
8 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
9 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
10 #include "core/loader/FrameLoaderClient.h" | 11 #include "core/loader/FrameLoaderClient.h" |
11 #include "core/workers/WorkerGlobalScope.h" | 12 #include "core/workers/WorkerGlobalScope.h" |
12 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" | 13 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" |
13 #include <memory> | |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 ServiceWorkerContainerClient::ServiceWorkerContainerClient( | 17 ServiceWorkerContainerClient::ServiceWorkerContainerClient( |
18 Document& document, | 18 Document& document, |
19 std::unique_ptr<WebServiceWorkerProvider> provider) | 19 std::unique_ptr<WebServiceWorkerProvider> provider) |
20 : Supplement<Document>(document), m_provider(std::move(provider)) {} | 20 : Supplement<Document>(document), m_provider(std::move(provider)) {} |
21 | 21 |
22 ServiceWorkerContainerClient::ServiceWorkerContainerClient( | 22 ServiceWorkerContainerClient::ServiceWorkerContainerClient( |
23 WorkerClients& clients, | 23 WorkerClients& clients, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 void provideServiceWorkerContainerClientToWorker( | 62 void provideServiceWorkerContainerClientToWorker( |
63 WorkerClients* clients, | 63 WorkerClients* clients, |
64 std::unique_ptr<WebServiceWorkerProvider> provider) { | 64 std::unique_ptr<WebServiceWorkerProvider> provider) { |
65 clients->provideSupplement( | 65 clients->provideSupplement( |
66 ServiceWorkerContainerClient::supplementName(), | 66 ServiceWorkerContainerClient::supplementName(), |
67 new ServiceWorkerContainerClient(*clients, std::move(provider))); | 67 new ServiceWorkerContainerClient(*clients, std::move(provider))); |
68 } | 68 } |
69 | 69 |
70 } // namespace blink | 70 } // namespace blink |
OLD | NEW |