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

Side by Side Diff: content/renderer/scheduler/task_queue_selector.h

Issue 637303003: content: Add task queue manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Carlos's comments. Created 6 years, 1 month 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 CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_SELECTOR_H_
6 #define CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_SELECTOR_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11
12 namespace base {
13 class TaskQueue;
14 }
15
16 namespace content {
17
18 class TaskQueueSelector {
19 public:
20 virtual ~TaskQueueSelector() {}
21
22 // Called once to register the work queues to be selected from. This function
23 // is called on the main thread.
24 virtual void RegisterWorkQueues(
25 const std::vector<const base::TaskQueue*>& work_queues) = 0;
26
27 // Called to choose the work queue from which the next task should be taken
28 // and run. Return true if |out_queue| indicates the queue to service or
29 // false to avoid running any task.
30 //
31 // This function is called on the main thread.
32 virtual bool SelectWorkQueueToService(size_t* out_queue_index) = 0;
33 };
34
35 } // namespace content
36
37 #endif // CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_SELECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698