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

Unified Diff: public/web/WebServiceWorkerContextClient.h

Issue 194073002: Identify service worker version at main resource load time (BlinkSide) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | public/web/WebServiceWorkerNetworkProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebServiceWorkerContextClient.h
diff --git a/public/web/WebServiceWorkerContextClient.h b/public/web/WebServiceWorkerContextClient.h
index d0c87b41664bb2668748feb73ccfd059e84e5c05..540cb061239c36da46c3e21c376eec706843c03c 100644
--- a/public/web/WebServiceWorkerContextClient.h
+++ b/public/web/WebServiceWorkerContextClient.h
@@ -35,14 +35,17 @@
namespace blink {
+class WebDataSource;
class WebString;
class WebServiceWorkerContextProxy;
+class WebServiceWorkerNetworkProvider;
class WebServiceWorkerResponse;
-// This interface is implemented by the client. It is suppoed to be created
+// 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 to be owned
// by a newly created WorkerGlobalScope. All methods of this class, except
-// for workerContextFailedToStart(), are called on the worker thread.
+// for createServiceWorkerNetworkProvider() and workerContextFailedToStart(),
+// are called on the worker thread.
// FIXME: Split this into EmbeddedWorkerContextClient and
// ServiceWorkerScriptContextClient when we decide to use EmbeddedWorker
// framework for other implementation (like SharedWorker).
@@ -84,6 +87,9 @@ public:
// should fallback to native fetch.
virtual void didHandleFetchEvent(int fetchEventID) { }
virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerResponse& response) { }
+
+ // Ownership of the returned object is transferred to the caller.
+ virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider(blink::WebDataSource*) { return 0; }
};
} // namespace blink
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | public/web/WebServiceWorkerNetworkProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698