| 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/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "components/scheduler/base/task_queue.h" | 10 #include "components/scheduler/base/task_queue.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 std::unique_ptr<blink::WebTaskRunner> WebTaskRunnerImpl::clone() { | 63 std::unique_ptr<blink::WebTaskRunner> WebTaskRunnerImpl::clone() { |
| 64 return base::WrapUnique(new WebTaskRunnerImpl(task_queue_)); | 64 return base::WrapUnique(new WebTaskRunnerImpl(task_queue_)); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void WebTaskRunnerImpl::runTask( | 67 void WebTaskRunnerImpl::runTask( |
| 68 std::unique_ptr<blink::WebTaskRunner::Task> task) { | 68 std::unique_ptr<blink::WebTaskRunner::Task> task) { |
| 69 task->run(); | 69 task->run(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 // static |
| 73 scoped_refptr<base::SingleThreadTaskRunner> |
| 74 WebTaskRunnerImpl::GetBaseTaskRunner(const blink::WebTaskRunner& task_runner) { |
| 75 return static_cast<const WebTaskRunnerImpl&>(task_runner).task_queue_; |
| 76 } |
| 77 |
| 72 } // namespace scheduler | 78 } // namespace scheduler |
| OLD | NEW |