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

Unified Diff: Source/core/frame/History.cpp

Issue 669013002: Remove BackForwardClient, cleanup starting a history navigation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 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 | « Source/core/core.gypi ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/History.cpp
diff --git a/Source/core/frame/History.cpp b/Source/core/frame/History.cpp
index 5d49620f10418b896663096e7a244be2ab8b8a32..de824c4b3bf5da585ecaa82ad4e0c580692f4f59 100644
--- a/Source/core/frame/History.cpp
+++ b/Source/core/frame/History.cpp
@@ -34,7 +34,6 @@
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
#include "core/loader/HistoryItem.h"
-#include "core/page/BackForwardClient.h"
#include "core/page/Page.h"
#include "platform/weborigin/KURL.h"
#include "platform/weborigin/SecurityOrigin.h"
@@ -55,11 +54,9 @@ void History::trace(Visitor* visitor)
unsigned History::length() const
{
- if (!m_frame)
- return 0;
- if (!m_frame->page())
+ if (!m_frame || !m_frame->loader().client())
return 0;
- return m_frame->page()->backForward().backForwardListCount();
+ return m_frame->loader().client()->backForwardLength();
}
SerializedScriptValue* History::state()
@@ -101,7 +98,7 @@ void History::forward(ExecutionContext* context)
void History::go(ExecutionContext* context, int distance)
{
- if (!m_frame)
+ if (!m_frame || !m_frame->loader().client())
return;
ASSERT(isMainThread());
@@ -112,7 +109,10 @@ void History::go(ExecutionContext* context, int distance)
if (!activeDocument->canNavigate(*m_frame))
return;
- m_frame->navigationScheduler().scheduleHistoryNavigation(distance);
+ if (distance)
+ m_frame->loader().client()->navigateBackForward(distance);
+ else
+ m_frame->navigationScheduler().scheduleReload();
}
KURL History::urlForState(const String& urlString)
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698