| 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_task_runner_impl.h" | 5 #include "components/scheduler/child/web_task_runner_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "third_party/WebKit/public/platform/WebTraceLocation.h" | 10 #include "third_party/WebKit/public/platform/WebTraceLocation.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const blink::WebTraceLocation& web_location, | 40 const blink::WebTraceLocation& web_location, |
| 41 blink::WebTaskRunner::Task* task, | 41 blink::WebTaskRunner::Task* task, |
| 42 double delayMs) { | 42 double delayMs) { |
| 43 tracked_objects::Location location(web_location.functionName(), | 43 tracked_objects::Location location(web_location.functionName(), |
| 44 web_location.fileName(), -1, nullptr); | 44 web_location.fileName(), -1, nullptr); |
| 45 task_runner_->PostDelayedTask( | 45 task_runner_->PostDelayedTask( |
| 46 location, base::Bind(&blink::WebTaskRunner::Task::run, base::Owned(task)), | 46 location, base::Bind(&blink::WebTaskRunner::Task::run, base::Owned(task)), |
| 47 base::TimeDelta::FromMillisecondsD(delayMs)); | 47 base::TimeDelta::FromMillisecondsD(delayMs)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 blink::WebTaskRunner* WebTaskRunnerImpl::clone() { |
| 51 return new WebTaskRunnerImpl(task_runner_); |
| 52 } |
| 53 |
| 50 } // namespace scheduler | 54 } // namespace scheduler |
| OLD | NEW |