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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1425303002: OOPIF: Stop using HistoryController and refactor UpdateState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit Created 5 years, 1 month 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/renderer/render_view_browsertest.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 075472f3c97582bd5adb887babaf7d52e8930e49..3fd54649f5a3d2721006c42e404879f127eb71f7 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -801,7 +801,9 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params,
// along with the RenderView automatically.
mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this);
- history_controller_.reset(new HistoryController(this));
+ // We don't use HistoryController in OOPIF-enabled modes.
+ if (!SiteIsolationPolicy::UseSubframeNavigationEntries())
+ history_controller_.reset(new HistoryController(this));
new IdleUserDetector(this);
@@ -1475,13 +1477,8 @@ void RenderViewImpl::OnSetInLiveResize(bool in_live_resize) {
///////////////////////////////////////////////////////////////////////////////
void RenderViewImpl::SendUpdateState() {
- // Don't send state updates when using subframe FrameNavigationEntries until
- // PageState and HistoryController have been updated. For now, the current
- // entry's root WebHistoryItem sometimes points to data for a subframe (e.g.,
- // after a subframe back/forward).
- // TODO(creis): Fix this in https://crbug.com/545219.
- if (SiteIsolationPolicy::UseSubframeNavigationEntries())
- return;
+ // We don't use this path in OOPIF-enabled modes.
+ DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
HistoryEntry* entry = history_controller_->GetCurrentEntry();
if (!entry)
@@ -1860,6 +1857,11 @@ gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect(
}
void RenderViewImpl::StartNavStateSyncTimerIfNecessary() {
+ // TODO(creis): Move this to RenderFrameHost. In the meantime, we'll ignore
+ // state changes between navigation events in OOPIF-enabled modes.
+ if (SiteIsolationPolicy::UseSubframeNavigationEntries())
+ return;
+
int delay;
if (send_content_state_immediately_)
delay = 0;
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698