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

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

Issue 2763453002: [ServiceWorker] Convert ping-pong IPC into mojo interface ServiceWorkerEventDispatcher (Closed)
Patch Set: Created 3 years, 9 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients); 705 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients);
706 706
707 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker 707 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker
708 // if it is excessively idle or unresponsive to ping. 708 // if it is excessively idle or unresponsive to ping.
709 void StartTimeoutTimer(); 709 void StartTimeoutTimer();
710 void StopTimeoutTimer(); 710 void StopTimeoutTimer();
711 void OnTimeoutTimer(); 711 void OnTimeoutTimer();
712 void SetTimeoutTimerInterval(base::TimeDelta interval); 712 void SetTimeoutTimerInterval(base::TimeDelta interval);
713 713
714 // Called by PingController for ping protocol. 714 // Called by PingController for ping protocol.
715 ServiceWorkerStatusCode PingWorker(); 715 void PingWorker();
716 void OnPingTimeout(); 716 void OnPingTimeout();
717 717
718 // Stops the worker if it is idle (has no in-flight requests) or timed out 718 // Stops the worker if it is idle (has no in-flight requests) or timed out
719 // ping. 719 // ping.
720 void StopWorkerIfIdle(); 720 void StopWorkerIfIdle();
721 721
722 // RecordStartWorkerResult is added as a start callback by StartTimeoutTimer 722 // RecordStartWorkerResult is added as a start callback by StartTimeoutTimer
723 // and records metrics about startup. 723 // and records metrics about startup.
724 void RecordStartWorkerResult(ServiceWorkerMetrics::EventType purpose, 724 void RecordStartWorkerResult(ServiceWorkerMetrics::EventType purpose,
725 Status prestart_status, 725 Status prestart_status,
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 914
915 // At this point |this| can have been deleted, so don't do anything other 915 // At this point |this| can have been deleted, so don't do anything other
916 // than returning. 916 // than returning.
917 917
918 return true; 918 return true;
919 } 919 }
920 920
921 } // namespace content 921 } // namespace content
922 922
923 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 923 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698