Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_impl.cc |
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
| index 4b2a6f63eb26d047b9ec8d1958896be2eb9d8925..4750440d467dad9947a95ec5b10dab37ab687d69 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.cc |
| +++ b/content/browser/frame_host/render_frame_host_impl.cc |
| @@ -1028,6 +1028,17 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) { |
| true, // is_synchronous |
| false, // is_srcdoc |
| base::TimeTicks::Now()); |
| + // PlzNavigate |
| + if (IsBrowserSideNavigationEnabled()) { |
| + // PlzNavigate: synchronous loads happen in the renderer, and the browser |
| + // has not been notified about the start of the load yet. Do it now. |
| + if (!is_loading()) { |
| + bool was_loading = frame_tree_node()->frame_tree()->IsLoading(); |
| + is_loading_ = true; |
| + frame_tree_node()->DidStartLoading(true, was_loading); |
| + } |
| + pending_commit_ = false; |
| + } |
| } |
| accessibility_reset_count_ = 0; |
| @@ -1045,10 +1056,6 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) { |
| RenderWidgetHostImpl::From(GetView()->GetRenderWidgetHost()) |
| ->StartNewContentRenderingTimeout(); |
| } |
| - |
| - // PlzNavigate |
| - if (IsBrowserSideNavigationEnabled()) |
| - pending_commit_ = false; |
| } |
| void RenderFrameHostImpl::OnUpdateState(const PageState& state) { |
| @@ -1703,6 +1710,7 @@ void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) { |
| } |
| void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) { |
| + DCHECK(!IsBrowserSideNavigationEnabled() || !to_different_document); |
|
nasko
2016/02/10 23:02:19
If the renderer is no longer supposed to be sendin
clamy
2016/02/11 15:36:40
Done.
|
| bool was_previously_loading = frame_tree_node_->frame_tree()->IsLoading(); |
| is_loading_ = true; |
| frame_tree_node_->DidStartLoading(to_different_document, |