Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / renderer / service_worker / service_worker_cache_storage_dispatcher.h
index c6be534..41aa817 100644 (file)
@@ -38,19 +38,16 @@ class ServiceWorkerCacheStorageDispatcher
   bool OnMessageReceived(const IPC::Message& message);
 
   // Message handlers for CacheStorage messages from the browser process.
-  void OnCacheStorageGetSuccess(int request_id, int cache_id);
   void OnCacheStorageHasSuccess(int request_id);
-  void OnCacheStorageCreateSuccess(int request_id, int cache_id);
+  void OnCacheStorageOpenSuccess(int request_id, int cache_id);
   void OnCacheStorageDeleteSuccess(int request_id);
   void OnCacheStorageKeysSuccess(int request_id,
                                  const std::vector<base::string16>& keys);
 
-  void OnCacheStorageGetError(int request_id,
-                              blink::WebServiceWorkerCacheError reason);
   void OnCacheStorageHasError(int request_id,
                               blink::WebServiceWorkerCacheError reason);
-  void OnCacheStorageCreateError(int request_id,
-                                 blink::WebServiceWorkerCacheError reason);
+  void OnCacheStorageOpenError(int request_id,
+                               blink::WebServiceWorkerCacheError reason);
   void OnCacheStorageDeleteError(int request_id,
                                  blink::WebServiceWorkerCacheError reason);
   void OnCacheStorageKeysError(int request_id,
@@ -78,12 +75,10 @@ class ServiceWorkerCacheStorageDispatcher
                          blink::WebServiceWorkerCacheError reason);
 
   // From WebServiceWorkerCacheStorage:
-  virtual void dispatchGet(CacheStorageWithCacheCallbacks* callbacks,
-                           const blink::WebString& cacheName);
   virtual void dispatchHas(CacheStorageCallbacks* callbacks,
                            const blink::WebString& cacheName);
-  virtual void dispatchCreate(CacheStorageWithCacheCallbacks* callbacks,
-                              const blink::WebString& cacheName);
+  virtual void dispatchOpen(CacheStorageWithCacheCallbacks* callbacks,
+                            const blink::WebString& cacheName);
   virtual void dispatchDelete(CacheStorageCallbacks* callbacks,
                               const blink::WebString& cacheName);
   virtual void dispatchKeys(CacheStorageKeysCallbacks* callbacks);
@@ -129,12 +124,18 @@ class ServiceWorkerCacheStorageDispatcher
   typedef IDMap<blink::WebServiceWorkerCache::CacheWithRequestsCallbacks,
                 IDMapOwnPointer> WithRequestsCallbacksMap;
 
+  void PopulateWebResponseFromResponse(
+      const ServiceWorkerResponse& response,
+      blink::WebServiceWorkerResponse* web_response);
+
+  blink::WebVector<blink::WebServiceWorkerResponse> WebResponsesFromResponses(
+      const std::vector<ServiceWorkerResponse>& responses);
+
   // Not owned. The script context containing this object.
   ServiceWorkerScriptContext* script_context_;
 
-  WithCacheCallbacksMap get_callbacks_;
   CallbacksMap has_callbacks_;
-  WithCacheCallbacksMap create_callbacks_;
+  WithCacheCallbacksMap open_callbacks_;
   CallbacksMap delete_callbacks_;
   KeysCallbacksMap keys_callbacks_;