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

Unified Diff: Source/core/loader/NavigationScheduler.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/loader/NavigationScheduler.h ('k') | Source/core/page/BackForwardClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/NavigationScheduler.cpp
diff --git a/Source/core/loader/NavigationScheduler.cpp b/Source/core/loader/NavigationScheduler.cpp
index 6429a416fd7916e02ba55554a363a7caf035cf8e..1a86a8e6176b605c22268b7b05c52ea3f1a37b95 100644
--- a/Source/core/loader/NavigationScheduler.cpp
+++ b/Source/core/loader/NavigationScheduler.cpp
@@ -46,7 +46,6 @@
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
#include "core/loader/FrameLoaderStateMachine.h"
-#include "core/page/BackForwardClient.h"
#include "core/page/Page.h"
#include "platform/SharedBuffer.h"
#include "platform/UserGestureIndicator.h"
@@ -185,26 +184,6 @@ public:
}
};
-class ScheduledHistoryNavigation final : public ScheduledNavigation {
-public:
- explicit ScheduledHistoryNavigation(int historySteps)
- : ScheduledNavigation(0, false, true)
- , m_historySteps(historySteps)
- {
- }
-
- virtual void fire(LocalFrame* frame) override
- {
- OwnPtr<UserGestureIndicator> gestureIndicator = createUserGestureIndicator();
- // go(i!=0) from a frame navigates into the history of the frame only,
- // in both IE and NS (but not in Mozilla). We can't easily do that.
- frame->page()->deprecatedLocalMainFrame()->loader().client()->navigateBackForward(m_historySteps);
- }
-
-private:
- int m_historySteps;
-};
-
class ScheduledFormSubmission final : public ScheduledNavigation {
public:
ScheduledFormSubmission(PassRefPtrWillBeRawPtr<FormSubmission> submission, bool lockBackForwardList)
@@ -340,26 +319,6 @@ void NavigationScheduler::scheduleReload()
schedule(adoptPtr(new ScheduledReload));
}
-void NavigationScheduler::scheduleHistoryNavigation(int steps)
-{
- if (!shouldScheduleNavigation())
- return;
-
- // Invalid history navigations (such as history.forward() during a new load) have the side effect of cancelling any scheduled
- // redirects. We also avoid the possibility of cancelling the current load by avoiding the scheduled redirection altogether.
- BackForwardClient& backForward = m_frame->page()->backForward();
- if (steps > backForward.forwardListCount() || -steps > backForward.backListCount()) {
- cancel();
- return;
- }
-
- // In all other cases, schedule the history traversal to occur asynchronously.
- if (steps)
- schedule(adoptPtr(new ScheduledHistoryNavigation(steps)));
- else
- schedule(adoptPtr(new ScheduledReload));
-}
-
void NavigationScheduler::timerFired(Timer<NavigationScheduler>*)
{
if (!m_frame->page())
« no previous file with comments | « Source/core/loader/NavigationScheduler.h ('k') | Source/core/page/BackForwardClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698