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..f83dbe29e411ded016e9620b1dfc50f0a5199e0d 100644 |
--- a/content/browser/frame_host/frame_tree_node.cc |
+++ b/content/browser/frame_host/frame_tree_node.cc |
@@ -398,4 +398,51 @@ void FrameTreeNode::DidFocus() { |
FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeFocused(this)); |
} |
+void FrameTreeNode::RenderViewTerminated(RenderViewHostImpl* render_view_host) { |
+ RenderFrameHostImpl* current_frame_host = |
+ render_manager_.current_frame_host(); |
+ DCHECK(current_frame_host); |
+ if (current_frame_host->render_view_host() == render_view_host) |
nasko
2016/01/15 01:19:16
Loading state is no longer associated with RenderV
clamy
2016/01/15 16:47:44
Done.
|
+ current_frame_host->ResetLoadingState(); |
+ |
+ RenderFrameHostImpl* pending_frame_host = |
+ render_manager_.pending_frame_host(); |
+ if (pending_frame_host && |
+ pending_frame_host->render_view_host() == render_view_host) { |
+ pending_frame_host->ResetLoadingState(); |
+ } |
+ |
+ if (IsBrowserSideNavigationEnabled()) { |
+ RenderFrameHostImpl* speculative_frame_host = |
+ render_manager_.speculative_frame_host(); |
+ if (speculative_frame_host && |
+ speculative_frame_host->render_view_host() == render_view_host) { |
+ speculative_frame_host->ResetLoadingState(); |
+ } |
+ } |
+} |
+ |
+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(); |
+ |
+ if (IsBrowserSideNavigationEnabled()) { |
+ RenderFrameHostImpl* speculative_frame_host = |
+ render_manager_.speculative_frame_host(); |
+ if (speculative_frame_host) |
+ speculative_frame_host->ResetLoadingState(); |
+ } |
+} |
+ |
+ |
} // namespace content |