| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // [[ClearRegistration]] algorithm. | 103 // [[ClearRegistration]] algorithm. |
| 104 void AbortPendingClear(const StatusCallback& callback); | 104 void AbortPendingClear(const StatusCallback& callback); |
| 105 | 105 |
| 106 // The time of the most recent update check. | 106 // The time of the most recent update check. |
| 107 base::Time last_update_check() const { return last_update_check_; } | 107 base::Time last_update_check() const { return last_update_check_; } |
| 108 void set_last_update_check(base::Time last) { last_update_check_ = last; } | 108 void set_last_update_check(base::Time last) { last_update_check_ = last; } |
| 109 | 109 |
| 110 private: | 110 private: |
| 111 friend class base::RefCounted<ServiceWorkerRegistration>; | 111 friend class base::RefCounted<ServiceWorkerRegistration>; |
| 112 | 112 |
| 113 virtual ~ServiceWorkerRegistration(); | 113 ~ServiceWorkerRegistration() override; |
| 114 | 114 |
| 115 void SetVersionInternal( | 115 void SetVersionInternal( |
| 116 ServiceWorkerVersion* version, | 116 ServiceWorkerVersion* version, |
| 117 scoped_refptr<ServiceWorkerVersion>* data_member, | 117 scoped_refptr<ServiceWorkerVersion>* data_member, |
| 118 int change_flag); | 118 int change_flag); |
| 119 void UnsetVersionInternal( | 119 void UnsetVersionInternal( |
| 120 ServiceWorkerVersion* version, | 120 ServiceWorkerVersion* version, |
| 121 ChangedVersionAttributesMask* mask); | 121 ChangedVersionAttributesMask* mask); |
| 122 | 122 |
| 123 // ServiceWorkerVersion::Listener override. | 123 // ServiceWorkerVersion::Listener override. |
| 124 virtual void OnNoControllees(ServiceWorkerVersion* version) override; | 124 void OnNoControllees(ServiceWorkerVersion* version) override; |
| 125 | 125 |
| 126 // This method corresponds to the [[Activate]] algorithm. | 126 // This method corresponds to the [[Activate]] algorithm. |
| 127 void ActivateWaitingVersion(); | 127 void ActivateWaitingVersion(); |
| 128 void OnActivateEventFinished( | 128 void OnActivateEventFinished( |
| 129 ServiceWorkerVersion* activating_version, | 129 ServiceWorkerVersion* activating_version, |
| 130 ServiceWorkerStatusCode status); | 130 ServiceWorkerStatusCode status); |
| 131 void OnDeleteFinished(ServiceWorkerStatusCode status); | 131 void OnDeleteFinished(ServiceWorkerStatusCode status); |
| 132 | 132 |
| 133 // This method corresponds to the [[ClearRegistration]] algorithm. | 133 // This method corresponds to the [[ClearRegistration]] algorithm. |
| 134 void Clear(); | 134 void Clear(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 149 scoped_refptr<ServiceWorkerVersion> installing_version_; | 149 scoped_refptr<ServiceWorkerVersion> installing_version_; |
| 150 ObserverList<Listener> listeners_; | 150 ObserverList<Listener> listeners_; |
| 151 base::WeakPtr<ServiceWorkerContextCore> context_; | 151 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 152 | 152 |
| 153 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 153 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace content | 156 } // namespace content |
| 157 | 157 |
| 158 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 158 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| OLD | NEW |