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

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

Issue 1951853004: DevTools: allow devtools to skipWaiting service workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Starts an embedded worker for this version. 165 // Starts an embedded worker for this version.
166 // This returns OK (success) if the worker is already running. 166 // This returns OK (success) if the worker is already running.
167 // |purpose| is recorded in UMA. 167 // |purpose| is recorded in UMA.
168 void StartWorker(ServiceWorkerMetrics::EventType purpose, 168 void StartWorker(ServiceWorkerMetrics::EventType purpose,
169 const StatusCallback& callback); 169 const StatusCallback& callback);
170 170
171 // Stops an embedded worker for this version. 171 // Stops an embedded worker for this version.
172 // This returns OK (success) if the worker is already stopped. 172 // This returns OK (success) if the worker is already stopped.
173 void StopWorker(const StatusCallback& callback); 173 void StopWorker(const StatusCallback& callback);
174 174
175 // Skips waiting and forces this version to become activated.
176 void SkipWaitingFromDevTools();
177
175 // Schedules an update to be run 'soon'. 178 // Schedules an update to be run 'soon'.
176 void ScheduleUpdate(); 179 void ScheduleUpdate();
177 180
178 // If an update is scheduled but not yet started, this resets the timer 181 // If an update is scheduled but not yet started, this resets the timer
179 // delaying the start time by a 'small' amount. 182 // delaying the start time by a 'small' amount.
180 void DeferScheduledUpdate(); 183 void DeferScheduledUpdate();
181 184
182 // Starts an update now. 185 // Starts an update now.
183 void StartUpdate(); 186 void StartUpdate();
184 187
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 753
751 // At this point |this| can have been deleted, so don't do anything other 754 // At this point |this| can have been deleted, so don't do anything other
752 // than returning. 755 // than returning.
753 756
754 return true; 757 return true;
755 } 758 }
756 759
757 } // namespace content 760 } // namespace content
758 761
759 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 762 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_context_wrapper.cc ('k') | third_party/WebKit/Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698