Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp

Issue 2842123002: WorkerShadowFetchContext
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
index 760004d3b7180bd68cf456b75b2189e3b42c3ad2..e67f149663ef6dd732524478403048d47ac3f15c 100644
--- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -48,6 +48,7 @@
#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerInspectorProxy.h"
#include "core/workers/WorkerLoaderProxy.h"
+#include "core/workers/WorkerShadowFetchContext.h"
#include "core/workers/WorkerScriptLoader.h"
#include "core/workers/WorkerThreadStartupData.h"
#include "modules/serviceworkers/ServiceWorkerContainerClient.h"
@@ -274,6 +275,16 @@ ThreadableLoadingContext* WebEmbeddedWorkerImpl::GetThreadableLoadingContext() {
return loading_context_;
}
+void WebEmbeddedWorkerImpl::InitializeShadowFetchContext() {
+ DCHECK(IsMainThread());
+ shadow_fetch_context_ = WorkerShadowFetchContext::Create(
+ worker_start_data_.script_url,
+ Platform::Current()->UserAgent(),
+ worker_start_data_.address_space,
+ nullptr, worker_context_client_->CreateServiceWorkerNetworkProvider(),
+ Settings::Create(), ParentFrameTaskRunners::Create(nullptr));
+}
+
void WebEmbeddedWorkerImpl::PrepareShadowPageForLoader() {
// Create 'shadow page', which is never displayed and is used mainly to
// provide a context for loading on the main thread.
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.h ('k') | third_party/WebKit/Source/web/WebSharedWorkerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698