Chromium Code Reviews| Index: third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp b/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp |
| index cf0153e0110d1db11f297b6e16b069a7c93852cc..bbfa0c8d9104078bcddf99e7aa562165087ba93a 100644 |
| --- a/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp |
| +++ b/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp |
| @@ -31,10 +31,12 @@ |
| #include "web/DedicatedWorkerMessagingProxyProviderImpl.h" |
| #include "core/dom/Document.h" |
| +#include "core/loader/WorkerFetchContext.h" |
| #include "core/workers/DedicatedWorkerMessagingProxy.h" |
| #include "core/workers/Worker.h" |
| #include "core/workers/WorkerClients.h" |
| #include "platform/wtf/PtrUtil.h" |
| +#include "public/platform/Platform.h" |
| #include "public/platform/WebContentSettingsClient.h" |
| #include "public/platform/WebString.h" |
| #include "public/web/WebFrameClient.h" |
| @@ -67,6 +69,15 @@ DedicatedWorkerMessagingProxyProviderImpl::CreateWorkerMessagingProxy( |
| worker_clients, |
| WTF::WrapUnique( |
| web_frame->Client()->CreateWorkerContentSettingsClientProxy())); |
| + std::unique_ptr<WebWorkerFetchContext> web_worker_fetch_context = |
| + Platform::Current()->CreateWorkerFetchContext(); |
| + // |web_worker_fetch_context| is null if off-main-thread-fetch is disabled. |
|
nhiroki
2017/04/18 07:56:41
If possible, I'd prefer to avoid checking the feat
horo
2017/04/18 12:53:34
Done.
|
| + if (web_worker_fetch_context) { |
| + // TODO(horo): Set more information about the context (ex: Service Worker |
| + // provider ID) to |web_worker_fetch_context|. |
| + ProvideWorkerFetchContextToWorker(worker_clients, |
| + std::move(web_worker_fetch_context)); |
|
kinuko
2017/04/18 08:35:37
I really don't think we need to use supplement her
horo
2017/04/18 12:53:34
Acknowledged.
|
| + } |
| // FIXME: call provideServiceWorkerContainerClientToWorker here when we |
| // support ServiceWorker in dedicated workers (http://crbug.com/371690) |
| return new DedicatedWorkerMessagingProxy(worker, worker_clients); |