Chromium Code Reviews| Index: content/browser/frame_host/frame_tree_node.cc |
| diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc |
| index b975a051106a54524124bb6ecd13a52cfb34c602..3589f2383cef2f726fa3512b9712cb42ecaeb8a8 100644 |
| --- a/content/browser/frame_host/frame_tree_node.cc |
| +++ b/content/browser/frame_host/frame_tree_node.cc |
| @@ -398,4 +398,27 @@ void FrameTreeNode::DidFocus() { |
| FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeFocused(this)); |
| } |
| +void FrameTreeNode::BeforeUnloadCanceled() { |
| + if (!IsMainFrame()) |
| + return; |
| + |
| + RenderFrameHostImpl* current_frame_host = |
| + render_manager_.current_frame_host(); |
| + DCHECK(current_frame_host); |
| + current_frame_host->ResetLoadingState(); |
| + |
| + RenderFrameHostImpl* pending_frame_host = |
| + render_manager_.pending_frame_host(); |
| + if (pending_frame_host) |
| + pending_frame_host->ResetLoadingState(); |
|
nasko
2016/01/16 00:13:51
Do we need to touch the pending and speculative RF
clamy
2016/01/19 13:31:18
BrowserTest.CancelBeforeUnloadResetsURL is failing
|
| + |
| + if (IsBrowserSideNavigationEnabled()) { |
| + RenderFrameHostImpl* speculative_frame_host = |
| + render_manager_.speculative_frame_host(); |
| + if (speculative_frame_host) |
| + speculative_frame_host->ResetLoadingState(); |
| + } |
| +} |
| + |
| + |
| } // namespace content |