| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMMON_RESOURCE_REQUEST_H_ | 5 #ifndef CONTENT_COMMON_RESOURCE_REQUEST_H_ |
| 6 #define CONTENT_COMMON_RESOURCE_REQUEST_H_ | 6 #define CONTENT_COMMON_RESOURCE_REQUEST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/optional.h" | 12 #include "base/optional.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/common/navigation_params.h" | 14 #include "content/common/navigation_params.h" |
| 15 #include "content/common/resource_request_body_impl.h" | 15 #include "content/common/resource_request_body_impl.h" |
| 16 #include "content/common/service_worker/service_worker_types.h" | 16 #include "content/common/service_worker/service_worker_types.h" |
| 17 #include "content/public/common/appcache_info.h" | 17 #include "content/public/common/appcache_info.h" |
| 18 #include "content/public/common/request_context_frame_type.h" | 18 #include "content/public/common/request_context_frame_type.h" |
| 19 #include "content/public/common/request_context_type.h" | 19 #include "content/public/common/request_context_type.h" |
| 20 #include "content/public/common/resource_type.h" | 20 #include "content/public/common/resource_type.h" |
| 21 #include "net/base/request_priority.h" | 21 #include "net/base/request_priority.h" |
| 22 #include "third_party/WebKit/public/platform/WebMixedContentContextType.h" |
| 22 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 23 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
| 23 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" | 24 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
| 24 #include "ui/base/page_transition_types.h" | 25 #include "ui/base/page_transition_types.h" |
| 25 #include "url/gurl.h" | 26 #include "url/gurl.h" |
| 26 #include "url/origin.h" | 27 #include "url/origin.h" |
| 27 | 28 |
| 28 namespace content { | 29 namespace content { |
| 29 | 30 |
| 30 struct CONTENT_EXPORT ResourceRequest { | 31 struct CONTENT_EXPORT ResourceRequest { |
| 31 ResourceRequest(); | 32 ResourceRequest(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // The credentials mode passed to the ServiceWorker. | 110 // The credentials mode passed to the ServiceWorker. |
| 110 FetchCredentialsMode fetch_credentials_mode = FETCH_CREDENTIALS_MODE_OMIT; | 111 FetchCredentialsMode fetch_credentials_mode = FETCH_CREDENTIALS_MODE_OMIT; |
| 111 | 112 |
| 112 // The redirect mode used in Fetch API. | 113 // The redirect mode used in Fetch API. |
| 113 FetchRedirectMode fetch_redirect_mode = FetchRedirectMode::FOLLOW_MODE; | 114 FetchRedirectMode fetch_redirect_mode = FetchRedirectMode::FOLLOW_MODE; |
| 114 | 115 |
| 115 // The request context passed to the ServiceWorker. | 116 // The request context passed to the ServiceWorker. |
| 116 RequestContextType fetch_request_context_type = | 117 RequestContextType fetch_request_context_type = |
| 117 REQUEST_CONTEXT_TYPE_UNSPECIFIED; | 118 REQUEST_CONTEXT_TYPE_UNSPECIFIED; |
| 118 | 119 |
| 120 // The mixed content context type to be used for mixed content checks. |
| 121 blink::WebMixedContentContextType fetch_mixed_content_context_type = |
| 122 blink::WebMixedContentContextType::Blockable; |
| 123 |
| 119 // The frame type passed to the ServiceWorker. | 124 // The frame type passed to the ServiceWorker. |
| 120 RequestContextFrameType fetch_frame_type = | 125 RequestContextFrameType fetch_frame_type = |
| 121 REQUEST_CONTEXT_FRAME_TYPE_AUXILIARY; | 126 REQUEST_CONTEXT_FRAME_TYPE_AUXILIARY; |
| 122 | 127 |
| 123 // Optional resource request body (may be null). | 128 // Optional resource request body (may be null). |
| 124 scoped_refptr<ResourceRequestBodyImpl> request_body; | 129 scoped_refptr<ResourceRequestBodyImpl> request_body; |
| 125 | 130 |
| 126 // If true, then the response body will be downloaded to a file and the path | 131 // If true, then the response body will be downloaded to a file and the path |
| 127 // to that file will be provided in ResponseInfo::download_file_path. | 132 // to that file will be provided in ResponseInfo::download_file_path. |
| 128 bool download_to_file = false; | 133 bool download_to_file = false; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 bool initiated_in_secure_context = false; | 192 bool initiated_in_secure_context = false; |
| 188 | 193 |
| 189 // The response should be downloaded and stored in the network cache, but not | 194 // The response should be downloaded and stored in the network cache, but not |
| 190 // sent back to the renderer. | 195 // sent back to the renderer. |
| 191 bool download_to_network_cache_only = false; | 196 bool download_to_network_cache_only = false; |
| 192 }; | 197 }; |
| 193 | 198 |
| 194 } // namespace content | 199 } // namespace content |
| 195 | 200 |
| 196 #endif // CONTENT_COMMON_RESOURCE_REQUEST_H_ | 201 #endif // CONTENT_COMMON_RESOURCE_REQUEST_H_ |
| OLD | NEW |