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

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: Addressed Nasko's comments 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..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

Powered by Google App Engine
This is Rietveld 408576698