| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 namespace IPC { | 25 namespace IPC { |
| 26 class Sender; | 26 class Sender; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace storage { | 29 namespace storage { |
| 30 class BlobStorageContext; | 30 class BlobStorageContext; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 | 34 |
| 35 class ResourceRequestBody; | 35 class ResourceRequestBodyImpl; |
| 36 class ServiceWorkerContextCore; | 36 class ServiceWorkerContextCore; |
| 37 class ServiceWorkerDispatcherHost; | 37 class ServiceWorkerDispatcherHost; |
| 38 class ServiceWorkerRequestHandler; | 38 class ServiceWorkerRequestHandler; |
| 39 class ServiceWorkerVersion; | 39 class ServiceWorkerVersion; |
| 40 | 40 |
| 41 // This class is the browser-process representation of a service worker | 41 // This class is the browser-process representation of a service worker |
| 42 // provider. There is a provider per document or a worker and the lifetime | 42 // provider. There is a provider per document or a worker and the lifetime |
| 43 // of this object is tied to the lifetime of its document or the worker | 43 // of this object is tied to the lifetime of its document or the worker |
| 44 // in the renderer process. | 44 // in the renderer process. |
| 45 // This class holds service worker state that is scoped to an individual | 45 // This class holds service worker state that is scoped to an individual |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // Returns a handler for a request, the handler may return NULL if | 138 // Returns a handler for a request, the handler may return NULL if |
| 139 // the request doesn't require special handling. | 139 // the request doesn't require special handling. |
| 140 std::unique_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( | 140 std::unique_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( |
| 141 FetchRequestMode request_mode, | 141 FetchRequestMode request_mode, |
| 142 FetchCredentialsMode credentials_mode, | 142 FetchCredentialsMode credentials_mode, |
| 143 FetchRedirectMode redirect_mode, | 143 FetchRedirectMode redirect_mode, |
| 144 ResourceType resource_type, | 144 ResourceType resource_type, |
| 145 RequestContextType request_context_type, | 145 RequestContextType request_context_type, |
| 146 RequestContextFrameType frame_type, | 146 RequestContextFrameType frame_type, |
| 147 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 147 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
| 148 scoped_refptr<ResourceRequestBody> body); | 148 scoped_refptr<ResourceRequestBodyImpl> body); |
| 149 | 149 |
| 150 // Used to get a ServiceWorkerObjectInfo to send to the renderer. Finds an | 150 // Used to get a ServiceWorkerObjectInfo to send to the renderer. Finds an |
| 151 // existing ServiceWorkerHandle, and increments its reference count, or else | 151 // existing ServiceWorkerHandle, and increments its reference count, or else |
| 152 // creates a new one (initialized to ref count 1). Returns the | 152 // creates a new one (initialized to ref count 1). Returns the |
| 153 // ServiceWorkerInfo from the handle. The renderer is expected to use | 153 // ServiceWorkerInfo from the handle. The renderer is expected to use |
| 154 // ServiceWorkerHandleReference::Adopt to balance out the ref count. | 154 // ServiceWorkerHandleReference::Adopt to balance out the ref count. |
| 155 ServiceWorkerObjectInfo GetOrCreateServiceWorkerHandle( | 155 ServiceWorkerObjectInfo GetOrCreateServiceWorkerHandle( |
| 156 ServiceWorkerVersion* version); | 156 ServiceWorkerVersion* version); |
| 157 | 157 |
| 158 // Returns true if |registration| can be associated with this provider. | 158 // Returns true if |registration| can be associated with this provider. |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 bool allow_association_; | 328 bool allow_association_; |
| 329 | 329 |
| 330 std::vector<base::Closure> queued_events_; | 330 std::vector<base::Closure> queued_events_; |
| 331 | 331 |
| 332 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 332 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 333 }; | 333 }; |
| 334 | 334 |
| 335 } // namespace content | 335 } // namespace content |
| 336 | 336 |
| 337 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 337 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |