| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 class GURL; | 29 class GURL; |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 struct WebCircularGeofencingRegion; | 32 struct WebCircularGeofencingRegion; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace content { | 35 namespace content { |
| 36 | 36 |
| 37 class EmbeddedWorkerRegistry; | 37 class EmbeddedWorkerRegistry; |
| 38 struct PlatformNotificationData; |
| 38 class ServiceWorkerContextCore; | 39 class ServiceWorkerContextCore; |
| 39 class ServiceWorkerProviderHost; | 40 class ServiceWorkerProviderHost; |
| 40 class ServiceWorkerRegistration; | 41 class ServiceWorkerRegistration; |
| 41 class ServiceWorkerVersionInfo; | 42 class ServiceWorkerVersionInfo; |
| 42 struct ShowDesktopNotificationHostMsgParams; | |
| 43 | 43 |
| 44 // This class corresponds to a specific version of a ServiceWorker | 44 // This class corresponds to a specific version of a ServiceWorker |
| 45 // script for a given pattern. When a script is upgraded, there may be | 45 // script for a given pattern. When a script is upgraded, there may be |
| 46 // more than one ServiceWorkerVersion "running" at a time, but only | 46 // more than one ServiceWorkerVersion "running" at a time, but only |
| 47 // one of them is activated. This class connects the actual script with a | 47 // one of them is activated. This class connects the actual script with a |
| 48 // running worker. | 48 // running worker. |
| 49 class CONTENT_EXPORT ServiceWorkerVersion | 49 class CONTENT_EXPORT ServiceWorkerVersion |
| 50 : NON_EXPORTED_BASE(public base::RefCounted<ServiceWorkerVersion>), | 50 : NON_EXPORTED_BASE(public base::RefCounted<ServiceWorkerVersion>), |
| 51 public EmbeddedWorkerInstance::Listener { | 51 public EmbeddedWorkerInstance::Listener { |
| 52 public: | 52 public: |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 void DispatchSyncEvent(const StatusCallback& callback); | 201 void DispatchSyncEvent(const StatusCallback& callback); |
| 202 | 202 |
| 203 // Sends notificationclick event to the associated embedded worker and | 203 // Sends notificationclick event to the associated embedded worker and |
| 204 // asynchronously calls |callback| when it errors out or it gets a response | 204 // asynchronously calls |callback| when it errors out or it gets a response |
| 205 // from the worker to notify completion. | 205 // from the worker to notify completion. |
| 206 // | 206 // |
| 207 // This must be called when the status() is ACTIVATED. | 207 // This must be called when the status() is ACTIVATED. |
| 208 void DispatchNotificationClickEvent( | 208 void DispatchNotificationClickEvent( |
| 209 const StatusCallback& callback, | 209 const StatusCallback& callback, |
| 210 const std::string& notification_id, | 210 const std::string& notification_id, |
| 211 const ShowDesktopNotificationHostMsgParams& notification_data); | 211 const PlatformNotificationData& notification_data); |
| 212 | 212 |
| 213 // Sends push event to the associated embedded worker and asynchronously calls | 213 // Sends push event to the associated embedded worker and asynchronously calls |
| 214 // |callback| when it errors out or it gets a response from the worker to | 214 // |callback| when it errors out or it gets a response from the worker to |
| 215 // notify completion. | 215 // notify completion. |
| 216 // | 216 // |
| 217 // This must be called when the status() is ACTIVATED. | 217 // This must be called when the status() is ACTIVATED. |
| 218 void DispatchPushEvent(const StatusCallback& callback, | 218 void DispatchPushEvent(const StatusCallback& callback, |
| 219 const std::string& data); | 219 const std::string& data); |
| 220 | 220 |
| 221 // Sends geofencing event to the associated embedded worker and asynchronously | 221 // Sends geofencing event to the associated embedded worker and asynchronously |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 bool is_doomed_; | 341 bool is_doomed_; |
| 342 | 342 |
| 343 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 343 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 344 | 344 |
| 345 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 345 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 346 }; | 346 }; |
| 347 | 347 |
| 348 } // namespace content | 348 } // namespace content |
| 349 | 349 |
| 350 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 350 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |