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 "public/platform/WebTaskRunner.h" | 5 #include "public/platform/WebTaskRunner.h" |
6 | 6 |
| 7 #include "base/single_thread_task_runner.h" |
| 8 |
7 namespace blink { | 9 namespace blink { |
8 | 10 |
9 void WebTaskRunner::postTask(const WebTraceLocation& location, | 11 void WebTaskRunner::postTask(const WebTraceLocation& location, |
10 std::unique_ptr<CrossThreadClosure> task) { | 12 std::unique_ptr<CrossThreadClosure> task) { |
11 toSingleThreadTaskRunner()->PostTask(location, | 13 toSingleThreadTaskRunner()->PostTask(location, |
12 convertToBaseCallback(std::move(task))); | 14 convertToBaseCallback(std::move(task))); |
13 } | 15 } |
14 | 16 |
15 void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, | 17 void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, |
16 std::unique_ptr<CrossThreadClosure> task, | 18 std::unique_ptr<CrossThreadClosure> task, |
(...skipping 11 matching lines...) Expand all Loading... |
28 | 30 |
29 void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, | 31 void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, |
30 std::unique_ptr<WTF::Closure> task, | 32 std::unique_ptr<WTF::Closure> task, |
31 long long delayMs) { | 33 long long delayMs) { |
32 toSingleThreadTaskRunner()->PostDelayedTask( | 34 toSingleThreadTaskRunner()->PostDelayedTask( |
33 location, convertToBaseCallback(std::move(task)), | 35 location, convertToBaseCallback(std::move(task)), |
34 base::TimeDelta::FromMilliseconds(delayMs)); | 36 base::TimeDelta::FromMilliseconds(delayMs)); |
35 } | 37 } |
36 | 38 |
37 } // namespace blink | 39 } // namespace blink |
OLD | NEW |