OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_WEB_SERVICE_WORKER_CACHE_STORAGE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_WEB_SERVICE_WORKER_CACHE_STORAGE_IMPL_H_ |
6 #define CONTENT_RENDERER_SERVICE_WORKER_WEB_SERVICE_WORKER_CACHE_STORAGE_IMPL_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_WEB_SERVICE_WORKER_CACHE_STORAGE_IMPL_H_ |
7 | 7 |
8 #include "content/child/thread_safe_sender.h" | 8 #include "content/child/thread_safe_sender.h" |
9 #include "third_party/WebKit/public/platform/WebServiceWorkerCache.h" | 9 #include "third_party/WebKit/public/platform/WebServiceWorkerCache.h" |
10 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h" | 10 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h" |
11 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheStorage.h" | 11 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheStorage.h" |
12 #include "third_party/WebKit/public/platform/WebString.h" | 12 #include "third_party/WebKit/public/platform/WebString.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 class ServiceWorkerCacheStorageDispatcher; | 16 class CacheStorageDispatcher; |
17 class ThreadSafeSender; | 17 class ThreadSafeSender; |
18 | 18 |
19 // This corresponds to an instance of the script-facing CacheStorage object. | 19 // This corresponds to an instance of the script-facing CacheStorage object. |
20 // One exists per script execution context (window, worker) and has an origin | 20 // One exists per script execution context (window, worker) and has an origin |
21 // which provides a namespace for the caches. Script calls to the CacheStorage | 21 // which provides a namespace for the caches. Script calls to the CacheStorage |
22 // object are routed through here to the (per-thread) dispatcher then on to | 22 // object are routed through here to the (per-thread) dispatcher then on to |
23 // the browser, with the origin added to the call parameters. Cache instances | 23 // the browser, with the origin added to the call parameters. Cache instances |
24 // returned by open() calls are minted by and implemented within the code of | 24 // returned by open() calls are minted by and implemented within the code of |
25 // the CacheStorageDispatcher, and include routing information. | 25 // the CacheStorageDispatcher, and include routing information. |
26 class WebServiceWorkerCacheStorageImpl | 26 class WebServiceWorkerCacheStorageImpl |
(...skipping 11 matching lines...) Expand all Loading... |
38 virtual void dispatchDelete(CacheStorageCallbacks* callbacks, | 38 virtual void dispatchDelete(CacheStorageCallbacks* callbacks, |
39 const blink::WebString& cacheName); | 39 const blink::WebString& cacheName); |
40 virtual void dispatchKeys(CacheStorageKeysCallbacks* callbacks); | 40 virtual void dispatchKeys(CacheStorageKeysCallbacks* callbacks); |
41 virtual void dispatchMatch( | 41 virtual void dispatchMatch( |
42 CacheStorageMatchCallbacks* callbacks, | 42 CacheStorageMatchCallbacks* callbacks, |
43 const blink::WebServiceWorkerRequest& request, | 43 const blink::WebServiceWorkerRequest& request, |
44 const blink::WebServiceWorkerCache::QueryParams& query_params); | 44 const blink::WebServiceWorkerCache::QueryParams& query_params); |
45 | 45 |
46 private: | 46 private: |
47 // Helper to return the thread-specific dispatcher. | 47 // Helper to return the thread-specific dispatcher. |
48 ServiceWorkerCacheStorageDispatcher* GetDispatcher() const; | 48 CacheStorageDispatcher* GetDispatcher() const; |
49 | 49 |
50 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 50 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
51 const GURL origin_; | 51 const GURL origin_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerCacheStorageImpl); | 53 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerCacheStorageImpl); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace content | 56 } // namespace content |
57 | 57 |
58 #endif // CONTENT_RENDERER_SERVICE_WORKER_WEB_SERVICE_WORKER_CACHE_STORAGE_IMPL
_H_ | 58 #endif // CONTENT_RENDERER_SERVICE_WORKER_WEB_SERVICE_WORKER_CACHE_STORAGE_IMPL
_H_ |
OLD | NEW |