| 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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 void OnOpenWindow(int request_id, GURL url); | 654 void OnOpenWindow(int request_id, GURL url); |
| 654 void OnOpenWindowFinished(int request_id, | 655 void OnOpenWindowFinished(int request_id, |
| 655 ServiceWorkerStatusCode status, | 656 ServiceWorkerStatusCode status, |
| 656 const ServiceWorkerClientInfo& client_info); | 657 const ServiceWorkerClientInfo& client_info); |
| 657 | 658 |
| 658 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); | 659 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); |
| 659 void OnSetCachedMetadataFinished(int64_t callback_id, int result); | 660 void OnSetCachedMetadataFinished(int64_t callback_id, int result); |
| 660 void OnClearCachedMetadata(const GURL& url); | 661 void OnClearCachedMetadata(const GURL& url); |
| 661 void OnClearCachedMetadataFinished(int64_t callback_id, int result); | 662 void OnClearCachedMetadataFinished(int64_t callback_id, int result); |
| 662 | 663 |
| 663 void OnPostMessageToClient(const std::string& client_uuid, | 664 void OnPostMessageToClient( |
| 664 const base::string16& message, | 665 const std::string& client_uuid, |
| 665 const std::vector<int>& sent_message_ports); | 666 const base::string16& message, |
| 667 const std::vector<MessagePort>& sent_message_ports); |
| 666 void OnFocusClient(int request_id, const std::string& client_uuid); | 668 void OnFocusClient(int request_id, const std::string& client_uuid); |
| 667 void OnNavigateClient(int request_id, | 669 void OnNavigateClient(int request_id, |
| 668 const std::string& client_uuid, | 670 const std::string& client_uuid, |
| 669 const GURL& url); | 671 const GURL& url); |
| 670 void OnNavigateClientFinished(int request_id, | 672 void OnNavigateClientFinished(int request_id, |
| 671 ServiceWorkerStatusCode status, | 673 ServiceWorkerStatusCode status, |
| 672 const ServiceWorkerClientInfo& client_info); | 674 const ServiceWorkerClientInfo& client_info); |
| 673 void OnSkipWaiting(int request_id); | 675 void OnSkipWaiting(int request_id); |
| 674 void OnClaimClients(int request_id); | 676 void OnClaimClients(int request_id); |
| 675 void OnPongFromWorker(); | 677 void OnPongFromWorker(); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 | 904 |
| 903 // At this point |this| can have been deleted, so don't do anything other | 905 // At this point |this| can have been deleted, so don't do anything other |
| 904 // than returning. | 906 // than returning. |
| 905 | 907 |
| 906 return true; | 908 return true; |
| 907 } | 909 } |
| 908 | 910 |
| 909 } // namespace content | 911 } // namespace content |
| 910 | 912 |
| 911 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 913 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |