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

Unified Diff: content/browser/service_worker/service_worker_version.h

Issue 140893002: Adding slightly clearer separation between SW and EmbeddedWorker (still incomplete) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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: content/browser/service_worker/service_worker_version.h
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index 46b75bd6866030d1e9edf3b4756be284e10b1adf..3fae7d9cfde0b406c5c4ec9cbd2ad4a9955a7521 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -19,6 +19,7 @@ class EmbeddedWorkerInstance;
class EmbeddedWorkerRegistry;
class ServiceWorkerProviderHost;
class ServiceWorkerRegistration;
+struct ServiceWorkerFetchRequest;
// This class corresponds to a specific version of a ServiceWorker
// script for a given pattern. When a script is upgraded, there may be
@@ -69,6 +70,11 @@ class CONTENT_EXPORT ServiceWorkerVersion
void StartWorker();
void StopWorker();
+ // Sends fetch event to the associated embedded worker.
+ // This immediately returns false if the worker is not running
+ // or sending a message to the child process fails.
+ bool DispatchFetchEvent(const ServiceWorkerFetchRequest& request);
+
// Called when this version is associated to a provider host.
// Non-null |provider_host| must be given.
void OnAssociateProvider(ServiceWorkerProviderHost* provider_host);

Powered by Google App Engine
This is Rietveld 408576698