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_REQUEST_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/common/service_worker/service_worker_status_code.h" | 13 #include "content/common/service_worker/service_worker_status_code.h" |
14 #include "content/common/service_worker/service_worker_types.h" | 14 #include "content/common/service_worker/service_worker_types.h" |
| 15 #include "content/public/common/request_context_frame_type.h" |
| 16 #include "content/public/common/request_context_type.h" |
15 #include "content/public/common/resource_type.h" | 17 #include "content/public/common/resource_type.h" |
16 #include "net/url_request/url_request_job_factory.h" | 18 #include "net/url_request/url_request_job_factory.h" |
17 | 19 |
18 namespace net { | 20 namespace net { |
19 class NetworkDelegate; | 21 class NetworkDelegate; |
20 class URLRequest; | 22 class URLRequest; |
21 class URLRequestInterceptor; | 23 class URLRequestInterceptor; |
22 } | 24 } |
23 | 25 |
24 namespace storage { | 26 namespace storage { |
(...skipping 21 matching lines...) Expand all Loading... |
46 static void InitializeHandler( | 48 static void InitializeHandler( |
47 net::URLRequest* request, | 49 net::URLRequest* request, |
48 ServiceWorkerContextWrapper* context_wrapper, | 50 ServiceWorkerContextWrapper* context_wrapper, |
49 storage::BlobStorageContext* blob_storage_context, | 51 storage::BlobStorageContext* blob_storage_context, |
50 int process_id, | 52 int process_id, |
51 int provider_id, | 53 int provider_id, |
52 bool skip_service_worker, | 54 bool skip_service_worker, |
53 FetchRequestMode request_mode, | 55 FetchRequestMode request_mode, |
54 FetchCredentialsMode credentials_mode, | 56 FetchCredentialsMode credentials_mode, |
55 ResourceType resource_type, | 57 ResourceType resource_type, |
| 58 RequestContextType request_context_type, |
| 59 RequestContextFrameType frame_type, |
56 scoped_refptr<ResourceRequestBody> body); | 60 scoped_refptr<ResourceRequestBody> body); |
57 | 61 |
58 // Returns the handler attached to |request|. This may return NULL | 62 // Returns the handler attached to |request|. This may return NULL |
59 // if no handler is attached. | 63 // if no handler is attached. |
60 static ServiceWorkerRequestHandler* GetHandler( | 64 static ServiceWorkerRequestHandler* GetHandler( |
61 net::URLRequest* request); | 65 net::URLRequest* request); |
62 | 66 |
63 // Creates a protocol interceptor for ServiceWorker. | 67 // Creates a protocol interceptor for ServiceWorker. |
64 static scoped_ptr<net::URLRequestInterceptor> CreateInterceptor(); | 68 static scoped_ptr<net::URLRequestInterceptor> CreateInterceptor(); |
65 | 69 |
(...skipping 24 matching lines...) Expand all Loading... |
90 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; | 94 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; |
91 ResourceType resource_type_; | 95 ResourceType resource_type_; |
92 | 96 |
93 private: | 97 private: |
94 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRequestHandler); | 98 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRequestHandler); |
95 }; | 99 }; |
96 | 100 |
97 } // namespace content | 101 } // namespace content |
98 | 102 |
99 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ | 103 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ |
OLD | NEW |