Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: base/task/task_queue_scheduler.h

Issue 637303003: content: Add task queue manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Strip out everything else than TaskQueueManager. Added tests. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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_TASK_QUEUE_SCHEDULER_H_
6 #define BASE_TASK_TASK_QUEUE_SCHEDULER_H_
7
8 #include <vector>
9
10 #include "base/base_export.h"
11 #include "base/basictypes.h"
12
13 namespace base {
14 class TaskQueue;
15
16 class BASE_EXPORT TaskQueueScheduler {
17 public:
18 virtual ~TaskQueueScheduler() {}
19
20 // Called once to register the work queues to be scheduled. This function is
21 // called on the main thread.
22 virtual void RegisterWorkQueues(
23 const std::vector<const TaskQueue*>& work_queues) = 0;
24
25 // Called to choose the work queue from which the next task should be taken
26 // and run. Return true if |out_queue| indicates the queue to service or
27 // false to avoid running any task.
28 //
29 // This function is called on the main thread.
30 virtual bool ChooseWorkQueueToService(size_t* out_queue_index) = 0;
31 };
32
33 } // namespace content
34
35 #endif // BASE_TASK_TASK_QUEUE_SCHEDULER_H_
OLDNEW
« base/task/task_queue_manager.cc ('K') | « base/task/task_queue_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698