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 8d97ef39871055859583b4c36a48b7e4d78c0423..b009b70da4c136e17d8c1285dbc9e745ece5aa10 100644 |
--- a/content/browser/frame_host/navigation_entry_impl.h |
+++ b/content/browser/frame_host/navigation_entry_impl.h |
@@ -13,6 +13,7 @@ |
#include "content/browser/frame_host/frame_tree_node.h" |
#include "content/browser/site_instance_impl.h" |
#include "content/common/frame_message_enums.h" |
+#include "content/common/page_state_serialization.h" |
#include "content/public/browser/favicon_status.h" |
#include "content/public/browser/global_request_id.h" |
#include "content/public/browser/navigation_entry.h" |
@@ -186,7 +187,7 @@ class CONTENT_EXPORT NavigationEntryImpl |
SiteInstanceImpl* site_instance, |
const GURL& url, |
const Referrer& referrer, |
- const PageState& page_state); |
+ const ExplodedFrameState& frame_state); |
// Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if |
// there is one in this NavigationEntry. |
@@ -201,6 +202,11 @@ class CONTENT_EXPORT NavigationEntryImpl |
FrameNavigationEntry* GetFrameEntryByUniqueName( |
const std::string& unique_name) const; |
+ // In OOPIF modes, this updates the cached copy of the full PageState whenever |
+ // a frame's individual state changes. Keeping a cached copy is necessary to |
+ // be able to return a const ref from GetPageState. |
+ void UpdatePageState(); |
+ |
void set_unique_id(int unique_id) { |
unique_id_ = unique_id; |
} |
@@ -394,6 +400,12 @@ class CONTENT_EXPORT NavigationEntryImpl |
base::Time timestamp_; |
int http_status_code_; |
+ // In default Chrome, this is the PageState reported from the renderer. In |
+ // OOPIF modes, this is a cached copy of the PageState generated from the |
+ // various FrameNavigationEntry::frame_states. In either case, it is persisted |
+ // to support session/tab restore. |
+ PageState page_state_; |
+ |
// This member is not persisted with session restore because it is transient. |
// If the post request succeeds, this field is cleared since the same |
// information is stored in |content_state_| above. It is also only shallow |