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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool is_uninstalled() const { return is_uninstalled_; } |
58 | 58 |
| 59 size_t resources_total_size_bytes() const { |
| 60 return resources_total_size_bytes_; |
| 61 } |
| 62 |
| 63 void set_resources_total_size_bytes(size_t resources_total_size_bytes) { |
| 64 resources_total_size_bytes_ = resources_total_size_bytes; |
| 65 } |
| 66 |
59 ServiceWorkerVersion* active_version() const { | 67 ServiceWorkerVersion* active_version() const { |
60 return active_version_.get(); | 68 return active_version_.get(); |
61 } | 69 } |
62 | 70 |
63 ServiceWorkerVersion* waiting_version() const { | 71 ServiceWorkerVersion* waiting_version() const { |
64 return waiting_version_.get(); | 72 return waiting_version_.get(); |
65 } | 73 } |
66 | 74 |
67 ServiceWorkerVersion* installing_version() const { | 75 ServiceWorkerVersion* installing_version() const { |
68 return installing_version_.get(); | 76 return installing_version_.get(); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 scoped_refptr<ServiceWorkerVersion> version, | 145 scoped_refptr<ServiceWorkerVersion> version, |
138 ServiceWorkerStatusCode status); | 146 ServiceWorkerStatusCode status); |
139 | 147 |
140 const GURL pattern_; | 148 const GURL pattern_; |
141 const int64 registration_id_; | 149 const int64 registration_id_; |
142 bool is_deleted_; | 150 bool is_deleted_; |
143 bool is_uninstalling_; | 151 bool is_uninstalling_; |
144 bool is_uninstalled_; | 152 bool is_uninstalled_; |
145 bool should_activate_when_ready_; | 153 bool should_activate_when_ready_; |
146 base::Time last_update_check_; | 154 base::Time last_update_check_; |
| 155 size_t resources_total_size_bytes_; |
147 scoped_refptr<ServiceWorkerVersion> active_version_; | 156 scoped_refptr<ServiceWorkerVersion> active_version_; |
148 scoped_refptr<ServiceWorkerVersion> waiting_version_; | 157 scoped_refptr<ServiceWorkerVersion> waiting_version_; |
149 scoped_refptr<ServiceWorkerVersion> installing_version_; | 158 scoped_refptr<ServiceWorkerVersion> installing_version_; |
150 ObserverList<Listener> listeners_; | 159 ObserverList<Listener> listeners_; |
151 base::WeakPtr<ServiceWorkerContextCore> context_; | 160 base::WeakPtr<ServiceWorkerContextCore> context_; |
152 | 161 |
153 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 162 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
154 }; | 163 }; |
155 | 164 |
156 } // namespace content | 165 } // namespace content |
157 | 166 |
158 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 167 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
OLD | NEW |