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

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: Removed NextPendingDelayedTaskRunTime 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Called when |queue| is unregistered. 75 // Called when |queue| is unregistered.
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 const scoped_refptr<RealTimeDomain>& real_time_domain() const;
Sami 2015/11/19 16:11:20 nit: move into accessor methods section below.
alex clarke (OOO till 29th) 2015/11/19 16:52:56 Done.
86
85 // Accessor methods. 87 // Accessor methods.
86 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const; 88 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const;
87 base::TimeTicks NextPendingDelayedTaskRunTime() const;
88 bool GetAndClearSystemIsQuiescentBit(); 89 bool GetAndClearSystemIsQuiescentBit();
89 90
90 // Test helpers. 91 // Test helpers.
91 void SetWorkBatchSizeForTesting(size_t work_batch_size); 92 void SetWorkBatchSizeForTesting(size_t work_batch_size);
92 TaskQueueManager* GetTaskQueueManagerForTesting(); 93 TaskQueueManager* GetTaskQueueManagerForTesting();
93 94
94 private: 95 private:
95 friend class SchedulerHelperTest; 96 friend class SchedulerHelperTest;
96 97
97 base::ThreadChecker thread_checker_; 98 base::ThreadChecker thread_checker_;
98 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate_; 99 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate_;
99 scoped_ptr<TaskQueueManager> task_queue_manager_; 100 scoped_ptr<TaskQueueManager> task_queue_manager_;
100 scoped_refptr<TaskQueue> control_task_runner_; 101 scoped_refptr<TaskQueue> control_task_runner_;
101 scoped_refptr<TaskQueue> control_after_wakeup_task_runner_; 102 scoped_refptr<TaskQueue> control_after_wakeup_task_runner_;
102 scoped_refptr<TaskQueue> default_task_runner_; 103 scoped_refptr<TaskQueue> default_task_runner_;
103 104
104 Observer* observer_; // NOT OWNED 105 Observer* observer_; // NOT OWNED
105 const char* tracing_category_; 106 const char* tracing_category_;
106 const char* disabled_by_default_tracing_category_; 107 const char* disabled_by_default_tracing_category_;
107 108
108 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); 109 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper);
109 }; 110 };
110 111
111 } // namespace scheduler 112 } // namespace scheduler
112 113
113 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ 114 #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