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 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "content/browser/service_worker/service_worker_registration.h" | 13 #include "content/browser/service_worker/service_worker_registration.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/common/service_worker/service_worker_types.h" | 15 #include "content/common/service_worker/service_worker_types.h" |
| 16 #include "content/public/common/request_context_frame_type.h" |
| 17 #include "content/public/common/request_context_type.h" |
16 #include "content/public/common/resource_type.h" | 18 #include "content/public/common/resource_type.h" |
17 | 19 |
18 namespace IPC { | 20 namespace IPC { |
19 class Sender; | 21 class Sender; |
20 } | 22 } |
21 | 23 |
22 namespace storage { | 24 namespace storage { |
23 class BlobStorageContext; | 25 class BlobStorageContext; |
24 } | 26 } |
25 | 27 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Returns false if the version is not in the expected STARTING in our | 92 // 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. | 93 // process state. That would be indicative of a bad IPC message. |
92 bool SetHostedVersionId(int64 versions_id); | 94 bool SetHostedVersionId(int64 versions_id); |
93 | 95 |
94 // Returns a handler for a request, the handler may return NULL if | 96 // Returns a handler for a request, the handler may return NULL if |
95 // the request doesn't require special handling. | 97 // the request doesn't require special handling. |
96 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( | 98 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( |
97 FetchRequestMode request_mode, | 99 FetchRequestMode request_mode, |
98 FetchCredentialsMode credentials_mode, | 100 FetchCredentialsMode credentials_mode, |
99 ResourceType resource_type, | 101 ResourceType resource_type, |
| 102 RequestContextType request_context_type, |
| 103 RequestContextFrameType frame_type, |
100 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 104 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
101 scoped_refptr<ResourceRequestBody> body); | 105 scoped_refptr<ResourceRequestBody> body); |
102 | 106 |
103 // Returns true if |registration| can be associated with this provider. | 107 // Returns true if |registration| can be associated with this provider. |
104 bool CanAssociateRegistration(ServiceWorkerRegistration* registration); | 108 bool CanAssociateRegistration(ServiceWorkerRegistration* registration); |
105 | 109 |
106 // For use by the ServiceWorkerControlleeRequestHandler to disallow | 110 // For use by the ServiceWorkerControlleeRequestHandler to disallow |
107 // new registration association while a navigation is occurring and | 111 // new registration association while a navigation is occurring and |
108 // an existing registration is being looked for. | 112 // an existing registration is being looked for. |
109 void SetAllowAssociation(bool allow) { allow_association_ = allow; } | 113 void SetAllowAssociation(bool allow) { allow_association_ = allow; } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 base::WeakPtr<ServiceWorkerContextCore> context_; | 160 base::WeakPtr<ServiceWorkerContextCore> context_; |
157 ServiceWorkerDispatcherHost* dispatcher_host_; | 161 ServiceWorkerDispatcherHost* dispatcher_host_; |
158 bool allow_association_; | 162 bool allow_association_; |
159 | 163 |
160 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 164 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
161 }; | 165 }; |
162 | 166 |
163 } // namespace content | 167 } // namespace content |
164 | 168 |
165 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 169 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |