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

Unified Diff: Source/core/loader/NavigationScheduler.cpp

Issue 1330653003: Oilpan: tidy up NavigationScheduler. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove redundant constructor hiding Created 5 years, 3 months 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/web/WebLocalFrameImpl.cpp » ('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 fb383ba36357f39070c5ddb80384382b3addf2c4..0b047a83f09e5f5f6bfa7c4efd3b9afba82a77b8 100644
--- a/Source/core/loader/NavigationScheduler.cpp
+++ b/Source/core/loader/NavigationScheduler.cpp
@@ -48,6 +48,7 @@
#include "core/page/Page.h"
#include "platform/SharedBuffer.h"
#include "platform/UserGestureIndicator.h"
+#include "platform/scheduler/CancellableTaskFactory.h"
#include "public/platform/Platform.h"
#include "wtf/CurrentTime.h"
@@ -56,14 +57,14 @@ namespace blink {
unsigned NavigationDisablerForBeforeUnload::s_navigationDisableCount = 0;
FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame* frame)
- : m_navigationScheduler(frame->navigationScheduler())
+ : m_navigationScheduler(&frame->navigationScheduler())
{
- m_navigationScheduler.disableFrameNavigation();
+ m_navigationScheduler->disableFrameNavigation();
}
FrameNavigationDisabler::~FrameNavigationDisabler()
{
- m_navigationScheduler.enableFrameNavigation();
+ m_navigationScheduler->enableFrameNavigation();
}
class ScheduledNavigation : public NoBaseWillBeGarbageCollectedFinalized<ScheduledNavigation> {
@@ -267,7 +268,7 @@ private:
NavigationScheduler::NavigationScheduler(LocalFrame* frame)
: m_frame(frame)
- , m_navigateTaskFactory(WTF::bind(&NavigationScheduler::navigateTask, this))
+ , m_navigateTaskFactory(CancellableTaskFactory::create(this, &NavigationScheduler::navigateTask))
, m_navigationDisableCount(0)
{
}
@@ -414,22 +415,22 @@ void NavigationScheduler::startTimer()
return;
ASSERT(m_frame->page());
- if (m_navigateTaskFactory.isPending())
+ if (m_navigateTaskFactory->isPending())
return;
if (!m_redirect->shouldStartTimer(m_frame))
return;
Platform::current()->currentThread()->scheduler()->loadingTaskRunner()->postDelayedTask(
- FROM_HERE, m_navigateTaskFactory.cancelAndCreate(), m_redirect->delay());
+ FROM_HERE, m_navigateTaskFactory->cancelAndCreate(), m_redirect->delay());
InspectorInstrumentation::frameScheduledNavigation(m_frame, m_redirect->delay());
}
void NavigationScheduler::cancel()
{
- if (m_navigateTaskFactory.isPending())
+ if (m_navigateTaskFactory->isPending())
InspectorInstrumentation::frameClearedScheduledNavigation(m_frame);
- m_navigateTaskFactory.cancel();
+ m_navigateTaskFactory->cancel();
m_redirect.clear();
}
« no previous file with comments | « Source/core/loader/NavigationScheduler.h ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698