| 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_FRAME_HOST_NAVIGATION_REQUEST_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "content/browser/frame_host/navigation_entry_impl.h" | 12 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 13 #include "content/browser/loader/navigation_url_loader_delegate.h" | 13 #include "content/browser/loader/navigation_url_loader_delegate.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/common/frame_message_enums.h" | 15 #include "content/common/frame_message_enums.h" |
| 16 #include "content/common/navigation_params.h" | 16 #include "content/common/navigation_params.h" |
| 17 #include "content/public/browser/navigation_throttle.h" | 17 #include "content/public/browser/navigation_throttle.h" |
| 18 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| 21 class FrameNavigationEntry; | 22 class FrameNavigationEntry; |
| 22 class FrameTreeNode; | 23 class FrameTreeNode; |
| 23 class NavigationControllerImpl; | 24 class NavigationControllerImpl; |
| 24 class NavigationHandleImpl; | 25 class NavigationHandleImpl; |
| 25 class NavigationURLLoader; | 26 class NavigationURLLoader; |
| 26 class NavigationData; | 27 class NavigationData; |
| 27 class NavigatorDelegate; | 28 class NavigatorDelegate; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // NavigationHandle. | 185 // NavigationHandle. |
| 185 void OnStartChecksComplete(NavigationThrottle::ThrottleCheckResult result); | 186 void OnStartChecksComplete(NavigationThrottle::ThrottleCheckResult result); |
| 186 void OnRedirectChecksComplete(NavigationThrottle::ThrottleCheckResult result); | 187 void OnRedirectChecksComplete(NavigationThrottle::ThrottleCheckResult result); |
| 187 void OnWillProcessResponseChecksComplete( | 188 void OnWillProcessResponseChecksComplete( |
| 188 NavigationThrottle::ThrottleCheckResult result); | 189 NavigationThrottle::ThrottleCheckResult result); |
| 189 | 190 |
| 190 // Have a RenderFrameHost commit the navigation. The NavigationRequest will | 191 // Have a RenderFrameHost commit the navigation. The NavigationRequest will |
| 191 // be destroyed after this call. | 192 // be destroyed after this call. |
| 192 void CommitNavigation(); | 193 void CommitNavigation(); |
| 193 | 194 |
| 195 void upgradeInsecureRequest(); |
| 196 |
| 194 FrameTreeNode* frame_tree_node_; | 197 FrameTreeNode* frame_tree_node_; |
| 195 | 198 |
| 196 // Initialized on creation of the NavigationRequest. Sent to the renderer when | 199 // Initialized on creation of the NavigationRequest. Sent to the renderer when |
| 197 // the navigation is ready to commit. | 200 // the navigation is ready to commit. |
| 198 // Note: When the navigation is ready to commit, the url in |common_params| | 201 // Note: When the navigation is ready to commit, the url in |common_params| |
| 199 // will be set to the final navigation url, obtained after following all | 202 // will be set to the final navigation url, obtained after following all |
| 200 // redirects. | 203 // redirects. |
| 201 // Note: |common_params_| and |begin_params_| are not const as they can be | 204 // Note: |common_params_| and |begin_params_| are not const as they can be |
| 202 // modified during redirects. | 205 // modified during redirects. |
| 203 // Note: |request_params_| is not const because service_worker_provider_id | 206 // Note: |request_params_| is not const because service_worker_provider_id |
| (...skipping 20 matching lines...) Expand all Loading... |
| 224 // The type of SiteInstance associated with this navigation. | 227 // The type of SiteInstance associated with this navigation. |
| 225 AssociatedSiteInstanceType associated_site_instance_type_; | 228 AssociatedSiteInstanceType associated_site_instance_type_; |
| 226 | 229 |
| 227 std::unique_ptr<NavigationHandleImpl> navigation_handle_; | 230 std::unique_ptr<NavigationHandleImpl> navigation_handle_; |
| 228 | 231 |
| 229 // Holds the ResourceResponse and the StreamHandle for the navigation while | 232 // Holds the ResourceResponse and the StreamHandle for the navigation while |
| 230 // the WillProcessResponse checks are performed by the NavigationHandle. | 233 // the WillProcessResponse checks are performed by the NavigationHandle. |
| 231 scoped_refptr<ResourceResponse> response_; | 234 scoped_refptr<ResourceResponse> response_; |
| 232 std::unique_ptr<StreamHandle> body_; | 235 std::unique_ptr<StreamHandle> body_; |
| 233 | 236 |
| 237 blink::WebInsecureRequestPolicy insecure_request_policy; |
| 238 |
| 234 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); | 239 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |
| 235 }; | 240 }; |
| 236 | 241 |
| 237 } // namespace content | 242 } // namespace content |
| 238 | 243 |
| 239 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 244 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
| OLD | NEW |