OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_HANDLE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
7 | 7 |
8 #include "content/public/browser/navigation_handle.h" | 8 #include "content/public/browser/navigation_handle.h" |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // |callback| will be called when all throttles check have completed. This | 153 // |callback| will be called when all throttles check have completed. This |
154 // will allow the caller to cancel the navigation or let it proceed. | 154 // will allow the caller to cancel the navigation or let it proceed. |
155 void WillRedirectRequest( | 155 void WillRedirectRequest( |
156 const GURL& new_url, | 156 const GURL& new_url, |
157 bool new_method_is_post, | 157 bool new_method_is_post, |
158 const GURL& new_referrer_url, | 158 const GURL& new_referrer_url, |
159 bool new_is_external_protocol, | 159 bool new_is_external_protocol, |
160 scoped_refptr<net::HttpResponseHeaders> response_headers, | 160 scoped_refptr<net::HttpResponseHeaders> response_headers, |
161 const ThrottleChecksFinishedCallback& callback); | 161 const ThrottleChecksFinishedCallback& callback); |
162 | 162 |
| 163 // Called when the URLRequest has response data, and is ready to be |
| 164 // committed. |callback| will be called when the throttles' checks are |
| 165 // complete. If the result is PROCEED, 'ReadyToCommitNavigation' will be |
| 166 // called just before |callback|. |
| 167 void WillProcessResponse( |
| 168 RenderFrameHostImpl* render_frame_host, |
| 169 scoped_refptr<net::HttpResponseHeaders> response_headers, |
| 170 const ThrottleChecksFinishedCallback& callback); |
| 171 |
163 // Returns the FrameTreeNode this navigation is happening in. | 172 // Returns the FrameTreeNode this navigation is happening in. |
164 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } | 173 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } |
165 | 174 |
166 // Called when the navigation was redirected. This will update the |url_| and | 175 // Called when the navigation was redirected. This will update the |url_| and |
167 // inform the delegate. | 176 // inform the delegate. |
168 void DidRedirectNavigation(const GURL& new_url); | 177 void DidRedirectNavigation(const GURL& new_url); |
169 | 178 |
170 // Called when the navigation is ready to be committed in | 179 // Called when the navigation is ready to be committed in |
171 // |render_frame_host|. This will update the |state_| and inform the | 180 // |render_frame_host|. This will update the |state_| and inform the |
172 // delegate. | 181 // delegate. |
(...skipping 21 matching lines...) Expand all Loading... |
194 DID_COMMIT, | 203 DID_COMMIT, |
195 DID_COMMIT_ERROR_PAGE, | 204 DID_COMMIT_ERROR_PAGE, |
196 }; | 205 }; |
197 | 206 |
198 NavigationHandleImpl(const GURL& url, | 207 NavigationHandleImpl(const GURL& url, |
199 FrameTreeNode* frame_tree_node, | 208 FrameTreeNode* frame_tree_node, |
200 const base::TimeTicks& navigation_start); | 209 const base::TimeTicks& navigation_start); |
201 | 210 |
202 NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); | 211 NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); |
203 NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); | 212 NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); |
| 213 NavigationThrottle::ThrottleCheckResult CheckWillProcessResponse(); |
204 | 214 |
205 // Helper function to run and reset the |complete_callback_|. This marks the | 215 // Helper function to run and reset the |complete_callback_|. This marks the |
206 // end of a round of NavigationThrottleChecks. | 216 // end of a round of NavigationThrottleChecks. |
207 void RunCompleteCallback(NavigationThrottle::ThrottleCheckResult result); | 217 void RunCompleteCallback(NavigationThrottle::ThrottleCheckResult result); |
208 | 218 |
209 // Used in tests. | 219 // Used in tests. |
210 State state() const { return state_; } | 220 State state() const { return state_; } |
211 | 221 |
212 // See NavigationHandle for a description of those member variables. | 222 // See NavigationHandle for a description of those member variables. |
213 GURL url_; | 223 GURL url_; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a | 257 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a |
248 // corresponding ServiceWorkerNetworkProvider is created in the renderer. | 258 // corresponding ServiceWorkerNetworkProvider is created in the renderer. |
249 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; | 259 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; |
250 | 260 |
251 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 261 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
252 }; | 262 }; |
253 | 263 |
254 } // namespace content | 264 } // namespace content |
255 | 265 |
256 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 266 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
OLD | NEW |