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

Unified Diff: third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h

Issue 2804843005: Implement the infrastructure of creating WorkerFetchContext in worker global scope. (Closed)
Patch Set: incorporated kinuko's comment Created 3 years, 8 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/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
diff --git a/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h b/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
index 4b8c565edbc49ab90c28183cf91ca6a8bc4c2700..16cceca84b8e2458b83f8f46a89bd8efcee5c6c3 100644
--- a/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
+++ b/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
@@ -51,6 +51,7 @@ class WebServiceWorkerNetworkProvider;
class WebServiceWorkerProvider;
class WebServiceWorkerResponse;
class WebString;
+class WebWorkerFetchContext;
// This interface is implemented by the client. It is supposed to be created
// on the main thread and then passed on to the worker thread by a newly
@@ -232,6 +233,13 @@ class WebServiceWorkerContextClient {
return nullptr;
}
+ // Creates a WebWorkerFetchContext for a service worker. Ownership of the
+ // returned object is transferred to the caller. This is called on the main
+ // thread. This is used only when off-main-thread-fetch is enabled.
+ virtual blink::WebWorkerFetchContext* CreateServiceWorkerFetchContext() {
nhiroki 2017/04/20 04:16:07 How about returning std::unique_ptr<WebWorkerFetch
horo 2017/04/20 08:35:43 Done.
+ return nullptr;
+ }
+
// Ownership of the returned object is transferred to the caller.
// This is called on the main thread.
virtual WebServiceWorkerProvider* CreateServiceWorkerProvider() {

Powered by Google App Engine
This is Rietveld 408576698