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

Unified Diff: Source/core/dom/ScriptedIdleTaskController.cpp

Issue 1316323002: Remove redundant DocumentLoadTiming references. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove redundant doc-time baselining Created 5 years, 4 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/dom/ScriptedIdleTaskController.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptedIdleTaskController.cpp
diff --git a/Source/core/dom/ScriptedIdleTaskController.cpp b/Source/core/dom/ScriptedIdleTaskController.cpp
index bd4830ce8d902aee7276947f4cab11b0ece47438..615d10eb248a06b4e69699e1f23fff698b826ab2 100644
--- a/Source/core/dom/ScriptedIdleTaskController.cpp
+++ b/Source/core/dom/ScriptedIdleTaskController.cpp
@@ -7,7 +7,6 @@
#include "core/dom/ExecutionContext.h"
#include "core/dom/IdleRequestCallback.h"
-#include "core/loader/DocumentLoadTiming.h"
#include "platform/Logging.h"
#include "platform/TraceEvent.h"
#include "public/platform/Platform.h"
@@ -45,7 +44,7 @@ public:
PassRefPtrWillBeRawPtr<ScriptedIdleTaskController> controller() const { return m_controller; }
private:
- explicit IdleRequestCallbackWrapper(ScriptedIdleTaskController::CallbackId id, PassRefPtrWillBeRawPtr<ScriptedIdleTaskController> controller)
+ IdleRequestCallbackWrapper(ScriptedIdleTaskController::CallbackId id, PassRefPtrWillBeRawPtr<ScriptedIdleTaskController> controller)
: m_id(id)
, m_controller(controller)
{
@@ -57,9 +56,8 @@ private:
} // namespace internal
-ScriptedIdleTaskController::ScriptedIdleTaskController(ExecutionContext* context, const DocumentLoadTiming& timing)
+ScriptedIdleTaskController::ScriptedIdleTaskController(ExecutionContext* context)
: ActiveDOMObject(context)
- , m_timing(timing)
, m_scheduler(Platform::current()->currentThread()->scheduler())
, m_nextCallbackId(0)
, m_suspended(false)
@@ -111,11 +109,10 @@ void ScriptedIdleTaskController::callbackFired(CallbackId id, double deadlineSec
return;
}
- double deadlineMillis = 1000.0 * m_timing.monotonicTimeToZeroBasedDocumentTime(deadlineSeconds);
- runCallback(id, deadlineMillis, callbackType);
+ runCallback(id, deadlineSeconds, callbackType);
}
-void ScriptedIdleTaskController::runCallback(CallbackId id, double deadlineMillis, IdleCallbackDeadline::CallbackType callbackType)
+void ScriptedIdleTaskController::runCallback(CallbackId id, double deadlineSeconds, IdleCallbackDeadline::CallbackType callbackType)
{
ASSERT(!m_suspended);
auto callback = m_callbacks.take(id);
@@ -123,7 +120,7 @@ void ScriptedIdleTaskController::runCallback(CallbackId id, double deadlineMilli
return;
// TODO(rmcilroy): Add devtools tracing.
- callback->handleEvent(IdleCallbackDeadline::create(deadlineMillis, callbackType, m_timing));
+ callback->handleEvent(IdleCallbackDeadline::create(deadlineSeconds, callbackType));
}
void ScriptedIdleTaskController::stop()
« no previous file with comments | « Source/core/dom/ScriptedIdleTaskController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698