| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHILD_REQUEST_EXTRA_DATA_H_ | 5 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
| 6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "content/child/web_url_loader_impl.h" | 12 #include "content/child/web_url_loader_impl.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/url_loader_factory.mojom.h" | 15 #include "content/common/url_loader_factory.mojom.h" |
| 16 #include "content/public/child/url_loader_throttle.h" |
| 16 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 17 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
| 17 #include "third_party/WebKit/public/platform/WebString.h" | 18 #include "third_party/WebKit/public/platform/WebString.h" |
| 18 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 19 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 19 #include "ui/base/page_transition_types.h" | 20 #include "ui/base/page_transition_types.h" |
| 20 #include "url/origin.h" | 21 #include "url/origin.h" |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 | 24 |
| 24 struct ResourceRequest; | 25 struct ResourceRequest; |
| 25 | 26 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 navigation_initiated_by_renderer_ = navigation_by_renderer; | 169 navigation_initiated_by_renderer_ = navigation_by_renderer; |
| 169 } | 170 } |
| 170 | 171 |
| 171 mojom::URLLoaderFactory* url_loader_factory_override() const { | 172 mojom::URLLoaderFactory* url_loader_factory_override() const { |
| 172 return url_loader_factory_override_; | 173 return url_loader_factory_override_; |
| 173 } | 174 } |
| 174 void set_url_loader_factory_override(mojom::URLLoaderFactory* factory) { | 175 void set_url_loader_factory_override(mojom::URLLoaderFactory* factory) { |
| 175 url_loader_factory_override_ = factory; | 176 url_loader_factory_override_ = factory; |
| 176 } | 177 } |
| 177 | 178 |
| 179 std::vector<std::unique_ptr<URLLoaderThrottle>> TakeURLLoaderThrottles() { |
| 180 return std::move(url_loader_throttles_); |
| 181 } |
| 182 void set_url_loader_throttles( |
| 183 std::vector<std::unique_ptr<URLLoaderThrottle>> throttles) { |
| 184 url_loader_throttles_ = std::move(throttles); |
| 185 } |
| 186 |
| 178 void CopyToResourceRequest(ResourceRequest* request) const; | 187 void CopyToResourceRequest(ResourceRequest* request) const; |
| 179 | 188 |
| 180 private: | 189 private: |
| 181 blink::WebPageVisibilityState visibility_state_; | 190 blink::WebPageVisibilityState visibility_state_; |
| 182 int render_frame_id_; | 191 int render_frame_id_; |
| 183 bool is_main_frame_; | 192 bool is_main_frame_; |
| 184 url::Origin frame_origin_; | 193 url::Origin frame_origin_; |
| 185 bool parent_is_main_frame_; | 194 bool parent_is_main_frame_; |
| 186 int parent_render_frame_id_; | 195 int parent_render_frame_id_; |
| 187 bool allow_download_; | 196 bool allow_download_; |
| 188 ui::PageTransition transition_type_; | 197 ui::PageTransition transition_type_; |
| 189 bool should_replace_current_entry_; | 198 bool should_replace_current_entry_; |
| 190 int transferred_request_child_id_; | 199 int transferred_request_child_id_; |
| 191 int transferred_request_request_id_; | 200 int transferred_request_request_id_; |
| 192 int service_worker_provider_id_; | 201 int service_worker_provider_id_; |
| 193 bool originated_from_service_worker_; | 202 bool originated_from_service_worker_; |
| 194 blink::WebString custom_user_agent_; | 203 blink::WebString custom_user_agent_; |
| 195 blink::WebString requested_with_; | 204 blink::WebString requested_with_; |
| 196 std::unique_ptr<StreamOverrideParameters> stream_override_; | 205 std::unique_ptr<StreamOverrideParameters> stream_override_; |
| 197 bool initiated_in_secure_context_; | 206 bool initiated_in_secure_context_; |
| 198 bool is_prefetch_; | 207 bool is_prefetch_; |
| 199 bool download_to_network_cache_only_; | 208 bool download_to_network_cache_only_; |
| 200 bool block_mixed_plugin_content_; | 209 bool block_mixed_plugin_content_; |
| 201 bool navigation_initiated_by_renderer_; | 210 bool navigation_initiated_by_renderer_; |
| 202 mojom::URLLoaderFactory* url_loader_factory_override_; | 211 mojom::URLLoaderFactory* url_loader_factory_override_; |
| 212 std::vector<std::unique_ptr<URLLoaderThrottle>> url_loader_throttles_; |
| 203 | 213 |
| 204 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); | 214 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); |
| 205 }; | 215 }; |
| 206 | 216 |
| 207 } // namespace content | 217 } // namespace content |
| 208 | 218 |
| 209 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 219 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
| OLD | NEW |