Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMECAST_BASE_TASK_RUNNER_IMPL_H_ | |
| 6 #define CHROMECAST_BASE_TASK_RUNNER_IMPL_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/ref_counted.h" | |
| 10 #include "chromecast/public/task_runner.h" | |
| 11 | |
| 12 namespace base { | |
| 13 class SingleThreadTaskRunner; | |
| 14 } | |
| 15 | |
| 16 namespace chromecast { | |
| 17 | |
| 18 // Implementation of public TaskRunner interface that just calls | |
| 19 // base::ThreadTaskRunnerHandle at construction time and uses it to post. | |
| 20 class TaskRunnerImpl : public TaskRunner { | |
| 21 public: | |
| 22 TaskRunnerImpl(); | |
| 23 ~TaskRunnerImpl() override; | |
| 24 | |
| 25 bool PostTask(Task* task, uint64_t milliseconds) override; | |
|
servolk
2015/07/30 17:44:18
Nit: please rename the second parameter to delay_m
halliwell
2015/07/30 18:20:18
Done.
| |
| 26 | |
| 27 private: | |
| 28 const scoped_refptr<base::SingleThreadTaskRunner> runner_; | |
| 29 | |
| 30 DISALLOW_COPY_AND_ASSIGN(TaskRunnerImpl); | |
| 31 }; | |
| 32 | |
| 33 } // namespace chromecast | |
| 34 | |
| 35 #endif // CHROMECAST_BASE_TASK_RUNNER_IMPL_H_ | |
| OLD | NEW |