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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 const std::vector<TransferredMessagePort>& sent_message_ports, | 521 const std::vector<TransferredMessagePort>& sent_message_ports, |
522 const StatusCallback& callback); | 522 const StatusCallback& callback); |
523 | 523 |
524 void DispatchMessageEventInternal( | 524 void DispatchMessageEventInternal( |
525 const base::string16& message, | 525 const base::string16& message, |
526 const std::vector<TransferredMessagePort>& sent_message_ports, | 526 const std::vector<TransferredMessagePort>& sent_message_ports, |
527 const StatusCallback& callback); | 527 const StatusCallback& callback); |
528 | 528 |
529 // Message handlers. | 529 // Message handlers. |
530 | 530 |
| 531 // This corresponds to the spec's get(id) steps. |
| 532 void OnGetClient(int request_id, const std::string& client_uuid); |
| 533 |
531 // This corresponds to the spec's matchAll(options) steps. | 534 // This corresponds to the spec's matchAll(options) steps. |
532 void OnGetClients(int request_id, | 535 void OnGetClients(int request_id, |
533 const ServiceWorkerClientQueryOptions& options); | 536 const ServiceWorkerClientQueryOptions& options); |
534 | 537 |
535 void OnSimpleEventResponse(int request_id, | 538 void OnSimpleEventResponse(int request_id, |
536 blink::WebServiceWorkerEventResult result); | 539 blink::WebServiceWorkerEventResult result); |
537 void OnOpenWindow(int request_id, GURL url); | 540 void OnOpenWindow(int request_id, GURL url); |
538 void OnOpenWindowFinished(int request_id, | 541 void OnOpenWindowFinished(int request_id, |
539 ServiceWorkerStatusCode status, | 542 ServiceWorkerStatusCode status, |
540 const std::string& client_uuid, | 543 const std::string& client_uuid, |
(...skipping 27 matching lines...) Expand all Loading... |
568 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes); | 571 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes); |
569 | 572 |
570 void DidEnsureLiveRegistrationForStartWorker( | 573 void DidEnsureLiveRegistrationForStartWorker( |
571 const StatusCallback& callback, | 574 const StatusCallback& callback, |
572 ServiceWorkerStatusCode status, | 575 ServiceWorkerStatusCode status, |
573 const scoped_refptr<ServiceWorkerRegistration>& registration); | 576 const scoped_refptr<ServiceWorkerRegistration>& registration); |
574 void StartWorkerInternal(); | 577 void StartWorkerInternal(); |
575 | 578 |
576 void DidSkipWaiting(int request_id); | 579 void DidSkipWaiting(int request_id); |
577 | 580 |
| 581 void OnGetClientFinished(int request_id, |
| 582 const ServiceWorkerClientInfo& client); |
| 583 |
578 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients); | 584 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients); |
579 | 585 |
580 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker | 586 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker |
581 // if it is excessively idle or unresponsive to ping. | 587 // if it is excessively idle or unresponsive to ping. |
582 void StartTimeoutTimer(); | 588 void StartTimeoutTimer(); |
583 void StopTimeoutTimer(); | 589 void StopTimeoutTimer(); |
584 void OnTimeoutTimer(); | 590 void OnTimeoutTimer(); |
585 void SetTimeoutTimerInterval(base::TimeDelta interval); | 591 void SetTimeoutTimerInterval(base::TimeDelta interval); |
586 | 592 |
587 // Called by PingController for ping protocol. | 593 // Called by PingController for ping protocol. |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 801 |
796 // At this point |this| can have been deleted, so don't do anything other | 802 // At this point |this| can have been deleted, so don't do anything other |
797 // than returning. | 803 // than returning. |
798 | 804 |
799 return true; | 805 return true; |
800 } | 806 } |
801 | 807 |
802 } // namespace content | 808 } // namespace content |
803 | 809 |
804 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 810 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
OLD | NEW |