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_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_ |
6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "content/browser/cache_storage/cache_storage.h" | 13 #include "content/browser/cache_storage/cache_storage.h" |
14 #include "content/public/browser/browser_message_filter.h" | 14 #include "content/public/browser/browser_message_filter.h" |
15 | 15 |
| 16 namespace url { |
| 17 class Origin; |
| 18 } |
| 19 |
16 namespace content { | 20 namespace content { |
17 | 21 |
18 class CacheStorageContextImpl; | 22 class CacheStorageContextImpl; |
19 | 23 |
20 // Handles Cache Storage related messages sent to the browser process from | 24 // Handles Cache Storage related messages sent to the browser process from |
21 // child processes. One host instance exists per child process. All | 25 // child processes. One host instance exists per child process. All |
22 // messages are processed on the IO thread. | 26 // messages are processed on the IO thread. |
23 class CONTENT_EXPORT CacheStorageDispatcherHost : public BrowserMessageFilter { | 27 class CONTENT_EXPORT CacheStorageDispatcherHost : public BrowserMessageFilter { |
24 public: | 28 public: |
25 CacheStorageDispatcherHost(); | 29 CacheStorageDispatcherHost(); |
(...skipping 16 matching lines...) Expand all Loading... |
42 UUIDToBlobDataHandleList; | 46 UUIDToBlobDataHandleList; |
43 | 47 |
44 ~CacheStorageDispatcherHost() override; | 48 ~CacheStorageDispatcherHost() override; |
45 | 49 |
46 // Called by Init() on IO thread. | 50 // Called by Init() on IO thread. |
47 void CreateCacheListener(CacheStorageContextImpl* context); | 51 void CreateCacheListener(CacheStorageContextImpl* context); |
48 | 52 |
49 // The message receiver functions for the CacheStorage API: | 53 // The message receiver functions for the CacheStorage API: |
50 void OnCacheStorageHas(int thread_id, | 54 void OnCacheStorageHas(int thread_id, |
51 int request_id, | 55 int request_id, |
52 const GURL& origin, | 56 const url::Origin& origin, |
53 const base::string16& cache_name); | 57 const base::string16& cache_name); |
54 void OnCacheStorageOpen(int thread_id, | 58 void OnCacheStorageOpen(int thread_id, |
55 int request_id, | 59 int request_id, |
56 const GURL& origin, | 60 const url::Origin& origin, |
57 const base::string16& cache_name); | 61 const base::string16& cache_name); |
58 void OnCacheStorageDelete(int thread_id, | 62 void OnCacheStorageDelete(int thread_id, |
59 int request_id, | 63 int request_id, |
60 const GURL& origin, | 64 const url::Origin& origin, |
61 const base::string16& cache_name); | 65 const base::string16& cache_name); |
62 void OnCacheStorageKeys(int thread_id, int request_id, const GURL& origin); | 66 void OnCacheStorageKeys(int thread_id, |
| 67 int request_id, |
| 68 const url::Origin& origin); |
63 void OnCacheStorageMatch(int thread_id, | 69 void OnCacheStorageMatch(int thread_id, |
64 int request_id, | 70 int request_id, |
65 const GURL& origin, | 71 const url::Origin& origin, |
66 const ServiceWorkerFetchRequest& request, | 72 const ServiceWorkerFetchRequest& request, |
67 const CacheStorageCacheQueryParams& match_params); | 73 const CacheStorageCacheQueryParams& match_params); |
68 | 74 |
69 // The message receiver functions for the Cache API: | 75 // The message receiver functions for the Cache API: |
70 void OnCacheMatch(int thread_id, | 76 void OnCacheMatch(int thread_id, |
71 int request_id, | 77 int request_id, |
72 int cache_id, | 78 int cache_id, |
73 const ServiceWorkerFetchRequest& request, | 79 const ServiceWorkerFetchRequest& request, |
74 const CacheStorageCacheQueryParams& match_params); | 80 const CacheStorageCacheQueryParams& match_params); |
75 void OnCacheKeys(int thread_id, | 81 void OnCacheKeys(int thread_id, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 UUIDToBlobDataHandleList blob_handle_store_; | 168 UUIDToBlobDataHandleList blob_handle_store_; |
163 | 169 |
164 scoped_refptr<CacheStorageContextImpl> context_; | 170 scoped_refptr<CacheStorageContextImpl> context_; |
165 | 171 |
166 DISALLOW_COPY_AND_ASSIGN(CacheStorageDispatcherHost); | 172 DISALLOW_COPY_AND_ASSIGN(CacheStorageDispatcherHost); |
167 }; | 173 }; |
168 | 174 |
169 } // namespace content | 175 } // namespace content |
170 | 176 |
171 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_ | 177 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_ |
OLD | NEW |