Chromium Code Reviews| 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_PROVIDER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 // Sets the worker thread id and flushes queued events. | 213 // Sets the worker thread id and flushes queued events. |
| 214 void SetReadyToSendMessagesToWorker(int render_thread_id); | 214 void SetReadyToSendMessagesToWorker(int render_thread_id); |
| 215 | 215 |
| 216 void AddMatchingRegistration(ServiceWorkerRegistration* registration); | 216 void AddMatchingRegistration(ServiceWorkerRegistration* registration); |
| 217 void RemoveMatchingRegistration(ServiceWorkerRegistration* registration); | 217 void RemoveMatchingRegistration(ServiceWorkerRegistration* registration); |
| 218 | 218 |
| 219 // An optimized implementation of [[Match Service Worker Registration]] | 219 // An optimized implementation of [[Match Service Worker Registration]] |
| 220 // for current document. | 220 // for current document. |
| 221 ServiceWorkerRegistration* MatchRegistration() const; | 221 ServiceWorkerRegistration* MatchRegistration() const; |
| 222 | 222 |
| 223 // Copy matched registrations from the old one for force-refresh generated | |
|
falken
2015/06/17 15:08:35
"the old one" is vague here... "from the old Servi
xiang
2015/06/19 07:43:24
Done.
| |
| 224 // document. | |
| 225 void CopyMatchingRegistrations(); | |
| 226 | |
| 223 // Called when our controller has been terminated and doomed due to an | 227 // Called when our controller has been terminated and doomed due to an |
| 224 // exceptional condition like it could no longer be read from the script | 228 // exceptional condition like it could no longer be read from the script |
| 225 // cache. | 229 // cache. |
| 226 void NotifyControllerLost(); | 230 void NotifyControllerLost(); |
| 227 | 231 |
| 228 private: | 232 private: |
| 229 friend class ServiceWorkerProviderHostTest; | 233 friend class ServiceWorkerProviderHostTest; |
| 230 friend class ServiceWorkerWriteToCacheJobTest; | 234 friend class ServiceWorkerWriteToCacheJobTest; |
| 231 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, Update_SameScript); | 235 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, Update_SameScript); |
| 232 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, | 236 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 bool allow_association_; | 311 bool allow_association_; |
| 308 | 312 |
| 309 std::vector<base::Closure> queued_events_; | 313 std::vector<base::Closure> queued_events_; |
| 310 | 314 |
| 311 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 315 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 312 }; | 316 }; |
| 313 | 317 |
| 314 } // namespace content | 318 } // namespace content |
| 315 | 319 |
| 316 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 320 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |