Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1172)

Side by Side Diff: content/browser/service_worker/service_worker_registration.h

Issue 1647323002: Move activate event dispatching out of ServiceWorkerVersion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-install-event
Patch Set: address comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 void UnsetVersionInternal( 151 void UnsetVersionInternal(
152 ServiceWorkerVersion* version, 152 ServiceWorkerVersion* version,
153 ChangedVersionAttributesMask* mask); 153 ChangedVersionAttributesMask* mask);
154 154
155 // ServiceWorkerVersion::Listener override. 155 // ServiceWorkerVersion::Listener override.
156 void OnNoControllees(ServiceWorkerVersion* version) override; 156 void OnNoControllees(ServiceWorkerVersion* version) override;
157 157
158 // This method corresponds to the [[Activate]] algorithm. 158 // This method corresponds to the [[Activate]] algorithm.
159 void ActivateWaitingVersion(); 159 void ActivateWaitingVersion();
160 void DispatchActivateEvent(
161 const scoped_refptr<ServiceWorkerVersion>& activating_version);
160 void OnActivateEventFinished( 162 void OnActivateEventFinished(
161 ServiceWorkerVersion* activating_version, 163 const scoped_refptr<ServiceWorkerVersion>& activating_version,
162 ServiceWorkerStatusCode status); 164 ServiceWorkerStatusCode status);
163 void OnDeleteFinished(ServiceWorkerStatusCode status); 165 void OnDeleteFinished(ServiceWorkerStatusCode status);
164 166
165 // This method corresponds to the [[ClearRegistration]] algorithm. 167 // This method corresponds to the [[ClearRegistration]] algorithm.
166 void Clear(); 168 void Clear();
167 169
168 void OnRestoreFinished(const StatusCallback& callback, 170 void OnRestoreFinished(const StatusCallback& callback,
169 scoped_refptr<ServiceWorkerVersion> version, 171 scoped_refptr<ServiceWorkerVersion> version,
170 ServiceWorkerStatusCode status); 172 ServiceWorkerStatusCode status);
171 173
(...skipping 15 matching lines...) Expand all
187 base::ObserverList<Listener> listeners_; 189 base::ObserverList<Listener> listeners_;
188 std::vector<base::Closure> registration_finished_callbacks_; 190 std::vector<base::Closure> registration_finished_callbacks_;
189 base::WeakPtr<ServiceWorkerContextCore> context_; 191 base::WeakPtr<ServiceWorkerContextCore> context_;
190 192
191 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); 193 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration);
192 }; 194 };
193 195
194 } // namespace content 196 } // namespace content
195 197
196 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ 198 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698