| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #ifdef SendMessage | 49 #ifdef SendMessage |
| 50 #undef SendMessage | 50 #undef SendMessage |
| 51 #endif | 51 #endif |
| 52 | 52 |
| 53 namespace net { | 53 namespace net { |
| 54 class HttpResponseInfo; | 54 class HttpResponseInfo; |
| 55 } | 55 } |
| 56 | 56 |
| 57 namespace content { | 57 namespace content { |
| 58 | 58 |
| 59 class MessagePort; |
| 59 class ServiceWorkerContextCore; | 60 class ServiceWorkerContextCore; |
| 60 class ServiceWorkerProviderHost; | 61 class ServiceWorkerProviderHost; |
| 61 class ServiceWorkerRegistration; | 62 class ServiceWorkerRegistration; |
| 62 class ServiceWorkerURLRequestJob; | 63 class ServiceWorkerURLRequestJob; |
| 63 struct ServiceWorkerClientInfo; | 64 struct ServiceWorkerClientInfo; |
| 64 struct ServiceWorkerVersionInfo; | 65 struct ServiceWorkerVersionInfo; |
| 65 | 66 |
| 66 // This class corresponds to a specific version of a ServiceWorker | 67 // This class corresponds to a specific version of a ServiceWorker |
| 67 // script for a given pattern. When a script is upgraded, there may be | 68 // script for a given pattern. When a script is upgraded, there may be |
| 68 // more than one ServiceWorkerVersion "running" at a time, but only | 69 // more than one ServiceWorkerVersion "running" at a time, but only |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 void OnOpenWindow(int request_id, GURL url); | 648 void OnOpenWindow(int request_id, GURL url); |
| 648 void OnOpenWindowFinished(int request_id, | 649 void OnOpenWindowFinished(int request_id, |
| 649 ServiceWorkerStatusCode status, | 650 ServiceWorkerStatusCode status, |
| 650 const ServiceWorkerClientInfo& client_info); | 651 const ServiceWorkerClientInfo& client_info); |
| 651 | 652 |
| 652 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); | 653 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); |
| 653 void OnSetCachedMetadataFinished(int64_t callback_id, int result); | 654 void OnSetCachedMetadataFinished(int64_t callback_id, int result); |
| 654 void OnClearCachedMetadata(const GURL& url); | 655 void OnClearCachedMetadata(const GURL& url); |
| 655 void OnClearCachedMetadataFinished(int64_t callback_id, int result); | 656 void OnClearCachedMetadataFinished(int64_t callback_id, int result); |
| 656 | 657 |
| 657 void OnPostMessageToClient(const std::string& client_uuid, | 658 void OnPostMessageToClient( |
| 658 const base::string16& message, | 659 const std::string& client_uuid, |
| 659 const std::vector<int>& sent_message_ports); | 660 const base::string16& message, |
| 661 const std::vector<MessagePort>& sent_message_ports); |
| 660 void OnFocusClient(int request_id, const std::string& client_uuid); | 662 void OnFocusClient(int request_id, const std::string& client_uuid); |
| 661 void OnNavigateClient(int request_id, | 663 void OnNavigateClient(int request_id, |
| 662 const std::string& client_uuid, | 664 const std::string& client_uuid, |
| 663 const GURL& url); | 665 const GURL& url); |
| 664 void OnNavigateClientFinished(int request_id, | 666 void OnNavigateClientFinished(int request_id, |
| 665 ServiceWorkerStatusCode status, | 667 ServiceWorkerStatusCode status, |
| 666 const ServiceWorkerClientInfo& client_info); | 668 const ServiceWorkerClientInfo& client_info); |
| 667 void OnSkipWaiting(int request_id); | 669 void OnSkipWaiting(int request_id); |
| 668 void OnClaimClients(int request_id); | 670 void OnClaimClients(int request_id); |
| 669 void OnPongFromWorker(); | 671 void OnPongFromWorker(); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 | 897 |
| 896 // At this point |this| can have been deleted, so don't do anything other | 898 // At this point |this| can have been deleted, so don't do anything other |
| 897 // than returning. | 899 // than returning. |
| 898 | 900 |
| 899 return true; | 901 return true; |
| 900 } | 902 } |
| 901 | 903 |
| 902 } // namespace content | 904 } // namespace content |
| 903 | 905 |
| 904 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 906 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |