Chromium Code Reviews| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 // |callback| will be called when all throttles check have completed. This | 277 // |callback| will be called when all throttles check have completed. This |
| 278 // will allow the caller to cancel the navigation or let it proceed. | 278 // will allow the caller to cancel the navigation or let it proceed. |
| 279 // This will also inform the delegate that the request was redirected. | 279 // This will also inform the delegate that the request was redirected. |
| 280 void WillRedirectRequest( | 280 void WillRedirectRequest( |
| 281 const GURL& new_url, | 281 const GURL& new_url, |
| 282 const std::string& new_method, | 282 const std::string& new_method, |
| 283 const GURL& new_referrer_url, | 283 const GURL& new_referrer_url, |
| 284 bool new_is_external_protocol, | 284 bool new_is_external_protocol, |
| 285 scoped_refptr<net::HttpResponseHeaders> response_headers, | 285 scoped_refptr<net::HttpResponseHeaders> response_headers, |
| 286 net::HttpResponseInfo::ConnectionInfo connection_info, | 286 net::HttpResponseInfo::ConnectionInfo connection_info, |
| 287 RenderProcessHost* new_expected_render_process_host, | |
|
Charlie Reis
2017/06/27 04:24:53
Maybe new_expected_process or post_redirect_proces
clamy
2017/06/27 15:23:05
Done.
| |
| 287 const ThrottleChecksFinishedCallback& callback); | 288 const ThrottleChecksFinishedCallback& callback); |
| 288 | 289 |
| 289 // Called when the URLRequest has delivered response headers and metadata. | 290 // Called when the URLRequest has delivered response headers and metadata. |
| 290 // |callback| will be called when all throttle checks have completed, | 291 // |callback| will be called when all throttle checks have completed, |
| 291 // allowing the caller to cancel the navigation or let it proceed. | 292 // allowing the caller to cancel the navigation or let it proceed. |
| 292 // NavigationHandle will not call |callback| with a result of DEFER. | 293 // NavigationHandle will not call |callback| with a result of DEFER. |
| 293 // If the result is PROCEED, then 'ReadyToCommitNavigation' will be called | 294 // If the result is PROCEED, then 'ReadyToCommitNavigation' will be called |
| 294 // with |render_frame_host| and |response_headers| just before calling | 295 // with |render_frame_host| and |response_headers| just before calling |
| 295 // |callback|. Should a transfer navigation happen, |transfer_callback| will | 296 // |callback|. Should a transfer navigation happen, |transfer_callback| will |
| 296 // be run on the IO thread. | 297 // be run on the IO thread. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 423 // Populates |throttles_| with the throttles for this navigation. | 424 // Populates |throttles_| with the throttles for this navigation. |
| 424 void RegisterNavigationThrottles(); | 425 void RegisterNavigationThrottles(); |
| 425 | 426 |
| 426 // Checks for attempts to navigate to a page that is already referenced more | 427 // Checks for attempts to navigate to a page that is already referenced more |
| 427 // than once in the frame's ancestors. This is a helper function used by | 428 // than once in the frame's ancestors. This is a helper function used by |
| 428 // WillStartRequest and WillRedirectRequest to prevent the navigation. | 429 // WillStartRequest and WillRedirectRequest to prevent the navigation. |
| 429 bool IsSelfReferentialURL(); | 430 bool IsSelfReferentialURL(); |
| 430 | 431 |
| 431 // Updates the destination site URL for this navigation. This is called on | 432 // Updates the destination site URL for this navigation. This is called on |
| 432 // redirects. | 433 // redirects. |
| 433 // PlzNavigate: When redirected cross-site, the speculative RenderProcessHost | 434 // PlzNavigate: |new_expected_render_process_host_id| is the id of the |
| 434 // will stop expecting this navigation to commit. | 435 // renderer process that should handle the navigation following the redirect |
| 435 void UpdateSiteURL(); | 436 // if it can be handled by an existing RenderProcessHost. Otherwise, it should |
| 437 // be ChildProcessHost::kInvalidUniqueID. | |
|
Charlie Reis
2017/06/27 04:24:53
This comment is talking about IDs, but we pass a R
clamy
2017/06/27 15:23:05
Done.
| |
| 438 void UpdateSiteURL(RenderProcessHost* new_expected_render_process_host); | |
| 436 | 439 |
| 437 // See NavigationHandle for a description of those member variables. | 440 // See NavigationHandle for a description of those member variables. |
| 438 GURL url_; | 441 GURL url_; |
| 439 scoped_refptr<SiteInstance> starting_site_instance_; | 442 scoped_refptr<SiteInstance> starting_site_instance_; |
| 440 Referrer sanitized_referrer_; | 443 Referrer sanitized_referrer_; |
| 441 bool has_user_gesture_; | 444 bool has_user_gesture_; |
| 442 ui::PageTransition transition_; | 445 ui::PageTransition transition_; |
| 443 bool is_external_protocol_; | 446 bool is_external_protocol_; |
| 444 net::Error net_error_code_; | 447 net::Error net_error_code_; |
| 445 RenderFrameHostImpl* render_frame_host_; | 448 RenderFrameHostImpl* render_frame_host_; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 581 int expected_render_process_host_id_; | 584 int expected_render_process_host_id_; |
| 582 | 585 |
| 583 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; | 586 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
| 584 | 587 |
| 585 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 588 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 586 }; | 589 }; |
| 587 | 590 |
| 588 } // namespace content | 591 } // namespace content |
| 589 | 592 |
| 590 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 593 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |