| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 // TaskQueueManager::Observer implementation: | 85 // TaskQueueManager::Observer implementation: |
| 86 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; | 86 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; |
| 87 | 87 |
| 88 // Returns a task runner where tasks run at the highest possible priority. | 88 // Returns a task runner where tasks run at the highest possible priority. |
| 89 scoped_refptr<TaskQueue> ControlTaskRunner(); | 89 scoped_refptr<TaskQueue> ControlTaskRunner(); |
| 90 | 90 |
| 91 void RegisterTimeDomain(TimeDomain* time_domain); | 91 void RegisterTimeDomain(TimeDomain* time_domain); |
| 92 void UnregisterTimeDomain(TimeDomain* time_domain); | 92 void UnregisterTimeDomain(TimeDomain* time_domain); |
| 93 | 93 |
| 94 void SetExpensiveTaskBlockingAllowed(bool allowed); |
| 95 |
| 94 // Test helpers. | 96 // Test helpers. |
| 95 SchedulerHelper* GetSchedulerHelperForTesting(); | 97 SchedulerHelper* GetSchedulerHelperForTesting(); |
| 96 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); | 98 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); |
| 97 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting(); | 99 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting(); |
| 98 IdleTimeEstimator* GetIdleTimeEstimatorForTesting(); | 100 IdleTimeEstimator* GetIdleTimeEstimatorForTesting(); |
| 99 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; | 101 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; |
| 100 | 102 |
| 101 base::TickClock* tick_clock() const; | 103 base::TickClock* tick_clock() const; |
| 102 | 104 |
| 103 RealTimeDomain* real_time_domain() const { | 105 RealTimeDomain* real_time_domain() const { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 bool renderer_backgrounded; | 290 bool renderer_backgrounded; |
| 289 bool timer_queue_suspension_when_backgrounded_enabled; | 291 bool timer_queue_suspension_when_backgrounded_enabled; |
| 290 bool timer_queue_suspended_when_backgrounded; | 292 bool timer_queue_suspended_when_backgrounded; |
| 291 bool was_shutdown; | 293 bool was_shutdown; |
| 292 bool loading_tasks_seem_expensive; | 294 bool loading_tasks_seem_expensive; |
| 293 bool timer_tasks_seem_expensive; | 295 bool timer_tasks_seem_expensive; |
| 294 bool touchstart_expected_soon; | 296 bool touchstart_expected_soon; |
| 295 bool have_seen_a_begin_main_frame; | 297 bool have_seen_a_begin_main_frame; |
| 296 bool has_visible_render_widget_with_touch_handler; | 298 bool has_visible_render_widget_with_touch_handler; |
| 297 bool begin_frame_not_expected_soon; | 299 bool begin_frame_not_expected_soon; |
| 300 bool expensive_task_blocking_allowed; |
| 298 }; | 301 }; |
| 299 | 302 |
| 300 struct AnyThread { | 303 struct AnyThread { |
| 301 AnyThread(); | 304 AnyThread(); |
| 302 ~AnyThread(); | 305 ~AnyThread(); |
| 303 | 306 |
| 304 base::TimeTicks last_idle_period_end_time; | 307 base::TimeTicks last_idle_period_end_time; |
| 305 base::TimeTicks rails_loading_priority_deadline; | 308 base::TimeTicks rails_loading_priority_deadline; |
| 306 base::TimeTicks fling_compositor_escalation_deadline; | 309 base::TimeTicks fling_compositor_escalation_deadline; |
| 307 UserModel user_model; | 310 UserModel user_model; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 365 |
| 363 PollableThreadSafeFlag policy_may_need_update_; | 366 PollableThreadSafeFlag policy_may_need_update_; |
| 364 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 367 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
| 365 | 368 |
| 366 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 369 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
| 367 }; | 370 }; |
| 368 | 371 |
| 369 } // namespace scheduler | 372 } // namespace scheduler |
| 370 | 373 |
| 371 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 374 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| OLD | NEW |