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_URL_REQUEST_JOB_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 ServiceWorkerMetrics::URLRequestJobResult* result); | 77 ServiceWorkerMetrics::URLRequestJobResult* result); |
78 | 78 |
79 // Called to signal that loading failed, and that the resource being loaded | 79 // Called to signal that loading failed, and that the resource being loaded |
80 // was a main resource. | 80 // was a main resource. |
81 virtual void MainResourceLoadFailed() {} | 81 virtual void MainResourceLoadFailed() {} |
82 }; | 82 }; |
83 | 83 |
84 ServiceWorkerURLRequestJob( | 84 ServiceWorkerURLRequestJob( |
85 net::URLRequest* request, | 85 net::URLRequest* request, |
86 net::NetworkDelegate* network_delegate, | 86 net::NetworkDelegate* network_delegate, |
87 const std::string& client_id, | 87 base::WeakPtr<ServiceWorkerProviderHost> client_provider_host, |
88 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 88 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
89 const ResourceContext* resource_context, | 89 const ResourceContext* resource_context, |
90 FetchRequestMode request_mode, | 90 FetchRequestMode request_mode, |
91 FetchCredentialsMode credentials_mode, | 91 FetchCredentialsMode credentials_mode, |
92 FetchRedirectMode redirect_mode, | 92 FetchRedirectMode redirect_mode, |
93 ResourceType resource_type, | 93 ResourceType resource_type, |
94 RequestContextType request_context_type, | 94 RequestContextType request_context_type, |
95 RequestContextFrameType frame_type, | 95 RequestContextFrameType frame_type, |
96 scoped_refptr<ResourceRequestBodyImpl> body, | 96 scoped_refptr<ResourceRequestBodyImpl> body, |
97 ServiceWorkerFetchType fetch_type, | 97 ServiceWorkerFetchType fetch_type, |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 net::HttpByteRange byte_range_; | 244 net::HttpByteRange byte_range_; |
245 std::unique_ptr<net::HttpResponseInfo> range_response_info_; | 245 std::unique_ptr<net::HttpResponseInfo> range_response_info_; |
246 std::unique_ptr<net::HttpResponseInfo> http_response_info_; | 246 std::unique_ptr<net::HttpResponseInfo> http_response_info_; |
247 // Headers that have not yet been committed to |http_response_info_|. | 247 // Headers that have not yet been committed to |http_response_info_|. |
248 scoped_refptr<net::HttpResponseHeaders> http_response_headers_; | 248 scoped_refptr<net::HttpResponseHeaders> http_response_headers_; |
249 GURL response_url_; | 249 GURL response_url_; |
250 blink::WebServiceWorkerResponseType service_worker_response_type_; | 250 blink::WebServiceWorkerResponseType service_worker_response_type_; |
251 | 251 |
252 // Used when response type is FORWARD_TO_SERVICE_WORKER. | 252 // Used when response type is FORWARD_TO_SERVICE_WORKER. |
253 std::unique_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_; | 253 std::unique_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_; |
| 254 base::WeakPtr<ServiceWorkerProviderHost> client_provider_host_; |
254 std::string client_id_; | 255 std::string client_id_; |
255 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; | 256 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; |
256 const ResourceContext* resource_context_; | 257 const ResourceContext* resource_context_; |
257 // Only one of |blob_reader_| and |stream_reader_| can be non-null. | 258 // Only one of |blob_reader_| and |stream_reader_| can be non-null. |
258 std::unique_ptr<ServiceWorkerBlobReader> blob_reader_; | 259 std::unique_ptr<ServiceWorkerBlobReader> blob_reader_; |
259 std::unique_ptr<ServiceWorkerStreamReader> stream_reader_; | 260 std::unique_ptr<ServiceWorkerStreamReader> stream_reader_; |
260 | 261 |
261 FetchRequestMode request_mode_; | 262 FetchRequestMode request_mode_; |
262 FetchCredentialsMode credentials_mode_; | 263 FetchCredentialsMode credentials_mode_; |
263 FetchRedirectMode redirect_mode_; | 264 FetchRedirectMode redirect_mode_; |
(...skipping 21 matching lines...) Expand all Loading... |
285 EmbeddedWorkerStatus initial_worker_status_ = EmbeddedWorkerStatus::STOPPED; | 286 EmbeddedWorkerStatus initial_worker_status_ = EmbeddedWorkerStatus::STOPPED; |
286 | 287 |
287 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; | 288 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; |
288 | 289 |
289 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); | 290 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); |
290 }; | 291 }; |
291 | 292 |
292 } // namespace content | 293 } // namespace content |
293 | 294 |
294 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 295 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
OLD | NEW |