OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/scheduler/child/web_scheduler_impl.h" | 5 #include "components/scheduler/child/web_scheduler_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "components/scheduler/child/web_task_runner_impl.h" | 9 #include "components/scheduler/child/web_task_runner_impl.h" |
10 #include "components/scheduler/child/worker_scheduler.h" | 10 #include "components/scheduler/child/worker_scheduler.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 | 81 |
82 blink::WebTaskRunner* WebSchedulerImpl::loadingTaskRunner() { | 82 blink::WebTaskRunner* WebSchedulerImpl::loadingTaskRunner() { |
83 return loading_web_task_runner_.get(); | 83 return loading_web_task_runner_.get(); |
84 } | 84 } |
85 | 85 |
86 blink::WebTaskRunner* WebSchedulerImpl::timerTaskRunner() { | 86 blink::WebTaskRunner* WebSchedulerImpl::timerTaskRunner() { |
87 return timer_web_task_runner_.get(); | 87 return timer_web_task_runner_.get(); |
88 } | 88 } |
89 | 89 |
90 void WebSchedulerImpl::postTimerTaskAt( | |
91 const blink::WebTraceLocation& web_location, | |
92 blink::WebTaskRunner::Task* task, | |
93 double monotonicTime) { | |
94 DCHECK(timer_task_runner_); | |
95 tracked_objects::Location location(web_location.functionName(), | |
96 web_location.fileName(), -1, nullptr); | |
97 timer_task_runner_->PostDelayedTaskAt( | |
98 location, | |
99 base::Bind(&WebTaskRunnerImpl::runTask, | |
100 base::Passed(scoped_ptr<blink::WebTaskRunner::Task>(task))), | |
101 base::TimeTicks() + base::TimeDelta::FromSecondsD(monotonicTime)); | |
102 } | |
103 | |
104 blink::WebPassOwnPtr<blink::WebViewScheduler> | 90 blink::WebPassOwnPtr<blink::WebViewScheduler> |
105 WebSchedulerImpl::createWebViewScheduler(blink::WebView*) { | 91 WebSchedulerImpl::createWebViewScheduler(blink::WebView*) { |
106 NOTREACHED(); | 92 NOTREACHED(); |
107 return nullptr; | 93 return nullptr; |
108 } | 94 } |
109 | 95 |
110 } // namespace scheduler | 96 } // namespace scheduler |
OLD | NEW |