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

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

Issue 1184423005: Add item and document sequence numbers to FrameNavigationEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add const; git cl format Created 5 years, 6 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
« no previous file with comments | « no previous file | content/browser/frame_host/frame_navigation_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6fbd7541730e60ad6fba17ee69c0f7c7e1e869f6..7bc591cb72f9249814af6990560797436714f8f6 100644
--- a/content/browser/frame_host/frame_navigation_entry.h
+++ b/content/browser/frame_host/frame_navigation_entry.h
@@ -27,10 +27,11 @@ class CONTENT_EXPORT FrameNavigationEntry
public:
// 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.
+ // unique names would work instead, similar to HistoryNode.
explicit FrameNavigationEntry(int64 frame_tree_node_id);
FrameNavigationEntry(int64 frame_tree_node_id,
+ int64 item_sequence_number,
+ int64 document_sequence_number,
SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer);
@@ -40,7 +41,9 @@ class CONTENT_EXPORT FrameNavigationEntry
FrameNavigationEntry* Clone() const;
// Updates all the members of this entry.
- void UpdateEntry(SiteInstanceImpl* site_instance,
+ void UpdateEntry(int64 item_sequence_number,
+ int64 document_sequence_number,
+ SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer,
const PageState& page_state);
@@ -51,6 +54,20 @@ class CONTENT_EXPORT FrameNavigationEntry
// TODO(creis): Replace with frame sequence number or unique name.
int64 frame_tree_node_id() const { return frame_tree_node_id_; }
+ // Keeps track of where this entry belongs in the frame's session history.
+ // The item sequence number identifies each stop in the back/forward history
+ // and is globally unique. The document sequence number increments for each
+ // new document and is also globally unique. In-page navigations get a new
+ // item sequence number but the same document sequence number.
+ void set_item_sequence_number(int64 item_sequence_number) {
+ item_sequence_number_ = item_sequence_number;
+ }
+ int64 item_sequence_number() const { return item_sequence_number_; }
+ void set_document_sequence_number(int64 document_sequence_number) {
+ document_sequence_number_ = document_sequence_number;
+ }
+ int64 document_sequence_number() const { return document_sequence_number_; }
+
// 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
@@ -84,6 +101,8 @@ class CONTENT_EXPORT FrameNavigationEntry
// See the accessors above for descriptions.
int64 frame_tree_node_id_;
+ int64 item_sequence_number_;
+ int64 document_sequence_number_;
scoped_refptr<SiteInstanceImpl> site_instance_;
GURL url_;
Referrer referrer_;
« no previous file with comments | « no previous file | content/browser/frame_host/frame_navigation_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698