| 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_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 <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 void DidSkipWaiting(int request_id); | 430 void DidSkipWaiting(int request_id); |
| 431 | 431 |
| 432 void GetWindowClients(int request_id, | 432 void GetWindowClients(int request_id, |
| 433 const ServiceWorkerClientQueryOptions& options); | 433 const ServiceWorkerClientQueryOptions& options); |
| 434 void DidGetWindowClients(int request_id, | 434 void DidGetWindowClients(int request_id, |
| 435 const ServiceWorkerClientQueryOptions& options, | 435 const ServiceWorkerClientQueryOptions& options, |
| 436 scoped_ptr<ServiceWorkerClients> clients); | 436 scoped_ptr<ServiceWorkerClients> clients); |
| 437 void GetNonWindowClients(int request_id, | 437 void GetNonWindowClients(int request_id, |
| 438 const ServiceWorkerClientQueryOptions& options, | 438 const ServiceWorkerClientQueryOptions& options, |
| 439 ServiceWorkerClients* clients); | 439 ServiceWorkerClients* clients); |
| 440 void OnGetClientsFinished(int request_id, |
| 441 const ServiceWorkerClients& clients); |
| 440 | 442 |
| 441 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker | 443 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker |
| 442 // if it is excessively idle or unresponsive to ping. | 444 // if it is excessively idle or unresponsive to ping. |
| 443 void StartTimeoutTimer(); | 445 void StartTimeoutTimer(); |
| 444 void StopTimeoutTimer(); | 446 void StopTimeoutTimer(); |
| 445 void OnTimeoutTimer(); | 447 void OnTimeoutTimer(); |
| 446 | 448 |
| 447 // The ping protocol is for terminating workers that are taking excessively | 449 // The ping protocol is for terminating workers that are taking excessively |
| 448 // long executing JavaScript (e.g., stuck in while(true) {}). Periodically a | 450 // long executing JavaScript (e.g., stuck in while(true) {}). Periodically a |
| 449 // ping IPC is sent to the worker context and if we timeout waiting for a | 451 // ping IPC is sent to the worker context and if we timeout waiting for a |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; | 531 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; |
| 530 | 532 |
| 531 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 533 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 532 | 534 |
| 533 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 535 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 534 }; | 536 }; |
| 535 | 537 |
| 536 } // namespace content | 538 } // namespace content |
| 537 | 539 |
| 538 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 540 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |