| 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_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
| 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/supports_user_data.h" | 15 #include "base/supports_user_data.h" |
| 16 #include "content/common/resource_request_body_impl.h" | 16 #include "content/common/resource_request_body_impl.h" |
| 17 #include "content/public/browser/navigation_ui_data.h" |
| 17 #include "content/public/browser/resource_request_info.h" | 18 #include "content/public/browser/resource_request_info.h" |
| 18 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
| 19 #include "content/public/common/resource_type.h" | 20 #include "content/public/common/resource_type.h" |
| 20 #include "net/base/load_states.h" | 21 #include "net/base/load_states.h" |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 class CrossSiteResourceHandler; | 24 class CrossSiteResourceHandler; |
| 24 class DetachableResourceHandler; | 25 class DetachableResourceHandler; |
| 25 class ResourceContext; | 26 class ResourceContext; |
| 26 class ResourceMessageFilter; | 27 class ResourceMessageFilter; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 blink::WebPageVisibilityState GetVisibilityState() const override; | 89 blink::WebPageVisibilityState GetVisibilityState() const override; |
| 89 ui::PageTransition GetPageTransition() const override; | 90 ui::PageTransition GetPageTransition() const override; |
| 90 bool HasUserGesture() const override; | 91 bool HasUserGesture() const override; |
| 91 bool WasIgnoredByHandler() const override; | 92 bool WasIgnoredByHandler() const override; |
| 92 bool GetAssociatedRenderFrame(int* render_process_id, | 93 bool GetAssociatedRenderFrame(int* render_process_id, |
| 93 int* render_frame_id) const override; | 94 int* render_frame_id) const override; |
| 94 bool IsAsync() const override; | 95 bool IsAsync() const override; |
| 95 bool IsDownload() const override; | 96 bool IsDownload() const override; |
| 96 bool IsUsingLoFi() const override; | 97 bool IsUsingLoFi() const override; |
| 97 bool ShouldReportRawHeaders() const; | 98 bool ShouldReportRawHeaders() const; |
| 99 NavigationUIData* GetNavigationUIData() const override; |
| 98 | 100 |
| 99 CONTENT_EXPORT void AssociateWithRequest(net::URLRequest* request); | 101 CONTENT_EXPORT void AssociateWithRequest(net::URLRequest* request); |
| 100 | 102 |
| 101 CONTENT_EXPORT int GetRequestID() const; | 103 CONTENT_EXPORT int GetRequestID() const; |
| 102 CONTENT_EXPORT GlobalRequestID GetGlobalRequestID() const; | 104 CONTENT_EXPORT GlobalRequestID GetGlobalRequestID() const; |
| 103 GlobalRoutingID GetGlobalRoutingID() const; | 105 GlobalRoutingID GetGlobalRoutingID() const; |
| 104 | 106 |
| 105 // PlzNavigate | 107 // PlzNavigate |
| 106 // The id of the FrameTreeNode that initiated this request (for a navigation | 108 // The id of the FrameTreeNode that initiated this request (for a navigation |
| 107 // request). | 109 // request). |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 const scoped_refptr<ResourceRequestBodyImpl>& body() const { return body_; } | 193 const scoped_refptr<ResourceRequestBodyImpl>& body() const { return body_; } |
| 192 void ResetBody(); | 194 void ResetBody(); |
| 193 | 195 |
| 194 bool initiated_in_secure_context() const { | 196 bool initiated_in_secure_context() const { |
| 195 return initiated_in_secure_context_; | 197 return initiated_in_secure_context_; |
| 196 } | 198 } |
| 197 void set_initiated_in_secure_context_for_testing(bool secure) { | 199 void set_initiated_in_secure_context_for_testing(bool secure) { |
| 198 initiated_in_secure_context_ = secure; | 200 initiated_in_secure_context_ = secure; |
| 199 } | 201 } |
| 200 | 202 |
| 203 void set_navigation_ui_data( |
| 204 std::unique_ptr<NavigationUIData> navigation_ui_data) { |
| 205 navigation_ui_data_ = std::move(navigation_ui_data); |
| 206 } |
| 207 |
| 201 private: | 208 private: |
| 202 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 209 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 203 DeletedFilterDetached); | 210 DeletedFilterDetached); |
| 204 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 211 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 205 DeletedFilterDetachedRedirect); | 212 DeletedFilterDetachedRedirect); |
| 206 // Non-owning, may be NULL. | 213 // Non-owning, may be NULL. |
| 207 CrossSiteResourceHandler* cross_site_handler_; | 214 CrossSiteResourceHandler* cross_site_handler_; |
| 208 DetachableResourceHandler* detachable_handler_; | 215 DetachableResourceHandler* detachable_handler_; |
| 209 | 216 |
| 210 int process_type_; | 217 int process_type_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 234 ResourceContext* context_; | 241 ResourceContext* context_; |
| 235 // The filter might be deleted without deleting this object if the process | 242 // The filter might be deleted without deleting this object if the process |
| 236 // exits during a transfer. | 243 // exits during a transfer. |
| 237 base::WeakPtr<ResourceMessageFilter> filter_; | 244 base::WeakPtr<ResourceMessageFilter> filter_; |
| 238 bool report_raw_headers_; | 245 bool report_raw_headers_; |
| 239 bool is_async_; | 246 bool is_async_; |
| 240 bool is_using_lofi_; | 247 bool is_using_lofi_; |
| 241 const std::string original_headers_; | 248 const std::string original_headers_; |
| 242 scoped_refptr<ResourceRequestBodyImpl> body_; | 249 scoped_refptr<ResourceRequestBodyImpl> body_; |
| 243 bool initiated_in_secure_context_; | 250 bool initiated_in_secure_context_; |
| 251 std::unique_ptr<NavigationUIData> navigation_ui_data_; |
| 244 | 252 |
| 245 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 253 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
| 246 }; | 254 }; |
| 247 | 255 |
| 248 } // namespace content | 256 } // namespace content |
| 249 | 257 |
| 250 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 258 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
| OLD | NEW |