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,
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);
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_;