OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ |
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
21 class BLINK_PLATFORM_EXPORT SchedulerHelper | 21 class BLINK_PLATFORM_EXPORT SchedulerHelper |
22 : public TaskQueueManager::Observer { | 22 : public TaskQueueManager::Observer { |
23 public: | 23 public: |
24 // Category strings must have application lifetime (statics or | 24 // Category strings must have application lifetime (statics or |
25 // literals). They may not include " chars. | 25 // literals). They may not include " chars. |
26 SchedulerHelper( | 26 SchedulerHelper( |
27 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate, | 27 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate, |
28 const char* tracing_category, | 28 const char* tracing_category, |
29 const char* disabled_by_default_tracing_category, | 29 const char* disabled_by_default_tracing_category, |
30 const char* disabled_by_default_verbose_tracing_category); | 30 const char* disabled_by_default_verbose_tracing_category); |
31 SchedulerHelper( | |
32 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate, | |
33 const char* tracing_category, | |
34 const char* disabled_by_default_tracing_category, | |
35 const char* disabled_by_default_verbose_tracing_category, | |
36 TaskQueue::Spec default_task_queue_spec); | |
31 ~SchedulerHelper() override; | 37 ~SchedulerHelper() override; |
32 | 38 |
39 // There is a small overhead to recording task delay histograms, we may not | |
Sami
2016/12/07 16:13:43
nit: reflow
alex clarke (OOO till 29th)
2016/12/08 17:38:49
Done.
| |
40 // wish | |
41 // to do this on all threads. | |
42 void SetRecordTaskDelayHistograms(bool record_task_delay_histograms); | |
43 | |
33 // TaskQueueManager::Observer implementation: | 44 // TaskQueueManager::Observer implementation: |
34 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; | 45 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; |
35 void OnTriedToExecuteBlockedTask(const TaskQueue& queue, | 46 void OnTriedToExecuteBlockedTask(const TaskQueue& queue, |
36 const base::PendingTask& task) override; | 47 const base::PendingTask& task) override; |
37 | 48 |
38 // Returns the default task runner. | 49 // Returns the default task runner. |
39 scoped_refptr<TaskQueue> DefaultTaskRunner(); | 50 scoped_refptr<TaskQueue> DefaultTaskRunner(); |
40 | 51 |
41 // Returns the control task runner. Tasks posted to this runner are executed | 52 // Returns the control task runner. Tasks posted to this runner are executed |
42 // with the highest priority. Care must be taken to avoid starvation of other | 53 // with the highest priority. Care must be taken to avoid starvation of other |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 const char* tracing_category_; | 124 const char* tracing_category_; |
114 const char* disabled_by_default_tracing_category_; | 125 const char* disabled_by_default_tracing_category_; |
115 | 126 |
116 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); | 127 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); |
117 }; | 128 }; |
118 | 129 |
119 } // namespace scheduler | 130 } // namespace scheduler |
120 } // namespace blink | 131 } // namespace blink |
121 | 132 |
122 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H _ | 133 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H _ |
OLD | NEW |