OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CONTROLLEE_REQUEST_HANDLER
_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER
_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER
_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER
_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "content/browser/service_worker/service_worker_request_handler.h" | 15 #include "content/browser/service_worker/service_worker_request_handler.h" |
| 16 #include "content/browser/service_worker/service_worker_url_job_wrapper.h" |
16 #include "content/browser/service_worker/service_worker_url_request_job.h" | 17 #include "content/browser/service_worker/service_worker_url_request_job.h" |
17 #include "content/common/service_worker/service_worker_types.h" | 18 #include "content/common/service_worker/service_worker_types.h" |
18 #include "content/public/common/request_context_frame_type.h" | 19 #include "content/public/common/request_context_frame_type.h" |
19 #include "content/public/common/request_context_type.h" | 20 #include "content/public/common/request_context_type.h" |
20 #include "content/public/common/resource_type.h" | 21 #include "content/public/common/resource_type.h" |
21 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerResponseType.h" | 22 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerResponseType.h" |
22 #include "url/gurl.h" | 23 #include "url/gurl.h" |
23 | 24 |
24 namespace net { | 25 namespace net { |
25 class NetworkDelegate; | 26 class NetworkDelegate; |
26 class URLRequest; | 27 class URLRequest; |
27 } | 28 } |
28 | 29 |
29 namespace content { | 30 namespace content { |
30 | 31 |
31 class ResourceRequestBodyImpl; | 32 class ResourceRequestBodyImpl; |
32 class ServiceWorkerURLJobWrapper; | |
33 class ServiceWorkerRegistration; | 33 class ServiceWorkerRegistration; |
34 class ServiceWorkerVersion; | 34 class ServiceWorkerVersion; |
35 | 35 |
36 // A request handler derivative used to handle requests from | 36 // A request handler derivative used to handle requests from |
37 // controlled documents. | 37 // controlled documents. |
38 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler | 38 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler |
39 : public ServiceWorkerRequestHandler, | 39 : public ServiceWorkerRequestHandler, |
40 public ServiceWorkerURLRequestJob::Delegate { | 40 public ServiceWorkerURLRequestJob::Delegate, |
| 41 public NON_EXPORTED_BASE(ServiceWorkerURLJobWrapper::Delegate) { |
41 public: | 42 public: |
42 ServiceWorkerControlleeRequestHandler( | 43 ServiceWorkerControlleeRequestHandler( |
43 base::WeakPtr<ServiceWorkerContextCore> context, | 44 base::WeakPtr<ServiceWorkerContextCore> context, |
44 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 45 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
45 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 46 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
46 FetchRequestMode request_mode, | 47 FetchRequestMode request_mode, |
47 FetchCredentialsMode credentials_mode, | 48 FetchCredentialsMode credentials_mode, |
48 FetchRedirectMode redirect_mode, | 49 FetchRedirectMode redirect_mode, |
49 ResourceType resource_type, | 50 ResourceType resource_type, |
50 RequestContextType request_context_type, | 51 RequestContextType request_context_type, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 bool use_network_; | 137 bool use_network_; |
137 | 138 |
138 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; | 139 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; |
139 | 140 |
140 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); | 141 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); |
141 }; | 142 }; |
142 | 143 |
143 } // namespace content | 144 } // namespace content |
144 | 145 |
145 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ | 146 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ |
OLD | NEW |