| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 const GURL& source_url) {} | 88 const GURL& source_url) {} |
| 89 // Fires when a version transitions from having a controllee to not. | 89 // Fires when a version transitions from having a controllee to not. |
| 90 virtual void OnNoControllees(ServiceWorkerVersion* version) {} | 90 virtual void OnNoControllees(ServiceWorkerVersion* version) {} |
| 91 | 91 |
| 92 protected: | 92 protected: |
| 93 virtual ~Listener() {} | 93 virtual ~Listener() {} |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 ServiceWorkerVersion( | 96 ServiceWorkerVersion( |
| 97 ServiceWorkerRegistration* registration, | 97 ServiceWorkerRegistration* registration, |
| 98 const GURL& script_url, |
| 98 int64 version_id, | 99 int64 version_id, |
| 99 base::WeakPtr<ServiceWorkerContextCore> context); | 100 base::WeakPtr<ServiceWorkerContextCore> context); |
| 100 | 101 |
| 101 int64 version_id() const { return version_id_; } | 102 int64 version_id() const { return version_id_; } |
| 102 int64 registration_id() const { return registration_id_; } | 103 int64 registration_id() const { return registration_id_; } |
| 103 const GURL& script_url() const { return script_url_; } | 104 const GURL& script_url() const { return script_url_; } |
| 104 const GURL& scope() const { return scope_; } | 105 const GURL& scope() const { return scope_; } |
| 105 RunningStatus running_status() const { | 106 RunningStatus running_status() const { |
| 106 return static_cast<RunningStatus>(embedded_worker_->status()); | 107 return static_cast<RunningStatus>(embedded_worker_->status()); |
| 107 } | 108 } |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 bool is_doomed_; | 308 bool is_doomed_; |
| 308 | 309 |
| 309 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 310 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 310 | 311 |
| 311 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 312 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 312 }; | 313 }; |
| 313 | 314 |
| 314 } // namespace content | 315 } // namespace content |
| 315 | 316 |
| 316 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 317 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |