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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 // Sets the worker thread id and flushes queued events. | 216 // Sets the worker thread id and flushes queued events. |
| 217 void SetReadyToSendMessagesToWorker(int render_thread_id); | 217 void SetReadyToSendMessagesToWorker(int render_thread_id); |
| 218 | 218 |
| 219 void AddMatchingRegistration(ServiceWorkerRegistration* registration); | 219 void AddMatchingRegistration(ServiceWorkerRegistration* registration); |
| 220 void RemoveMatchingRegistration(ServiceWorkerRegistration* registration); | 220 void RemoveMatchingRegistration(ServiceWorkerRegistration* registration); |
| 221 | 221 |
| 222 // An optimized implementation of [[Match Service Worker Registration]] | 222 // An optimized implementation of [[Match Service Worker Registration]] |
| 223 // for current document. | 223 // for current document. |
| 224 ServiceWorkerRegistration* MatchRegistration() const; | 224 ServiceWorkerRegistration* MatchRegistration() const; |
| 225 | 225 |
| 226 // Copy matched registrations for document generated by shift-reload. | |
| 227 void CopyMatchingRegistrations(); | |
|
falken
2015/06/24 02:24:26
nit: we're not really copying it now, just adding.
xiang
2015/06/25 05:37:32
Done.
| |
| 228 | |
| 226 // Called when our controller has been terminated and doomed due to an | 229 // Called when our controller has been terminated and doomed due to an |
| 227 // exceptional condition like it could no longer be read from the script | 230 // exceptional condition like it could no longer be read from the script |
| 228 // cache. | 231 // cache. |
| 229 void NotifyControllerLost(); | 232 void NotifyControllerLost(); |
| 230 | 233 |
| 231 private: | 234 private: |
| 232 friend class ServiceWorkerProviderHostTest; | 235 friend class ServiceWorkerProviderHostTest; |
| 233 friend class ServiceWorkerWriteToCacheJobTest; | 236 friend class ServiceWorkerWriteToCacheJobTest; |
| 234 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, Update_SameScript); | 237 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, Update_SameScript); |
| 235 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, | 238 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWriteToCacheJobTest, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 310 bool allow_association_; | 313 bool allow_association_; |
| 311 | 314 |
| 312 std::vector<base::Closure> queued_events_; | 315 std::vector<base::Closure> queued_events_; |
| 313 | 316 |
| 314 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 317 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 315 }; | 318 }; |
| 316 | 319 |
| 317 } // namespace content | 320 } // namespace content |
| 318 | 321 |
| 319 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 322 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |