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

Unified Diff: components/scheduler/child/web_scheduler_impl.cc

Issue 1256823007: Chromium support for WebScheduler::postTimerTask with high precision (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « components/scheduler/child/web_scheduler_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/web_scheduler_impl.cc
diff --git a/components/scheduler/child/web_scheduler_impl.cc b/components/scheduler/child/web_scheduler_impl.cc
index 6b56cc0324379dfa8a252c6dc4368f0b0740ba75..9a0ca5a73b617142b44ec6ed57bd988f0413b291 100644
--- a/components/scheduler/child/web_scheduler_impl.cc
+++ b/components/scheduler/child/web_scheduler_impl.cc
@@ -106,6 +106,20 @@ void WebSchedulerImpl::postTimerTask(
base::TimeDelta::FromMilliseconds(delayMs));
}
+void WebSchedulerImpl::postTimerTask(
+ const blink::WebTraceLocation& web_location,
+ blink::WebThread::Task* task,
+ double delaySecs) {
+ DCHECK(timer_task_runner_);
+ scoped_ptr<blink::WebThread::Task> scoped_task(task);
+ tracked_objects::Location location(web_location.functionName(),
+ web_location.fileName(), -1, nullptr);
+ timer_task_runner_->PostDelayedTask(
+ location,
+ base::Bind(&WebSchedulerImpl::runTask, base::Passed(&scoped_task)),
+ base::TimeDelta::FromSecondsD(delaySecs));
+}
+
void WebSchedulerImpl::postTimerTaskAt(
const blink::WebTraceLocation& web_location,
blink::WebThread::Task* task,
« no previous file with comments | « components/scheduler/child/web_scheduler_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698