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

Side by Side Diff: components/scheduler/child/scheduler_helper.h

Issue 1432263002: (reland) Adds TimeDomains to the TaskQueueManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix thread_hop_task DCHECK Created 5 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
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 "base/time/tick_clock.h" 8 #include "base/time/tick_clock.h"
9 #include "components/scheduler/base/task_queue_manager.h" 9 #include "components/scheduler/base/task_queue_manager.h"
10 #include "components/scheduler/base/task_queue_selector.h" 10 #include "components/scheduler/base/task_queue_selector.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual void OnUnregisterTaskQueue( 76 virtual void OnUnregisterTaskQueue(
77 const scoped_refptr<TaskQueue>& queue) = 0; 77 const scoped_refptr<TaskQueue>& queue) = 0;
78 }; 78 };
79 79
80 // Called once to set the Observer. This function is called on the main 80 // Called once to set the Observer. This function is called on the main
81 // thread. If |observer| is null, then no callbacks will occur. 81 // thread. If |observer| is null, then no callbacks will occur.
82 // Note |observer| is expected to outlive the SchedulerHelper. 82 // Note |observer| is expected to outlive the SchedulerHelper.
83 void SetObserver(Observer* observer); 83 void SetObserver(Observer* observer);
84 84
85 // Accessor methods. 85 // Accessor methods.
86 const scoped_refptr<RealTimeDomain>& real_time_domain() const;
86 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const; 87 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const;
87 base::TimeTicks NextPendingDelayedTaskRunTime() const;
88 bool GetAndClearSystemIsQuiescentBit(); 88 bool GetAndClearSystemIsQuiescentBit();
89 89
90 // Test helpers. 90 // Test helpers.
91 void SetWorkBatchSizeForTesting(size_t work_batch_size); 91 void SetWorkBatchSizeForTesting(size_t work_batch_size);
92 TaskQueueManager* GetTaskQueueManagerForTesting(); 92 TaskQueueManager* GetTaskQueueManagerForTesting();
93 93
94 private: 94 private:
95 friend class SchedulerHelperTest; 95 friend class SchedulerHelperTest;
96 96
97 base::ThreadChecker thread_checker_; 97 base::ThreadChecker thread_checker_;
98 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate_; 98 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate_;
99 scoped_ptr<TaskQueueManager> task_queue_manager_; 99 scoped_ptr<TaskQueueManager> task_queue_manager_;
100 scoped_refptr<TaskQueue> control_task_runner_; 100 scoped_refptr<TaskQueue> control_task_runner_;
101 scoped_refptr<TaskQueue> control_after_wakeup_task_runner_; 101 scoped_refptr<TaskQueue> control_after_wakeup_task_runner_;
102 scoped_refptr<TaskQueue> default_task_runner_; 102 scoped_refptr<TaskQueue> default_task_runner_;
103 103
104 Observer* observer_; // NOT OWNED 104 Observer* observer_; // NOT OWNED
105 const char* tracing_category_; 105 const char* tracing_category_;
106 const char* disabled_by_default_tracing_category_; 106 const char* disabled_by_default_tracing_category_;
107 107
108 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); 108 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper);
109 }; 109 };
110 110
111 } // namespace scheduler 111 } // namespace scheduler
112 112
113 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ 113 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_
OLDNEW
« no previous file with comments | « components/scheduler/child/idle_helper_unittest.cc ('k') | components/scheduler/child/scheduler_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698