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 "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "content/browser/service_worker/service_worker_request_handler.h" | 9 #include "content/browser/service_worker/service_worker_request_handler.h" |
10 #include "content/common/service_worker/service_worker_types.h" | 10 #include "content/common/service_worker/service_worker_types.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // A request handler derivative used to handle requests from | 24 // A request handler derivative used to handle requests from |
25 // controlled documents. | 25 // controlled documents. |
26 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler | 26 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler |
27 : public ServiceWorkerRequestHandler { | 27 : public ServiceWorkerRequestHandler { |
28 public: | 28 public: |
29 ServiceWorkerControlleeRequestHandler( | 29 ServiceWorkerControlleeRequestHandler( |
30 base::WeakPtr<ServiceWorkerContextCore> context, | 30 base::WeakPtr<ServiceWorkerContextCore> context, |
31 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 31 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
32 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 32 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
33 FetchRequestMode request_mode, | 33 FetchRequestMode request_mode, |
| 34 FetchCredentialsMode credentials_mode, |
34 ResourceType resource_type, | 35 ResourceType resource_type, |
35 scoped_refptr<ResourceRequestBody> body); | 36 scoped_refptr<ResourceRequestBody> body); |
36 virtual ~ServiceWorkerControlleeRequestHandler(); | 37 virtual ~ServiceWorkerControlleeRequestHandler(); |
37 | 38 |
38 // Called via custom URLRequestJobFactory. | 39 // Called via custom URLRequestJobFactory. |
39 virtual net::URLRequestJob* MaybeCreateJob( | 40 virtual net::URLRequestJob* MaybeCreateJob( |
40 net::URLRequest* request, | 41 net::URLRequest* request, |
41 net::NetworkDelegate* network_delegate) OVERRIDE; | 42 net::NetworkDelegate* network_delegate) OVERRIDE; |
42 | 43 |
43 virtual void GetExtraResponseInfo( | 44 virtual void GetExtraResponseInfo( |
(...skipping 17 matching lines...) Expand all Loading... |
61 void OnVersionStatusChanged( | 62 void OnVersionStatusChanged( |
62 ServiceWorkerRegistration* registration, | 63 ServiceWorkerRegistration* registration, |
63 ServiceWorkerVersion* version); | 64 ServiceWorkerVersion* version); |
64 | 65 |
65 // For sub resource case. | 66 // For sub resource case. |
66 void PrepareForSubResource(); | 67 void PrepareForSubResource(); |
67 | 68 |
68 bool is_main_resource_load_; | 69 bool is_main_resource_load_; |
69 scoped_refptr<ServiceWorkerURLRequestJob> job_; | 70 scoped_refptr<ServiceWorkerURLRequestJob> job_; |
70 FetchRequestMode request_mode_; | 71 FetchRequestMode request_mode_; |
| 72 FetchCredentialsMode credentials_mode_; |
71 scoped_refptr<ResourceRequestBody> body_; | 73 scoped_refptr<ResourceRequestBody> body_; |
72 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; | 74 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; |
73 | 75 |
74 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); | 76 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); |
75 }; | 77 }; |
76 | 78 |
77 } // namespace content | 79 } // namespace content |
78 | 80 |
79 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ | 81 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ |
OLD | NEW |