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_PROVIDER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Clears the associated registration and stop listening to it. | 87 // Clears the associated registration and stop listening to it. |
88 void DisassociateRegistration(); | 88 void DisassociateRegistration(); |
89 | 89 |
90 // Returns false if the version is not in the expected STARTING in our | 90 // Returns false if the version is not in the expected STARTING in our |
91 // process state. That would be indicative of a bad IPC message. | 91 // process state. That would be indicative of a bad IPC message. |
92 bool SetHostedVersionId(int64 versions_id); | 92 bool SetHostedVersionId(int64 versions_id); |
93 | 93 |
94 // Returns a handler for a request, the handler may return NULL if | 94 // Returns a handler for a request, the handler may return NULL if |
95 // the request doesn't require special handling. | 95 // the request doesn't require special handling. |
96 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( | 96 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( |
| 97 FetchRequestMode request_mode, |
97 ResourceType resource_type, | 98 ResourceType resource_type, |
98 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 99 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
99 scoped_refptr<ResourceRequestBody> body); | 100 scoped_refptr<ResourceRequestBody> body); |
100 | 101 |
101 // Returns true if |registration| can be associated with this provider. | 102 // Returns true if |registration| can be associated with this provider. |
102 bool CanAssociateRegistration(ServiceWorkerRegistration* registration); | 103 bool CanAssociateRegistration(ServiceWorkerRegistration* registration); |
103 | 104 |
104 // For use by the ServiceWorkerControlleeRequestHandler to disallow | 105 // For use by the ServiceWorkerControlleeRequestHandler to disallow |
105 // new registration association while a navigation is occurring and | 106 // new registration association while a navigation is occurring and |
106 // an existing registration is being looked for. | 107 // an existing registration is being looked for. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 base::WeakPtr<ServiceWorkerContextCore> context_; | 155 base::WeakPtr<ServiceWorkerContextCore> context_; |
155 ServiceWorkerDispatcherHost* dispatcher_host_; | 156 ServiceWorkerDispatcherHost* dispatcher_host_; |
156 bool allow_association_; | 157 bool allow_association_; |
157 | 158 |
158 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 159 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
159 }; | 160 }; |
160 | 161 |
161 } // namespace content | 162 } // namespace content |
162 | 163 |
163 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 164 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |