Chromium Code Reviews| 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 COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ | 5 #ifndef COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ |
| 6 #define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ | 6 #define COMPONENTS_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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 // thread. If |observer| is null, then no callbacks will occur. | 90 // thread. If |observer| is null, then no callbacks will occur. |
| 91 // Note |observer| is expected to outlive the SchedulerHelper. | 91 // Note |observer| is expected to outlive the SchedulerHelper. |
| 92 void SetObserver(Observer* observer); | 92 void SetObserver(Observer* observer); |
| 93 | 93 |
| 94 // Accessor methods. | 94 // Accessor methods. |
| 95 RealTimeDomain* real_time_domain() const; | 95 RealTimeDomain* real_time_domain() const; |
| 96 void RegisterTimeDomain(TimeDomain* time_domain); | 96 void RegisterTimeDomain(TimeDomain* time_domain); |
| 97 void UnregisterTimeDomain(TimeDomain* time_domain); | 97 void UnregisterTimeDomain(TimeDomain* time_domain); |
| 98 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const; | 98 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const; |
| 99 bool GetAndClearSystemIsQuiescentBit(); | 99 bool GetAndClearSystemIsQuiescentBit(); |
| 100 TaskQueue* CurrentSelectedTaskQueue() const; | |
|
Sami
2016/02/01 11:15:07
Similarly CurrentlyExecutingTaskQueue?
alex clarke (OOO till 29th)
2016/02/01 14:16:54
Done.
| |
| 100 | 101 |
| 101 // Test helpers. | 102 // Test helpers. |
| 102 void SetWorkBatchSizeForTesting(size_t work_batch_size); | 103 void SetWorkBatchSizeForTesting(size_t work_batch_size); |
| 103 TaskQueueManager* GetTaskQueueManagerForTesting(); | 104 TaskQueueManager* GetTaskQueueManagerForTesting(); |
| 104 | 105 |
| 105 private: | 106 private: |
| 106 friend class SchedulerHelperTest; | 107 friend class SchedulerHelperTest; |
| 107 | 108 |
| 108 base::ThreadChecker thread_checker_; | 109 base::ThreadChecker thread_checker_; |
| 109 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate_; | 110 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate_; |
| 110 scoped_ptr<TaskQueueManager> task_queue_manager_; | 111 scoped_ptr<TaskQueueManager> task_queue_manager_; |
| 111 scoped_refptr<TaskQueue> control_task_runner_; | 112 scoped_refptr<TaskQueue> control_task_runner_; |
| 112 scoped_refptr<TaskQueue> control_after_wakeup_task_runner_; | 113 scoped_refptr<TaskQueue> control_after_wakeup_task_runner_; |
| 113 scoped_refptr<TaskQueue> default_task_runner_; | 114 scoped_refptr<TaskQueue> default_task_runner_; |
| 114 | 115 |
| 115 Observer* observer_; // NOT OWNED | 116 Observer* observer_; // NOT OWNED |
| 116 const char* tracing_category_; | 117 const char* tracing_category_; |
| 117 const char* disabled_by_default_tracing_category_; | 118 const char* disabled_by_default_tracing_category_; |
| 118 | 119 |
| 119 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); | 120 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); |
| 120 }; | 121 }; |
| 121 | 122 |
| 122 } // namespace scheduler | 123 } // namespace scheduler |
| 123 | 124 |
| 124 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ | 125 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ |
| OLD | NEW |