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

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: rebase on new header type Created 6 years, 3 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 f721781fedc0389fde852dff3349e4a99d9d733c..4f1f4a485644d0bbfb9d4fe7575478adde190ff3 100644
--- a/content/browser/service_worker/service_worker_cache_listener.h
+++ b/content/browser/service_worker/service_worker_cache_listener.h
@@ -12,6 +12,9 @@
namespace content {
+struct ServiceWorkerBatchOperation;
+struct ServiceWorkerCacheQueryParams;
+struct ServiceWorkerFetchRequest;
class ServiceWorkerVersion;
// This class listens for requests on the Cache APIs, and sends response
@@ -26,7 +29,8 @@ class ServiceWorkerCacheListener : public EmbeddedWorkerInstance::Listener {
// From EmbeddedWorkerInstance::Listener:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- // Message receiver functions for CacheStorage API.
+ private:
+ // 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,
@@ -35,8 +39,23 @@ class ServiceWorkerCacheListener : public EmbeddedWorkerInstance::Listener {
const base::string16& cache_name);
void OnCacheStorageKeys(int request_id);
- // TODO(gavinp,jkarlin): Plumb a message up from the renderer saying that the
- // renderer is done with a cache 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);
+ void OnCacheClosed(int cache_id);
private:
typedef int32_t CacheID; // TODO(jkarlin): Bump to 64 bit.

Powered by Google App Engine
This is Rietveld 408576698