Rename to_different_document to should_show_loading_ui in LoadingStateChanged() callbacks
Currently, the purpose of this bit is to indicate to embedders whether
or not a navigation should show loading UI indicators. Currently, same
document navigations never show loading UI because they're always
processed synchronously, so there's no point in flipping to showing
loading UI only to immediately turn it off again. However, in a future
patch, we will introduce a new asynchronous kind of same-document
navigation (as part of the new appHistory API). In preparation for
that, rename to_different_document to should_show_loading_ui to better
indicate what the bit means and how it should be used.
Bug: 1241202
Change-Id: I8c890da3571b80b361644fdf8fbb366336a09f1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3268574
Reviewed-by: Toni Barzic <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Chris Hamilton <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Reviewed-by: Dominick Ng <[email protected]>
Reviewed-by: Tommy Nyquist <[email protected]>
Owners-Override: Charlie Reis <[email protected]>
Commit-Queue: Nate Chapin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#940997}
diff --git a/content/browser/renderer_host/frame_tree_node.cc b/content/browser/renderer_host/frame_tree_node.cc
index 63570a96..043f0db 100644
--- a/content/browser/renderer_host/frame_tree_node.cc
+++ b/content/browser/renderer_host/frame_tree_node.cc
@@ -555,13 +555,13 @@
render_manager_.CleanUpNavigation();
}
-void FrameTreeNode::DidStartLoading(bool to_different_document,
+void FrameTreeNode::DidStartLoading(bool should_show_loading_ui,
bool was_previously_loading) {
TRACE_EVENT2("navigation", "FrameTreeNode::DidStartLoading",
- "frame_tree_node", frame_tree_node_id(), "to different document",
- to_different_document);
+ "frame_tree_node", frame_tree_node_id(),
+ "should_show_loading_ui ", should_show_loading_ui);
- frame_tree_->DidStartLoadingNode(*this, to_different_document,
+ frame_tree_->DidStartLoadingNode(*this, should_show_loading_ui,
was_previously_loading);
// Set initial load progress and update overall progress. This will notify