| 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_REGISTRATION_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 int64 registration_id, | 47 int64 registration_id, |
| 48 base::WeakPtr<ServiceWorkerContextCore> context); | 48 base::WeakPtr<ServiceWorkerContextCore> context); |
| 49 | 49 |
| 50 int64 id() const { return registration_id_; } | 50 int64 id() const { return registration_id_; } |
| 51 const GURL& pattern() const { return pattern_; } | 51 const GURL& pattern() const { return pattern_; } |
| 52 | 52 |
| 53 bool is_deleted() const { return is_deleted_; } | 53 bool is_deleted() const { return is_deleted_; } |
| 54 void set_is_deleted(bool deleted) { is_deleted_ = deleted; } | 54 void set_is_deleted(bool deleted) { is_deleted_ = deleted; } |
| 55 | 55 |
| 56 bool is_uninstalling() const { return is_uninstalling_; } | 56 bool is_uninstalling() const { return is_uninstalling_; } |
| 57 bool is_uninstalled() const { return is_uninstalled_; } |
| 57 | 58 |
| 58 ServiceWorkerVersion* active_version() const { | 59 ServiceWorkerVersion* active_version() const { |
| 59 return active_version_.get(); | 60 return active_version_.get(); |
| 60 } | 61 } |
| 61 | 62 |
| 62 ServiceWorkerVersion* waiting_version() const { | 63 ServiceWorkerVersion* waiting_version() const { |
| 63 return waiting_version_.get(); | 64 return waiting_version_.get(); |
| 64 } | 65 } |
| 65 | 66 |
| 66 ServiceWorkerVersion* installing_version() const { | 67 ServiceWorkerVersion* installing_version() const { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 void Clear(); | 134 void Clear(); |
| 134 | 135 |
| 135 void OnRestoreFinished(const StatusCallback& callback, | 136 void OnRestoreFinished(const StatusCallback& callback, |
| 136 scoped_refptr<ServiceWorkerVersion> version, | 137 scoped_refptr<ServiceWorkerVersion> version, |
| 137 ServiceWorkerStatusCode status); | 138 ServiceWorkerStatusCode status); |
| 138 | 139 |
| 139 const GURL pattern_; | 140 const GURL pattern_; |
| 140 const int64 registration_id_; | 141 const int64 registration_id_; |
| 141 bool is_deleted_; | 142 bool is_deleted_; |
| 142 bool is_uninstalling_; | 143 bool is_uninstalling_; |
| 144 bool is_uninstalled_; |
| 143 bool should_activate_when_ready_; | 145 bool should_activate_when_ready_; |
| 144 base::Time last_update_check_; | 146 base::Time last_update_check_; |
| 145 scoped_refptr<ServiceWorkerVersion> active_version_; | 147 scoped_refptr<ServiceWorkerVersion> active_version_; |
| 146 scoped_refptr<ServiceWorkerVersion> waiting_version_; | 148 scoped_refptr<ServiceWorkerVersion> waiting_version_; |
| 147 scoped_refptr<ServiceWorkerVersion> installing_version_; | 149 scoped_refptr<ServiceWorkerVersion> installing_version_; |
| 148 ObserverList<Listener> listeners_; | 150 ObserverList<Listener> listeners_; |
| 149 base::WeakPtr<ServiceWorkerContextCore> context_; | 151 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 150 | 152 |
| 151 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 153 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
| 152 }; | 154 }; |
| 153 | 155 |
| 154 } // namespace content | 156 } // namespace content |
| 155 | 157 |
| 156 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 158 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| OLD | NEW |