Index: third_party/WebKit/Source/core/workers/Worker.cpp |
diff --git a/third_party/WebKit/Source/core/workers/Worker.cpp b/third_party/WebKit/Source/core/workers/Worker.cpp |
index 8232da6c7bd61b31e99dc668522f6c67fd4e4b24..9d70e84eef7b600d2444a139603e5517f5104cfa 100644 |
--- a/third_party/WebKit/Source/core/workers/Worker.cpp |
+++ b/third_party/WebKit/Source/core/workers/Worker.cpp |
@@ -8,11 +8,16 @@ |
#include "core/dom/Document.h" |
#include "core/dom/ExceptionCode.h" |
#include "core/frame/UseCounter.h" |
-#include "core/workers/DedicatedWorkerMessagingProxyProvider.h" |
-#include "core/workers/InProcessWorkerMessagingProxy.h" |
+#include "core/frame/WebLocalFrameBase.h" |
+#include "core/workers/DedicatedWorkerMessagingProxy.h" |
+#include "core/workers/WorkerContentSettingsClient.h" |
+#include "public/platform/WebContentSettingsClient.h" |
+#include "public/web/WebFrameClient.h" |
namespace blink { |
+template class CORE_TEMPLATE_EXPORT WorkerClientsInitializer<Worker>; |
+ |
Worker::Worker(ExecutionContext* context) : InProcessWorkerBase(context) {} |
Worker* Worker::Create(ExecutionContext* context, |
@@ -43,10 +48,14 @@ const AtomicString& Worker::InterfaceName() const { |
InProcessWorkerMessagingProxy* Worker::CreateInProcessWorkerMessagingProxy( |
ExecutionContext* context) { |
Document* document = ToDocument(context); |
- DedicatedWorkerMessagingProxyProvider* proxy_provider = |
- DedicatedWorkerMessagingProxyProvider::From(*document->GetPage()); |
- DCHECK(proxy_provider); |
- return proxy_provider->CreateWorkerMessagingProxy(this); |
+ WebLocalFrameBase* web_frame = |
+ WebLocalFrameBase::FromFrame(document->GetFrame()); |
+ |
+ WorkerClients* worker_clients = WorkerClients::Create(); |
+ WorkerClientsInitializer<Worker>::Run(worker_clients); |
+ ProvideContentSettingsClientToWorker( |
+ worker_clients, web_frame->Client()->CreateWorkerContentSettingsClient()); |
+ return new DedicatedWorkerMessagingProxy(this, worker_clients); |
} |
} // namespace blink |