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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1415603018: OOPIF: Support session restore by combining/splitting frame states. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up and fix bugs Created 5 years 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 | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index da841da04ba9822298635707c3de75a936dd6ed7..593b28c5daa8f02189b2f8d5be1e98e5c94eda96 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4207,8 +4207,9 @@ void WebContentsImpl::DocumentOnLoadCompleted(
NotificationService::NoDetails());
}
-void WebContentsImpl::UpdateStateForFrame(RenderFrameHost* render_frame_host,
- const PageState& page_state) {
+void WebContentsImpl::UpdateStateForFrame(
+ RenderFrameHost* render_frame_host,
+ const ExplodedFrameState& frame_state) {
DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries());
// The state update affects the last NavigationEntry associated with the given
@@ -4234,10 +4235,14 @@ void WebContentsImpl::UpdateStateForFrame(RenderFrameHost* render_frame_host,
if (frame_entry->site_instance() != rfhi->GetSiteInstance())
return;
- if (page_state == frame_entry->page_state())
- return; // Nothing to update.
+ PageState old_page_state = entry->GetPageState();
+
+ frame_entry->set_frame_state(frame_state);
+ entry->UpdatePageState();
+
+ if (entry->GetPageState() == old_page_state)
+ return; // No reason to notify.
- frame_entry->set_page_state(page_state);
controller_.NotifyEntryChanged(entry);
}
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698