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

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

Issue 2316003002: Notify the renderer if a history navigation has no subframe items. (Closed)
Patch Set: Fix indent. 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 4c96d55e2b7342d18cd35e31ca6ae2b681e20e3f..fa2c88e9614ec8db0e57e2a3d5ee221c228e1203 100644
--- a/content/browser/frame_host/navigation_entry_impl.h
+++ b/content/browser/frame_host/navigation_entry_impl.h
@@ -185,6 +185,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,
@@ -228,6 +229,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