Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Unified Diff: content/browser/frame_host/frame_tree_node.cc

Issue 1545973002: Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698