| 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_VERSION_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // statuses will result in an error SERVICE_WORKER_ERROR_FAILED. | 204 // statuses will result in an error SERVICE_WORKER_ERROR_FAILED. |
| 205 void DispatchFetchEvent(const ServiceWorkerFetchRequest& request, | 205 void DispatchFetchEvent(const ServiceWorkerFetchRequest& request, |
| 206 const base::Closure& prepare_callback, | 206 const base::Closure& prepare_callback, |
| 207 const FetchCallback& fetch_callback); | 207 const FetchCallback& fetch_callback); |
| 208 | 208 |
| 209 // Sends sync event to the associated embedded worker and asynchronously calls | 209 // Sends sync event to the associated embedded worker and asynchronously calls |
| 210 // |callback| when it errors out or it gets a response from the worker to | 210 // |callback| when it errors out or it gets a response from the worker to |
| 211 // notify completion. | 211 // notify completion. |
| 212 // | 212 // |
| 213 // This must be called when the status() is ACTIVATED. | 213 // This must be called when the status() is ACTIVATED. |
| 214 void DispatchSyncEvent(const StatusCallback& callback); | 214 void DispatchSyncEvent(SyncRegistrationPtr registration, |
| 215 const StatusCallback& callback); |
| 215 | 216 |
| 216 // Sends notificationclick event to the associated embedded worker and | 217 // Sends notificationclick event to the associated embedded worker and |
| 217 // asynchronously calls |callback| when it errors out or it gets a response | 218 // asynchronously calls |callback| when it errors out or it gets a response |
| 218 // from the worker to notify completion. | 219 // from the worker to notify completion. |
| 219 // | 220 // |
| 220 // This must be called when the status() is ACTIVATED. | 221 // This must be called when the status() is ACTIVATED. |
| 221 void DispatchNotificationClickEvent( | 222 void DispatchNotificationClickEvent( |
| 222 const StatusCallback& callback, | 223 const StatusCallback& callback, |
| 223 int64_t persistent_notification_id, | 224 int64_t persistent_notification_id, |
| 224 const PlatformNotificationData& notification_data); | 225 const PlatformNotificationData& notification_data); |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 scoped_ptr<Metrics> metrics_; | 621 scoped_ptr<Metrics> metrics_; |
| 621 | 622 |
| 622 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 623 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 623 | 624 |
| 624 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 625 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 625 }; | 626 }; |
| 626 | 627 |
| 627 } // namespace content | 628 } // namespace content |
| 628 | 629 |
| 629 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 630 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |