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

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

Issue 1309423004: Introduce WebTaskRunner Patch 4/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try and fix compile 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 | « components/scheduler/child/web_scheduler_impl.h ('k') | components/scheduler/child/webthread_base.h » ('j') | 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 5a59277aa272ab6b41c5e5978909ed0c7709ea29..9bf2c0583bff58572a8b4210db7820cdd7bc4800 100644
--- a/components/scheduler/child/web_scheduler_impl.cc
+++ b/components/scheduler/child/web_scheduler_impl.cc
@@ -19,7 +19,6 @@ WebSchedulerImpl::WebSchedulerImpl(
scoped_refptr<TaskQueue> timer_task_runner)
: child_scheduler_(child_scheduler),
idle_task_runner_(idle_task_runner),
- loading_task_runner_(loading_task_runner),
timer_task_runner_(timer_task_runner),
loading_web_task_runner_(new WebTaskRunnerImpl(loading_task_runner)),
timer_web_task_runner_(new WebTaskRunnerImpl(timer_task_runner)) {}
@@ -44,10 +43,6 @@ void WebSchedulerImpl::runIdleTask(scoped_ptr<blink::WebThread::IdleTask> task,
task->run((deadline - base::TimeTicks()).InSecondsF());
}
-void WebSchedulerImpl::runTask(scoped_ptr<blink::WebThread::Task> task) {
- task->run();
-}
-
void WebSchedulerImpl::postIdleTask(const blink::WebTraceLocation& web_location,
blink::WebThread::IdleTask* task) {
DCHECK(idle_task_runner_);
@@ -83,46 +78,6 @@ void WebSchedulerImpl::postIdleTaskAfterWakeup(
base::Bind(&WebSchedulerImpl::runIdleTask, base::Passed(&scoped_task)));
}
-void WebSchedulerImpl::postLoadingTask(
- const blink::WebTraceLocation& web_location,
- blink::WebThread::Task* task) {
- DCHECK(loading_task_runner_);
- scoped_ptr<blink::WebThread::Task> scoped_task(task);
- tracked_objects::Location location(web_location.functionName(),
- web_location.fileName(), -1, nullptr);
- loading_task_runner_->PostTask(
- location,
- base::Bind(&WebSchedulerImpl::runTask, base::Passed(&scoped_task)));
-}
-
-void WebSchedulerImpl::postTimerTask(
- const blink::WebTraceLocation& web_location,
- blink::WebThread::Task* task,
- long long delayMs) {
- 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::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));
-}
-
blink::WebTaskRunner* WebSchedulerImpl::loadingTaskRunner() {
return loading_web_task_runner_.get();
}
@@ -133,20 +88,6 @@ blink::WebTaskRunner* WebSchedulerImpl::timerTaskRunner() {
void WebSchedulerImpl::postTimerTaskAt(
const blink::WebTraceLocation& web_location,
- blink::WebThread::Task* task,
- double monotonicTime) {
- 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_->PostDelayedTaskAt(
- location,
- base::Bind(&WebSchedulerImpl::runTask, base::Passed(&scoped_task)),
- base::TimeTicks() + base::TimeDelta::FromSecondsD(monotonicTime));
-}
-
-void WebSchedulerImpl::postTimerTaskAt(
- const blink::WebTraceLocation& web_location,
blink::WebTaskRunner::Task* task,
double monotonicTime) {
DCHECK(timer_task_runner_);
« no previous file with comments | « components/scheduler/child/web_scheduler_impl.h ('k') | components/scheduler/child/webthread_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698