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

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

Issue 379303002: Content blink::WebServiceWorkerCacheStorage implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remediation 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
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/service_worker/service_worker_cache_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..f1a1bb426b8c8bde12148121e501c8327a8aa52e
--- /dev/null
+++ b/content/browser/service_worker/service_worker_cache_listener.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORES_LISTENER_H_
+#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORES_LISTENER_H_
+
+#include "base/strings/string16.h"
+#include "content/browser/service_worker/embedded_worker_instance.h"
+
+namespace content {
+
+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 {
+ public:
+ explicit ServiceWorkerStoresListener(ServiceWorkerVersion* version);
+ virtual ~ServiceWorkerStoresListener();
+
+ // From EmbeddedWorkerInstance::Listener:
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ // Message receiver functions for 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,
+ const base::string16& cache_name);
+ void OnCacheStorageDelete(int request_id,
+ const base::string16& cache_name);
+ void OnCacheStorageKeys(int request_id);
+
+ private:
+ void Send(const IPC::Message& message);
+
+ // The ServiceWorkerVersion to use for messaging back to the renderer thread.
+ ServiceWorkerVersion* version_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORES_LISTENER_H_
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/service_worker/service_worker_cache_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698