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 "platform/WebTaskRunner.h" | 5 #include "platform/WebTaskRunner.h" |
6 | 6 |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 long long delayMs) { | 148 long long delayMs) { |
149 DCHECK(runsTasksOnCurrentThread()); | 149 DCHECK(runsTasksOnCurrentThread()); |
150 RefPtr<TaskHandle::Runner> runner = | 150 RefPtr<TaskHandle::Runner> runner = |
151 adoptRef(new TaskHandle::Runner(std::move(task))); | 151 adoptRef(new TaskHandle::Runner(std::move(task))); |
152 postDelayedTask(location, WTF::bind(&TaskHandle::Runner::run, | 152 postDelayedTask(location, WTF::bind(&TaskHandle::Runner::run, |
153 runner->asWeakPtr(), TaskHandle(runner)), | 153 runner->asWeakPtr(), TaskHandle(runner)), |
154 delayMs); | 154 delayMs); |
155 return TaskHandle(runner); | 155 return TaskHandle(runner); |
156 } | 156 } |
157 | 157 |
| 158 WebTaskRunner::~WebTaskRunner() = default; |
| 159 |
158 } // namespace blink | 160 } // namespace blink |
OLD | NEW |