OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 BASE_TASK_SCHEDULER_SCHEDULER_TASK_EXECUTOR_H_ | |
6 #define BASE_TASK_SCHEDULER_SCHEDULER_TASK_EXECUTOR_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "base/memory/ref_counted.h" | |
11 #include "base/task_scheduler/sequence.h" | |
12 #include "base/task_scheduler/task.h" | |
13 | |
14 namespace base { | |
15 namespace internal { | |
16 | |
17 // Interface for a component that runs Tasks. | |
18 class SchedulerTaskExecutor { | |
19 public: | |
20 virtual ~SchedulerTaskExecutor() = default; | |
21 | |
22 // Posts |task| to be executed by this component as part of |sequence|. The | |
23 // delayed run time of |task| is ignored. The scheduler's TaskTracker must | |
robliao
2016/04/13 20:50:54
Ignoring the delayed run time is an implementation
fdoray
2016/04/13 23:13:12
Done.
| |
24 // have allowed |task| to be posted before this is called. | |
25 virtual void PostTaskNow(std::unique_ptr<Task> task, | |
26 scoped_refptr<Sequence> sequence) = 0; | |
27 }; | |
28 | |
29 } // namespace internal | |
30 } // namespace base | |
31 | |
32 #endif // BASE_TASK_SCHEDULER_SCHEDULER_TASK_EXECUTOR_H_ | |
OLD | NEW |