| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <functional> | 10 #include <functional> |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 | 584 |
| 585 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes, | 585 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes, |
| 586 const std::vector<url::Origin>& origins); | 586 const std::vector<url::Origin>& origins); |
| 587 | 587 |
| 588 void DidEnsureLiveRegistrationForStartWorker( | 588 void DidEnsureLiveRegistrationForStartWorker( |
| 589 ServiceWorkerMetrics::EventType purpose, | 589 ServiceWorkerMetrics::EventType purpose, |
| 590 Status prestart_status, | 590 Status prestart_status, |
| 591 bool is_browser_startup_complete, | 591 bool is_browser_startup_complete, |
| 592 const StatusCallback& callback, | 592 const StatusCallback& callback, |
| 593 ServiceWorkerStatusCode status, | 593 ServiceWorkerStatusCode status, |
| 594 const scoped_refptr<ServiceWorkerRegistration>& registration); | 594 scoped_refptr<ServiceWorkerRegistration> registration); |
| 595 void StartWorkerInternal(); | 595 void StartWorkerInternal(); |
| 596 | 596 |
| 597 void DidSkipWaiting(int request_id); | 597 void DidSkipWaiting(int request_id); |
| 598 | 598 |
| 599 void OnGetClientFinished(int request_id, | 599 void OnGetClientFinished(int request_id, |
| 600 const ServiceWorkerClientInfo& client_info); | 600 const ServiceWorkerClientInfo& client_info); |
| 601 | 601 |
| 602 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients); | 602 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients); |
| 603 | 603 |
| 604 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker | 604 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker |
| (...skipping 27 matching lines...) Expand all Loading... |
| 632 // deduce a reason. | 632 // deduce a reason. |
| 633 ServiceWorkerStatusCode DeduceStartWorkerFailureReason( | 633 ServiceWorkerStatusCode DeduceStartWorkerFailureReason( |
| 634 ServiceWorkerStatusCode default_code); | 634 ServiceWorkerStatusCode default_code); |
| 635 | 635 |
| 636 // Sets |stale_time_| if this worker is stale, causing an update to eventually | 636 // Sets |stale_time_| if this worker is stale, causing an update to eventually |
| 637 // occur once the worker stops or is running too long. | 637 // occur once the worker stops or is running too long. |
| 638 void MarkIfStale(); | 638 void MarkIfStale(); |
| 639 | 639 |
| 640 void FoundRegistrationForUpdate( | 640 void FoundRegistrationForUpdate( |
| 641 ServiceWorkerStatusCode status, | 641 ServiceWorkerStatusCode status, |
| 642 const scoped_refptr<ServiceWorkerRegistration>& registration); | 642 scoped_refptr<ServiceWorkerRegistration> registration); |
| 643 | 643 |
| 644 void OnStoppedInternal(EmbeddedWorkerStatus old_status); | 644 void OnStoppedInternal(EmbeddedWorkerStatus old_status); |
| 645 | 645 |
| 646 // Called when the remote side of a connection to a mojo service is lost. | 646 // Called when the remote side of a connection to a mojo service is lost. |
| 647 void OnMojoConnectionError(const char* service_name); | 647 void OnMojoConnectionError(const char* service_name); |
| 648 | 648 |
| 649 // Called at the beginning of each Dispatch*Event function: records | 649 // Called at the beginning of each Dispatch*Event function: records |
| 650 // the time elapsed since idle (generally the time since the previous | 650 // the time elapsed since idle (generally the time since the previous |
| 651 // event ended). | 651 // event ended). |
| 652 void OnBeginEvent(); | 652 void OnBeginEvent(); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 | 803 |
| 804 // At this point |this| can have been deleted, so don't do anything other | 804 // At this point |this| can have been deleted, so don't do anything other |
| 805 // than returning. | 805 // than returning. |
| 806 | 806 |
| 807 return true; | 807 return true; |
| 808 } | 808 } |
| 809 | 809 |
| 810 } // namespace content | 810 } // namespace content |
| 811 | 811 |
| 812 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 812 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |