| 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 12 matching lines...) Expand all Loading... |
| 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() override; | 31 ~SchedulerHelper() override; |
| 32 | 32 |
| 33 // There is a small overhead to recording task delay histograms, we may not |
| 34 // wish to do this on all threads. |
| 35 void SetRecordTaskDelayHistograms(bool record_task_delay_histograms); |
| 36 |
| 33 // TaskQueueManager::Observer implementation: | 37 // TaskQueueManager::Observer implementation: |
| 34 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; | 38 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; |
| 35 void OnTriedToExecuteBlockedTask(const TaskQueue& queue, | 39 void OnTriedToExecuteBlockedTask(const TaskQueue& queue, |
| 36 const base::PendingTask& task) override; | 40 const base::PendingTask& task) override; |
| 37 | 41 |
| 38 // Returns the default task runner. | 42 // Returns the default task runner. |
| 39 scoped_refptr<TaskQueue> DefaultTaskRunner(); | 43 scoped_refptr<TaskQueue> DefaultTaskRunner(); |
| 40 | 44 |
| 41 // Returns the control task runner. Tasks posted to this runner are executed | 45 // 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 | 46 // with the highest priority. Care must be taken to avoid starvation of other |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 const char* tracing_category_; | 120 const char* tracing_category_; |
| 117 const char* disabled_by_default_tracing_category_; | 121 const char* disabled_by_default_tracing_category_; |
| 118 | 122 |
| 119 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); | 123 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); |
| 120 }; | 124 }; |
| 121 | 125 |
| 122 } // namespace scheduler | 126 } // namespace scheduler |
| 123 } // namespace blink | 127 } // namespace blink |
| 124 | 128 |
| 125 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H
_ | 129 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H
_ |
| OLD | NEW |