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

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

Issue 882673002: Move tracing namespace from base::debug to base::trace_event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_trace_part1
Patch Set: Edited formatting Created 5 years, 10 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_SELECTOR_H_ 5 #ifndef CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_SELECTOR_H_
6 #define CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_SELECTOR_H_ 6 #define CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_SELECTOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 namespace base { 12 namespace base {
13 class TaskQueue; 13 class TaskQueue;
14 namespace trace_event {
15 class TracedValue;
16 } // namespace trace_event
17
18 // This is added temporarily. Once the renaming of namespace usages
19 // accross all folders are done, this will be removed.
20 // TODO(ssid): crrev.com/837303004
14 namespace debug { 21 namespace debug {
15 class TracedValue; 22 using ::base::trace_event::TracedValue;
16 } // namespace debug 23 } // namespace debug
17 } // namespace base 24 } // namespace base
18 25
19 namespace content { 26 namespace content {
20 27
21 class TaskQueueSelector { 28 class TaskQueueSelector {
22 public: 29 public:
23 virtual ~TaskQueueSelector() {} 30 virtual ~TaskQueueSelector() {}
24 31
25 // Called once to register the work queues to be selected from. This function 32 // Called once to register the work queues to be selected from. This function
26 // is called on the main thread. 33 // is called on the main thread.
27 virtual void RegisterWorkQueues( 34 virtual void RegisterWorkQueues(
28 const std::vector<const base::TaskQueue*>& work_queues) = 0; 35 const std::vector<const base::TaskQueue*>& work_queues) = 0;
29 36
30 // Called to choose the work queue from which the next task should be taken 37 // Called to choose the work queue from which the next task should be taken
31 // and run. Return true if |out_queue| indicates the queue to service or 38 // and run. Return true if |out_queue| indicates the queue to service or
32 // false to avoid running any task. 39 // false to avoid running any task.
33 // 40 //
34 // This function is called on the main thread. 41 // This function is called on the main thread.
35 virtual bool SelectWorkQueueToService(size_t* out_queue_index) = 0; 42 virtual bool SelectWorkQueueToService(size_t* out_queue_index) = 0;
36 43
37 // Serialize the selector state for tracing. 44 // Serialize the selector state for tracing.
38 virtual void AsValueInto(base::debug::TracedValue* state) const = 0; 45 virtual void AsValueInto(base::debug::TracedValue* state) const = 0;
39 }; 46 };
40 47
41 } // namespace content 48 } // namespace content
42 49
43 #endif // CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_SELECTOR_H_ 50 #endif // CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_SELECTOR_H_
OLDNEW
« cc/quads/shared_quad_state.h ('K') | « content/renderer/scheduler/task_queue_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698