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

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

Issue 1102563003: Fill in FrameNavigationEntries for auto subframe navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Relax check Created 5 years, 7 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_navigation_entry.h
diff --git a/content/browser/frame_host/frame_navigation_entry.h b/content/browser/frame_host/frame_navigation_entry.h
index 2d38a2533f1edb63b280e12f449cacbce0697cf7..15d224ca1887917540d9e2c71f2b60ba00b7fb22 100644
--- a/content/browser/frame_host/frame_navigation_entry.h
+++ b/content/browser/frame_host/frame_navigation_entry.h
@@ -24,8 +24,13 @@ namespace content {
class CONTENT_EXPORT FrameNavigationEntry
: public base::RefCounted<FrameNavigationEntry> {
public:
- FrameNavigationEntry();
- FrameNavigationEntry(SiteInstanceImpl* site_instance,
+ // TODO(creis): We should not use FTN IDs here, since they will change if you
+ // leave a page and come back later. We should evaluate whether Blink's
+ // frame sequence numbers or unique names would work instead, similar to
+ // HistoryNode.
+ explicit FrameNavigationEntry(int64 frame_tree_node_id);
+ FrameNavigationEntry(int64 frame_tree_node_id,
+ SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer);
@@ -33,6 +38,17 @@ class CONTENT_EXPORT FrameNavigationEntry
// independently from the original.
FrameNavigationEntry* Clone() const;
+ // Updates all the members of this entry.
+ void UpdateEntry(SiteInstanceImpl* site_instance,
+ const GURL& url,
+ const Referrer& referrer);
+
+ // The ID of the FrameTreeNode this entry is for. -1 for the main frame,
+ // since we don't always know the FrameTreeNode ID when creating the overall
+ // NavigationEntry.
+ // TODO(creis): Replace with frame sequence number or unique name.
+ int64 frame_tree_node_id() const { return frame_tree_node_id_; }
+
// The SiteInstance responsible for rendering this frame. All frames sharing
// a SiteInstance must live in the same process. This is a refcounted pointer
// that keeps the SiteInstance (not necessarily the process) alive as long as
@@ -62,6 +78,7 @@ class CONTENT_EXPORT FrameNavigationEntry
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
// See the accessors above for descriptions.
+ int64 frame_tree_node_id_;
scoped_refptr<SiteInstanceImpl> site_instance_;
GURL url_;
Referrer referrer_;

Powered by Google App Engine
This is Rietveld 408576698