OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 // ServiceWorkerContext implementation: | 85 // ServiceWorkerContext implementation: |
86 void RegisterServiceWorker(const GURL& pattern, | 86 void RegisterServiceWorker(const GURL& pattern, |
87 const GURL& script_url, | 87 const GURL& script_url, |
88 const ResultCallback& continuation) override; | 88 const ResultCallback& continuation) override; |
89 void UnregisterServiceWorker(const GURL& pattern, | 89 void UnregisterServiceWorker(const GURL& pattern, |
90 const ResultCallback& continuation) override; | 90 const ResultCallback& continuation) override; |
91 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override; | 91 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override; |
92 void DeleteForOrigin(const GURL& origin, | 92 void DeleteForOrigin(const GURL& origin, |
93 const ResultCallback& callback) override; | 93 const ResultCallback& callback) override; |
| 94 void SetForceUpdateOnPageLoadForOrigin(const GURL& origin) override; |
94 void CheckHasServiceWorker( | 95 void CheckHasServiceWorker( |
95 const GURL& url, | 96 const GURL& url, |
96 const GURL& other_url, | 97 const GURL& other_url, |
97 const CheckHasServiceWorkerCallback& callback) override; | 98 const CheckHasServiceWorkerCallback& callback) override; |
98 void StopAllServiceWorkersForOrigin(const GURL& origin) override; | 99 void StopAllServiceWorkersForOrigin(const GURL& origin) override; |
99 void ClearAllServiceWorkersForTest(const base::Closure& callback) override; | 100 void ClearAllServiceWorkersForTest(const base::Closure& callback) override; |
100 | 101 |
101 ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id); | 102 ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id); |
102 ServiceWorkerVersion* GetLiveVersion(int64_t version_id); | 103 ServiceWorkerVersion* GetLiveVersion(int64_t version_id); |
103 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo(); | 104 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 void OnStatusChangedForFindReadyRegistration( | 179 void OnStatusChangedForFindReadyRegistration( |
179 const FindRegistrationCallback& callback, | 180 const FindRegistrationCallback& callback, |
180 const scoped_refptr<ServiceWorkerRegistration>& registration); | 181 const scoped_refptr<ServiceWorkerRegistration>& registration); |
181 | 182 |
182 void DidDeleteAndStartOver(ServiceWorkerStatusCode status); | 183 void DidDeleteAndStartOver(ServiceWorkerStatusCode status); |
183 | 184 |
184 void DidGetAllRegistrationsForGetAllOrigins( | 185 void DidGetAllRegistrationsForGetAllOrigins( |
185 const GetUsageInfoCallback& callback, | 186 const GetUsageInfoCallback& callback, |
186 const std::vector<ServiceWorkerRegistrationInfo>& registrations); | 187 const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
187 | 188 |
| 189 void DidGetRegistrationsForForceUpdateForOrigin( |
| 190 const std::vector<scoped_refptr<ServiceWorkerRegistration>>& |
| 191 registrations); |
| 192 |
188 void DidCheckHasServiceWorker(const CheckHasServiceWorkerCallback& callback, | 193 void DidCheckHasServiceWorker(const CheckHasServiceWorkerCallback& callback, |
189 bool has_service_worker); | 194 bool has_service_worker); |
190 | 195 |
191 void DidFindRegistrationForUpdate( | 196 void DidFindRegistrationForUpdate( |
192 ServiceWorkerStatusCode status, | 197 ServiceWorkerStatusCode status, |
193 const scoped_refptr<content::ServiceWorkerRegistration>& registration); | 198 const scoped_refptr<content::ServiceWorkerRegistration>& registration); |
194 | 199 |
195 // The core context is only for use on the IO thread. | 200 // The core context is only for use on the IO thread. |
196 // Can be null before/during init, during/after shutdown, and after | 201 // Can be null before/during init, during/after shutdown, and after |
197 // DeleteAndStartOver fails. | 202 // DeleteAndStartOver fails. |
(...skipping 13 matching lines...) Expand all Loading... |
211 | 216 |
212 // The ResourceContext associated with this context. | 217 // The ResourceContext associated with this context. |
213 ResourceContext* resource_context_; | 218 ResourceContext* resource_context_; |
214 | 219 |
215 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); | 220 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); |
216 }; | 221 }; |
217 | 222 |
218 } // namespace content | 223 } // namespace content |
219 | 224 |
220 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 225 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
OLD | NEW |