Index: content/browser/service_worker/service_worker_version.h |
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h |
index 125cfafe917f5200c334317d673ad5a5a3c3090c..7670949909bb32a82ab62cf3e58aef7a3cbdd2ae 100644 |
--- a/content/browser/service_worker/service_worker_version.h |
+++ b/content/browser/service_worker/service_worker_version.h |
@@ -311,6 +311,10 @@ class CONTENT_EXPORT ServiceWorkerVersion |
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, ScheduleStopWorker); |
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, KeepAlive); |
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, ListenerAvailability); |
+ FRIEND_TEST_ALL_PREFIXES(ServiceWorkerStartTimeoutTest, |
+ ScriptEvaluationTimeout); |
+ FRIEND_TEST_ALL_PREFIXES(ServiceWorkerEventTimeoutTest, EventTimeout); |
+ |
typedef ServiceWorkerVersion self; |
typedef std::map<ServiceWorkerProviderHost*, int> ControlleeMap; |
typedef IDMap<ServiceWorkerProviderHost> ControlleeByIDMap; |
@@ -318,6 +322,7 @@ class CONTENT_EXPORT ServiceWorkerVersion |
~ServiceWorkerVersion() override; |
// EmbeddedWorkerInstance::Listener overrides: |
+ void OnScriptLoaded() override; |
void OnStarted() override; |
void OnStopped(EmbeddedWorkerInstance::Status old_status) override; |
void OnReportException(const base::string16& error_message, |
@@ -372,6 +377,7 @@ class CONTENT_EXPORT ServiceWorkerVersion |
void OnFocusClient(int request_id, int client_id); |
void OnSkipWaiting(int request_id); |
void OnClaimClients(int request_id); |
+ void OnPongFromWorker(); |
void OnFocusClientFinished(int request_id, |
int client_id, |
@@ -383,6 +389,10 @@ class CONTENT_EXPORT ServiceWorkerVersion |
scoped_refptr<GetClientDocumentsCallback> callback, |
const ServiceWorkerClientInfo& info); |
+ void PingWorker(); |
+ void SchedulePingWorker(); |
+ void OnPingTimeout(); |
+ |
void ScheduleStopWorker(); |
void StopWorkerIfIdle(); |
bool HasInflightRequests() const; |
@@ -425,6 +435,8 @@ class CONTENT_EXPORT ServiceWorkerVersion |
ServiceWorkerScriptCacheMap script_cache_map_; |
base::OneShotTimer<ServiceWorkerVersion> stop_worker_timer_; |
base::OneShotTimer<ServiceWorkerVersion> update_timer_; |
+ base::OneShotTimer<ServiceWorkerVersion> ping_worker_timer_; |
+ bool ping_timed_out_; |
bool is_doomed_; |
std::vector<int> pending_skip_waiting_requests_; |
bool skip_waiting_; |