Chromium Code Reviews| 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 "platform/Task.h" | 7 #include "platform/Task.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 void WebTaskRunner::postTask(const WebTraceLocation& location, PassOwnPtr<Closur eTask> task) | 11 void WebTaskRunner::postTask(const WebTraceLocation& location, PassOwnPtr<CrossT hreadClosure> task) |
| 12 { | 12 { |
| 13 postTask(std::move(location), new blink::Task(std::move(task))); | 13 postTask(std::move(location), new CrossThreadTask(std::move(task))); |
| 14 } | 14 } |
| 15 | 15 |
| 16 void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, PassOwnPtr <ClosureTask> task, long long delayMs) | 16 void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, PassOwnPtr <CrossThreadClosure> task, long long delayMs) |
| 17 { | 17 { |
| 18 postDelayedTask(location, new blink::Task(std::move(task)), delayMs); | 18 postDelayedTask(std::move(location), new CrossThreadTask(std::move(task)), d elayMs); |
|
tzik
2016/03/02 11:54:29
std::move(location) takes no effect. Can we just u
hiroshige
2016/03/03 02:21:07
Done.
| |
| 19 } | 19 } |
| 20 | 20 |
| 21 void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, PassOwnPtr <ClosureTask> task, double delayMs) | 21 void WebTaskRunner::postTask(const WebTraceLocation& location, PassOwnPtr<Closur e> task) |
| 22 { | 22 { |
| 23 postDelayedTask(location, new blink::Task(std::move(task)), delayMs); | 23 postTask(std::move(location), new SameThreadTask(std::move(task))); |
| 24 } | |
| 25 | |
| 26 void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, PassOwnPtr <Closure> task, long long delayMs) | |
| 27 { | |
| 28 postDelayedTask(location, new SameThreadTask(std::move(task)), delayMs); | |
| 24 } | 29 } |
| 25 | 30 |
| 26 } // namespace blink | 31 } // namespace blink |
| OLD | NEW |