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

Unified Diff: content/browser/frame_host/navigation_entry_impl.h

Issue 2383303002: Notify the renderer if a history navigation has no subframe items. (Closed)
Patch Set: Created 4 years, 3 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/navigation_entry_impl.h
diff --git a/content/browser/frame_host/navigation_entry_impl.h b/content/browser/frame_host/navigation_entry_impl.h
index 04162896b4793be53730fc0817eeb24e33b95314..c0953af1a2f40ab70d7eb8b79124ba4a9abf78dd 100644
--- a/content/browser/frame_host/navigation_entry_impl.h
+++ b/content/browser/frame_host/navigation_entry_impl.h
@@ -184,6 +184,7 @@ class CONTENT_EXPORT NavigationEntryImpl
const FrameNavigationEntry& frame_entry,
bool is_same_document_history_load,
bool is_history_navigation_in_new_child,
+ bool has_subtree_history_items,
bool has_committed_real_load,
bool intended_as_new_entry,
int pending_offset_to_send,
@@ -227,6 +228,15 @@ class CONTENT_EXPORT NavigationEntryImpl
// there is one in this NavigationEntry.
FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const;
+ // Returns whether the TreeNode associated with |frame_tree_node| has any
+ // children. If not, the renderer process does not need to ask the browser
+ // when new subframes are created during a back/forward navigation.
+ // TODO(creis): Send a data structure with all unique names in the subtree,
+ // along with any corresponding same-process PageStates. The renderer only
+ // needs to ask the browser process to handle the cross-process cases.
+ // See https://crbug.com/639842.
+ bool HasSubtreeHistoryItems(FrameTreeNode* frame_tree_node) const;
+
// Removes any subframe FrameNavigationEntries that match the unique name of
// |frame_tree_node|, and all of their children. There should be at most one,
// since collisions are avoided but leave old FrameNavigationEntries in the

Powered by Google App Engine
This is Rietveld 408576698