OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 5 #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
7 | 7 |
8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 | 137 |
138 // QueueingTimeEstimator::Client implementation: | 138 // QueueingTimeEstimator::Client implementation: |
139 void OnQueueingTimeForWindowEstimated(base::TimeDelta queueing_time) override; | 139 void OnQueueingTimeForWindowEstimated(base::TimeDelta queueing_time) override; |
140 | 140 |
141 // Returns a task runner where tasks run at the highest possible priority. | 141 // Returns a task runner where tasks run at the highest possible priority. |
142 scoped_refptr<TaskQueue> ControlTaskRunner(); | 142 scoped_refptr<TaskQueue> ControlTaskRunner(); |
143 | 143 |
144 void RegisterTimeDomain(TimeDomain* time_domain); | 144 void RegisterTimeDomain(TimeDomain* time_domain); |
145 void UnregisterTimeDomain(TimeDomain* time_domain); | 145 void UnregisterTimeDomain(TimeDomain* time_domain); |
146 | 146 |
147 // Sets the time domain used by the Per-Thread level task queues ( | |
148 // DefaultTaskRunner, CompositorTaskRunner, LoadingTaskRunner & | |
149 // TimerTaskRunner). If the lifetime of |time_domain| is shorter than the | |
Sami
2016/07/28 10:46:34
nit: How about (less cryptically :) "|time_domain|
alex clarke (OOO till 29th)
2016/07/29 13:35:01
Done.
| |
150 // RendererSchedulerImpl then it's the responsibility of the caller to deal | |
151 // with that. | |
152 void SetPerThreadTaskRunnerTimeDomain(TimeDomain* time_domain); | |
153 | |
147 void SetExpensiveTaskBlockingAllowed(bool allowed); | 154 void SetExpensiveTaskBlockingAllowed(bool allowed); |
148 | 155 |
149 void AddWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); | 156 void AddWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); |
150 void RemoveWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); | 157 void RemoveWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); |
151 | 158 |
152 LongTaskTracker::LongTaskTiming GetLongTaskTiming(); | 159 LongTaskTracker::LongTaskTiming GetLongTaskTiming(); |
153 | 160 |
154 // Test helpers. | 161 // Test helpers. |
155 SchedulerHelper* GetSchedulerHelperForTesting(); | 162 SchedulerHelper* GetSchedulerHelperForTesting(); |
156 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); | 163 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
471 | 478 |
472 PollableThreadSafeFlag policy_may_need_update_; | 479 PollableThreadSafeFlag policy_may_need_update_; |
473 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 480 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
474 | 481 |
475 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 482 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
476 }; | 483 }; |
477 | 484 |
478 } // namespace scheduler | 485 } // namespace scheduler |
479 | 486 |
480 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 487 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
OLD | NEW |