Commit 4df7bf75 authored by Arthur Hemery's avatar Arthur Hemery Committed by Commit Bot

Navigation: Added a browser-initiated NavigationClient disconnect handler.

Currently, browser initiated navigations are never interrupted after
binding the remote NavigationClient. This does not handle cases where
the failure happens after ReadyToCommit.

For example a download to a source url would be flagged as illegal in
the blink frame and the DocumentLoader destructed, which should notify
the browser.

Bug: 784904
Change-Id: Idd39bbf702ad2cb53b1b0eb1c01ca1df7b58124c
Reviewed-on: https://chromium-review.googlesource.com/c/1494888Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Commit-Queue: Arthur Hemery <ahemery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636775}
parent f8344ac5
...@@ -839,8 +839,14 @@ void NavigationRequest::RegisterSubresourceOverride( ...@@ -839,8 +839,14 @@ void NavigationRequest::RegisterSubresourceOverride(
mojom::NavigationClient* NavigationRequest::GetCommitNavigationClient() { mojom::NavigationClient* NavigationRequest::GetCommitNavigationClient() {
if (commit_navigation_client_ && commit_navigation_client_.is_bound()) if (commit_navigation_client_ && commit_navigation_client_.is_bound())
return commit_navigation_client_.get(); return commit_navigation_client_.get();
// Instantiate a new NavigationClient interface.
commit_navigation_client_ = commit_navigation_client_ =
render_frame_host_->GetNavigationClientFromInterfaceProvider(); render_frame_host_->GetNavigationClientFromInterfaceProvider();
HandleInterfaceDisconnection(
&commit_navigation_client_,
base::BindOnce(&NavigationRequest::OnRendererAbortedNavigation,
base::Unretained(this)));
return commit_navigation_client_.get(); return commit_navigation_client_.get();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment