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

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

Issue 1340263003: Rename IdleCallbackDeadline to IdleDeadline to be in sync with spec. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/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 6b738bfd0a6e708400318dae725b24558e860ad0..34b65b67840c7d0f1b3c7f15adeeba7604da28d3 100644
--- a/Source/core/dom/ScriptedIdleTaskController.cpp
+++ b/Source/core/dom/ScriptedIdleTaskController.cpp
@@ -32,12 +32,12 @@ public:
static void idleTaskFired(PassRefPtr<IdleRequestCallbackWrapper> callbackWrapper, double deadlineSeconds)
{
// TODO(rmcilroy): Implement clamping of deadline in some form.
- callbackWrapper->controller()->callbackFired(callbackWrapper->id(), deadlineSeconds, IdleCallbackDeadline::CallbackType::CalledWhenIdle);
+ callbackWrapper->controller()->callbackFired(callbackWrapper->id(), deadlineSeconds, IdleDeadline::CallbackType::CalledWhenIdle);
}
static void timeoutFired(PassRefPtr<IdleRequestCallbackWrapper> callbackWrapper)
{
- callbackWrapper->controller()->callbackFired(callbackWrapper->id(), monotonicallyIncreasingTime(), IdleCallbackDeadline::CallbackType::CalledByTimeout);
+ callbackWrapper->controller()->callbackFired(callbackWrapper->id(), monotonicallyIncreasingTime(), IdleDeadline::CallbackType::CalledByTimeout);
}
ScriptedIdleTaskController::CallbackId id() const { return m_id; }
@@ -95,13 +95,13 @@ void ScriptedIdleTaskController::cancelCallback(CallbackId id)
m_callbacks.remove(id);
}
-void ScriptedIdleTaskController::callbackFired(CallbackId id, double deadlineSeconds, IdleCallbackDeadline::CallbackType callbackType)
+void ScriptedIdleTaskController::callbackFired(CallbackId id, double deadlineSeconds, IdleDeadline::CallbackType callbackType)
{
if (!m_callbacks.contains(id))
return;
if (m_suspended) {
- if (callbackType == IdleCallbackDeadline::CallbackType::CalledByTimeout) {
+ if (callbackType == IdleDeadline::CallbackType::CalledByTimeout) {
// Queue for execution when we are resumed.
m_pendingTimeouts.append(id);
}
@@ -112,7 +112,7 @@ void ScriptedIdleTaskController::callbackFired(CallbackId id, double deadlineSec
runCallback(id, deadlineSeconds, callbackType);
}
-void ScriptedIdleTaskController::runCallback(CallbackId id, double deadlineSeconds, IdleCallbackDeadline::CallbackType callbackType)
+void ScriptedIdleTaskController::runCallback(CallbackId id, double deadlineSeconds, IdleDeadline::CallbackType callbackType)
{
ASSERT(!m_suspended);
auto callback = m_callbacks.take(id);
@@ -120,7 +120,7 @@ void ScriptedIdleTaskController::runCallback(CallbackId id, double deadlineSecon
return;
// TODO(rmcilroy): Add devtools tracing.
- callback->handleEvent(IdleCallbackDeadline::create(deadlineSeconds, callbackType));
+ callback->handleEvent(IdleDeadline::create(deadlineSeconds, callbackType));
}
void ScriptedIdleTaskController::stop()
@@ -142,7 +142,7 @@ void ScriptedIdleTaskController::resume()
Vector<CallbackId> pendingTimeouts;
m_pendingTimeouts.swap(pendingTimeouts);
for (auto& id : pendingTimeouts)
- runCallback(id, monotonicallyIncreasingTime(), IdleCallbackDeadline::CallbackType::CalledByTimeout);
+ runCallback(id, monotonicallyIncreasingTime(), IdleDeadline::CallbackType::CalledByTimeout);
// Repost idle tasks for any remaining callbacks.
for (auto& callback : m_callbacks) {
« 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