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

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

Issue 281653003: DRAFT CL: Add FrameNavigationEntry and track subframe session histories. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 5 years, 9 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 2d38a2533f1edb63b280e12f449cacbce0697cf7..49166c67375326c5b9f06da3ee2a866d4b73db0d 100644
--- a/content/browser/frame_host/frame_navigation_entry.h
+++ b/content/browser/frame_host/frame_navigation_entry.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "content/browser/site_instance_impl.h"
+#include "content/public/common/page_state.h"
#include "content/public/common/referrer.h"
namespace content {
@@ -25,7 +26,7 @@ class CONTENT_EXPORT FrameNavigationEntry
: public base::RefCounted<FrameNavigationEntry> {
public:
FrameNavigationEntry();
- FrameNavigationEntry(SiteInstanceImpl* site_instance,
+ FrameNavigationEntry(SiteInstanceImpl* instance,
const GURL& url,
const Referrer& referrer);
@@ -33,6 +34,15 @@ class CONTENT_EXPORT FrameNavigationEntry
// independently from the original.
FrameNavigationEntry* Clone() const;
+ // The ID of the FrameTreeNode this is associated with, which does not change
+ // across process swaps or if the FrameTreeNode itself is deleted and later
+ // restored for a history navigation.
+ // TODO(creis): This should probably be set in the constructor.
+ void set_frame_tree_node_id(int frame_tree_node_id) {
+ frame_tree_node_id_ = frame_tree_node_id;
+ }
+ int 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
@@ -51,6 +61,20 @@ class CONTENT_EXPORT FrameNavigationEntry
void set_referrer(const Referrer& referrer) { referrer_ = referrer; }
const Referrer& referrer() const { return referrer_; }
+ // Keeps track of where this entry belongs in the frame's session history.
+ void set_item_sequence_number(int64 item_sequence_number) {
+ item_sequence_number_ = item_sequence_number;
+ }
+ int64 item_sequence_number() { return item_sequence_number_; }
+ void set_document_sequence_number(int64 document_sequence_number) {
+ document_sequence_number_ = document_sequence_number;
+ }
+ int64 document_sequence_number() { return document_sequence_number_; }
+
+ // TODO(creis): Make these FrameState.
+ void set_page_state(const PageState& state) { page_state_ = state; }
+ const PageState& page_state() const { return page_state_; }
+
private:
friend class base::RefCounted<FrameNavigationEntry>;
virtual ~FrameNavigationEntry();
@@ -65,6 +89,10 @@ class CONTENT_EXPORT FrameNavigationEntry
scoped_refptr<SiteInstanceImpl> site_instance_;
GURL url_;
Referrer referrer_;
+ PageState page_state_;
+ int frame_tree_node_id_;
+ int64 item_sequence_number_;
+ int64 document_sequence_number_;
DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry);
};
« 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