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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 void OnOpenWindow(int request_id, GURL url); | 610 void OnOpenWindow(int request_id, GURL url); |
610 void OnOpenWindowFinished(int request_id, | 611 void OnOpenWindowFinished(int request_id, |
611 ServiceWorkerStatusCode status, | 612 ServiceWorkerStatusCode status, |
612 const ServiceWorkerClientInfo& client_info); | 613 const ServiceWorkerClientInfo& client_info); |
613 | 614 |
614 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); | 615 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); |
615 void OnSetCachedMetadataFinished(int64_t callback_id, int result); | 616 void OnSetCachedMetadataFinished(int64_t callback_id, int result); |
616 void OnClearCachedMetadata(const GURL& url); | 617 void OnClearCachedMetadata(const GURL& url); |
617 void OnClearCachedMetadataFinished(int64_t callback_id, int result); | 618 void OnClearCachedMetadataFinished(int64_t callback_id, int result); |
618 | 619 |
619 void OnPostMessageToClient(const std::string& client_uuid, | 620 void OnPostMessageToClient( |
620 const base::string16& message, | 621 const std::string& client_uuid, |
621 const std::vector<int>& sent_message_ports); | 622 const base::string16& message, |
| 623 const std::vector<MessagePort>& sent_message_ports); |
622 void OnFocusClient(int request_id, const std::string& client_uuid); | 624 void OnFocusClient(int request_id, const std::string& client_uuid); |
623 void OnNavigateClient(int request_id, | 625 void OnNavigateClient(int request_id, |
624 const std::string& client_uuid, | 626 const std::string& client_uuid, |
625 const GURL& url); | 627 const GURL& url); |
626 void OnNavigateClientFinished(int request_id, | 628 void OnNavigateClientFinished(int request_id, |
627 ServiceWorkerStatusCode status, | 629 ServiceWorkerStatusCode status, |
628 const ServiceWorkerClientInfo& client_info); | 630 const ServiceWorkerClientInfo& client_info); |
629 void OnSkipWaiting(int request_id); | 631 void OnSkipWaiting(int request_id); |
630 void OnClaimClients(int request_id); | 632 void OnClaimClients(int request_id); |
631 void OnPongFromWorker(); | 633 void OnPongFromWorker(); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 | 860 |
859 // At this point |this| can have been deleted, so don't do anything other | 861 // At this point |this| can have been deleted, so don't do anything other |
860 // than returning. | 862 // than returning. |
861 | 863 |
862 return true; | 864 return true; |
863 } | 865 } |
864 | 866 |
865 } // namespace content | 867 } // namespace content |
866 | 868 |
867 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 869 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
OLD | NEW |