OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 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/memory/ref_counted.h" | |
9 #include "chromecast/public/task_runner.h" | |
10 | |
11 namespace base { | |
12 class SingleThreadTaskRunner; | |
13 } | |
14 | |
15 namespace chromecast { | |
16 | |
17 // Implementation of public TaskRunner interface that just calls | |
18 // base::ThreadTaskRunnerHandle at construction time and uses it to post. | |
19 class TaskRunnerImpl : public TaskRunner { | |
20 public: | |
21 TaskRunnerImpl(); | |
22 ~TaskRunnerImpl() override; | |
23 | |
24 bool BelongsToCurrentThread() override; | |
25 bool PostTask(Task* task) override; | |
26 bool PostDelayedTask(Task* task, TimeDelta delay) override; | |
27 | |
28 private: | |
29 scoped_refptr<base::SingleThreadTaskRunner> runner_; | |
byungchul
2015/07/27 18:22:23
DISALLOW_..
halliwell
2015/07/28 02:19:35
Done.
| |
30 }; | |
31 | |
32 } // namespace chromecast | |
33 | |
34 #endif // CHROMECAST_BASE_TASK_RUNNER_IMPL_H_ | |
OLD | NEW |