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

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

Issue 474593002: content::WebServiceWorkerCache implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: narrower Created 6 years, 4 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_cache_listener.h
diff --git a/content/browser/service_worker/service_worker_cache_listener.h b/content/browser/service_worker/service_worker_cache_listener.h
index 5bc85d12d45da69c9271ae38b8fb50430ca6bfe9..2c3384433958ca9ce9d77c2f527b58af82196b83 100644
--- a/content/browser/service_worker/service_worker_cache_listener.h
+++ b/content/browser/service_worker/service_worker_cache_listener.h
@@ -10,20 +10,23 @@
namespace content {
+struct ServiceWorkerBatchOperation;
+struct ServiceWorkerCacheQueryParams;
+struct ServiceWorkerFetchRequest;
class ServiceWorkerVersion;
// This class listens for requests on the Store APIs, and sends response
// messages to the renderer process. There is one instance per
// ServiceWorkerVersion instance.
-class ServiceWorkerStoresListener : public EmbeddedWorkerInstance::Listener {
+class ServiceWorkerCacheListener : public EmbeddedWorkerInstance::Listener {
public:
- explicit ServiceWorkerStoresListener(ServiceWorkerVersion* version);
- virtual ~ServiceWorkerStoresListener();
+ explicit ServiceWorkerCacheListener(ServiceWorkerVersion* version);
+ virtual ~ServiceWorkerCacheListener();
// From EmbeddedWorkerInstance::Listener:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- // Message receiver functions for CacheStorage API.
+ // The message receiver functions for the CacheStorage API:
void OnCacheStorageGet(int request_id, const base::string16& cache_name);
void OnCacheStorageHas(int request_id, const base::string16& cache_name);
void OnCacheStorageCreate(int request_id,
@@ -32,6 +35,23 @@ class ServiceWorkerStoresListener : public EmbeddedWorkerInstance::Listener {
const base::string16& cache_name);
void OnCacheStorageKeys(int request_id);
+ // The message receiver functions for the Cache API:
+ void OnCacheMatch(int request_id,
+ int cache_id,
+ const ServiceWorkerFetchRequest& request,
+ const ServiceWorkerCacheQueryParams& match_params);
+ void OnCacheMatchAll(int request_id,
+ int cache_id,
+ const ServiceWorkerFetchRequest& request,
+ const ServiceWorkerCacheQueryParams& match_params);
+ void OnCacheKeys(int request_id,
+ int cache_id,
+ const ServiceWorkerFetchRequest& request,
+ const ServiceWorkerCacheQueryParams& match_params);
+ void OnCacheBatch(int request_id,
+ int cache_id,
+ const std::vector<ServiceWorkerBatchOperation>& operations);
+
private:
void Send(const IPC::Message& message);

Powered by Google App Engine
This is Rietveld 408576698