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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 void AddWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); | 98 void AddWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); |
99 void RemoveWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); | 99 void RemoveWebViewScheduler(WebViewSchedulerImpl* web_view_scheduler); |
100 | 100 |
101 // Test helpers. | 101 // Test helpers. |
102 SchedulerHelper* GetSchedulerHelperForTesting(); | 102 SchedulerHelper* GetSchedulerHelperForTesting(); |
103 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); | 103 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); |
104 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting(); | 104 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting(); |
105 IdleTimeEstimator* GetIdleTimeEstimatorForTesting(); | 105 IdleTimeEstimator* GetIdleTimeEstimatorForTesting(); |
106 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; | 106 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; |
| 107 void RunIdleTasksForTesting(const base::Closure&); |
107 | 108 |
108 base::TickClock* tick_clock() const; | 109 base::TickClock* tick_clock() const; |
109 | 110 |
110 RealTimeDomain* real_time_domain() const { | 111 RealTimeDomain* real_time_domain() const { |
111 return helper_.real_time_domain(); | 112 return helper_.real_time_domain(); |
112 } | 113 } |
113 | 114 |
114 ThrottlingHelper* throttling_helper() { return throttling_helper_.get(); } | 115 ThrottlingHelper* throttling_helper() { return throttling_helper_.get(); } |
115 | 116 |
116 private: | 117 private: |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 410 |
410 PollableThreadSafeFlag policy_may_need_update_; | 411 PollableThreadSafeFlag policy_may_need_update_; |
411 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 412 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
412 | 413 |
413 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 414 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
414 }; | 415 }; |
415 | 416 |
416 } // namespace scheduler | 417 } // namespace scheduler |
417 | 418 |
418 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 419 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
OLD | NEW |