Chromium Code Reviews| Index: content/renderer/render_frame_impl.cc |
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
| index 7ae0fbf22cffbab58631186cabe423a7404f9a6c..ad1fb0ce7286bbbf628f0f2992bdaff05bce4be5 100644 |
| --- a/content/renderer/render_frame_impl.cc |
| +++ b/content/renderer/render_frame_impl.cc |
| @@ -1587,6 +1587,7 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) { |
| IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) |
| IPC_MESSAGE_HANDLER(FrameMsg_ReportContentSecurityPolicyViolation, |
| OnReportContentSecurityPolicyViolation) |
| + IPC_MESSAGE_HANDLER(FrameMsg_DroppedNavigation, OnDroppedNavigation) |
| IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, |
| OnGetSavableResourceLinks) |
| IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, |
| @@ -4089,6 +4090,10 @@ RenderFrameImpl::getEffectiveConnectionType() { |
| return effective_connection_type_; |
| } |
| +void RenderFrameImpl::abortClientNavigation() { |
| + Send(new FrameHostMsg_AbortNavigation(routing_id_)); |
| +} |
| + |
| void RenderFrameImpl::didChangeSelection(bool is_empty_selection) { |
| if (!GetRenderWidget()->input_handler().handling_input_event() && |
| !handling_select_range_) |
| @@ -5272,6 +5277,16 @@ void RenderFrameImpl::OnReportContentSecurityPolicyViolation( |
| BuildWebContentSecurityPolicyViolation(violation_params)); |
| } |
| +void RenderFrameImpl::OnDroppedNavigation(int navigation_id) { |
| + // Check that the navigation dropped was the last one sent to the browser |
| + // process. If not, do nothing as the browser process still has some more |
| + // navigations to process. |
| + if (navigation_id != navigation_id_) |
| + return; |
| + browser_side_navigation_pending_ = false; |
| + frame_->clientDroppedNavigation(); |
|
Charlie Reis
2017/03/20 06:34:44
Why does this code need to wait until we hear back
clamy
2017/03/20 14:56:22
The patch is fixing two issues: the first one is c
Charlie Reis
2017/03/20 23:02:49
Right.
|
| +} |
| + |
| WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( |
| const NavigationPolicyInfo& info) { |
| // A content initiated navigation may have originated from a link-click, |
| @@ -6353,7 +6368,7 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) { |
| blink::WebURLRequest::ServiceWorkerMode::All, |
| GetRequestContextTypeForWebURLRequest(info.urlRequest), |
| GetMixedContentContextTypeForWebURLRequest(info.urlRequest), |
| - initiator_origin); |
| + initiator_origin, ++navigation_id_); |
| if (!info.form.isNull()) { |
| WebSearchableFormData web_searchable_form_data(info.form); |