| 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_job_wrapper.h" |
| 17 #include "content/browser/service_worker/service_worker_url_loader_job.h" |
| 17 #include "content/browser/service_worker/service_worker_url_request_job.h" | 18 #include "content/browser/service_worker/service_worker_url_request_job.h" |
| 18 #include "content/common/service_worker/service_worker_types.h" | 19 #include "content/common/service_worker/service_worker_types.h" |
| 19 #include "content/public/common/request_context_frame_type.h" | 20 #include "content/public/common/request_context_frame_type.h" |
| 20 #include "content/public/common/request_context_type.h" | 21 #include "content/public/common/request_context_type.h" |
| 21 #include "content/public/common/resource_type.h" | 22 #include "content/public/common/resource_type.h" |
| 22 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerResponseType.h" | 23 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerResponseType.h" |
| 23 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 24 | 25 |
| 25 namespace net { | 26 namespace net { |
| 26 class NetworkDelegate; | 27 class NetworkDelegate; |
| 27 class URLRequest; | 28 class URLRequest; |
| 28 } | 29 } |
| 29 | 30 |
| 30 namespace content { | 31 namespace content { |
| 31 | 32 |
| 32 class ResourceRequestBodyImpl; | 33 class ResourceRequestBodyImpl; |
| 33 class ServiceWorkerRegistration; | 34 class ServiceWorkerRegistration; |
| 34 class ServiceWorkerVersion; | 35 class ServiceWorkerVersion; |
| 35 | 36 |
| 36 // A request handler derivative used to handle requests from | 37 // A request handler derivative used to handle requests from |
| 37 // controlled documents. | 38 // controlled documents. |
| 38 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler | 39 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler |
| 39 : public ServiceWorkerRequestHandler, | 40 : public ServiceWorkerRequestHandler, |
| 40 public ServiceWorkerURLRequestJob::Delegate, | 41 public ServiceWorkerURLRequestJob::Delegate, |
| 41 public NON_EXPORTED_BASE(ServiceWorkerURLJobWrapper::Delegate) { | 42 public NON_EXPORTED_BASE(ServiceWorkerURLLoaderJob::Delegate) { |
| 42 public: | 43 public: |
| 43 ServiceWorkerControlleeRequestHandler( | 44 ServiceWorkerControlleeRequestHandler( |
| 44 base::WeakPtr<ServiceWorkerContextCore> context, | 45 base::WeakPtr<ServiceWorkerContextCore> context, |
| 45 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 46 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
| 46 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 47 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
| 47 FetchRequestMode request_mode, | 48 FetchRequestMode request_mode, |
| 48 FetchCredentialsMode credentials_mode, | 49 FetchCredentialsMode credentials_mode, |
| 49 FetchRedirectMode redirect_mode, | 50 FetchRedirectMode redirect_mode, |
| 50 ResourceType resource_type, | 51 ResourceType resource_type, |
| 51 RequestContextType request_context_type, | 52 RequestContextType request_context_type, |
| (...skipping 84 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 |