| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 virtual void OnControlleeAdded(ServiceWorkerVersion* version, | 117 virtual void OnControlleeAdded(ServiceWorkerVersion* version, |
| 118 ServiceWorkerProviderHost* provider_host) {} | 118 ServiceWorkerProviderHost* provider_host) {} |
| 119 virtual void OnControlleeRemoved(ServiceWorkerVersion* version, | 119 virtual void OnControlleeRemoved(ServiceWorkerVersion* version, |
| 120 ServiceWorkerProviderHost* provider_host) { | 120 ServiceWorkerProviderHost* provider_host) { |
| 121 } | 121 } |
| 122 // Fires when a version transitions from having a controllee to not. | 122 // Fires when a version transitions from having a controllee to not. |
| 123 virtual void OnNoControllees(ServiceWorkerVersion* version) {} | 123 virtual void OnNoControllees(ServiceWorkerVersion* version) {} |
| 124 virtual void OnCachedMetadataUpdated(ServiceWorkerVersion* version) {} | 124 virtual void OnCachedMetadataUpdated(ServiceWorkerVersion* version) {} |
| 125 | 125 |
| 126 protected: | 126 protected: |
| 127 Listener() = default; |
| 127 virtual ~Listener() {} | 128 virtual ~Listener() {} |
| 128 }; | 129 }; |
| 129 | 130 |
| 130 ServiceWorkerVersion( | 131 ServiceWorkerVersion( |
| 131 ServiceWorkerRegistration* registration, | 132 ServiceWorkerRegistration* registration, |
| 132 const GURL& script_url, | 133 const GURL& script_url, |
| 133 int64 version_id, | 134 int64 version_id, |
| 134 base::WeakPtr<ServiceWorkerContextCore> context); | 135 base::WeakPtr<ServiceWorkerContextCore> context); |
| 135 | 136 |
| 136 int64 version_id() const { return version_id_; } | 137 int64 version_id() const { return version_id_; } |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 const bool should_exclude_from_uma_ = false; | 659 const bool should_exclude_from_uma_ = false; |
| 659 | 660 |
| 660 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 661 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 661 | 662 |
| 662 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 663 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 663 }; | 664 }; |
| 664 | 665 |
| 665 } // namespace content | 666 } // namespace content |
| 666 | 667 |
| 667 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 668 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |