Chromium Code Reviews| 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" |
| 11 #include "components/scheduler/base/long_task_tracker.h" | 11 #include "components/scheduler/base/long_task_tracker.h" |
| 12 #include "components/scheduler/base/pollable_thread_safe_flag.h" | 12 #include "components/scheduler/base/pollable_thread_safe_flag.h" |
| 13 #include "components/scheduler/base/queueing_time_estimator.h" | 13 #include "components/scheduler/base/queueing_time_estimator.h" |
| 14 #include "components/scheduler/base/task_time_tracker.h" | 14 #include "components/scheduler/base/task_time_tracker.h" |
| 15 #include "components/scheduler/child/idle_helper.h" | 15 #include "components/scheduler/child/idle_helper.h" |
| 16 #include "components/scheduler/child/scheduler_helper.h" | 16 #include "components/scheduler/child/scheduler_helper.h" |
| 17 #include "components/scheduler/renderer/deadline_task_runner.h" | 17 #include "components/scheduler/renderer/deadline_task_runner.h" |
| 18 #include "components/scheduler/renderer/idle_time_estimator.h" | 18 #include "components/scheduler/renderer/idle_time_estimator.h" |
| 19 #include "components/scheduler/renderer/render_widget_signals.h" | 19 #include "components/scheduler/renderer/render_widget_signals.h" |
| 20 #include "components/scheduler/renderer/renderer_scheduler.h" | 20 #include "components/scheduler/renderer/renderer_scheduler.h" |
| 21 #include "components/scheduler/renderer/task_cost_estimator.h" | 21 #include "components/scheduler/renderer/task_cost_estimator.h" |
| 22 #include "components/scheduler/renderer/task_duration_reporter.h" | |
| 22 #include "components/scheduler/renderer/throttling_helper.h" | 23 #include "components/scheduler/renderer/throttling_helper.h" |
| 23 #include "components/scheduler/renderer/user_model.h" | 24 #include "components/scheduler/renderer/user_model.h" |
| 24 #include "components/scheduler/renderer/web_view_scheduler_impl.h" | 25 #include "components/scheduler/renderer/web_view_scheduler_impl.h" |
| 25 #include "components/scheduler/scheduler_export.h" | 26 #include "components/scheduler/scheduler_export.h" |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 namespace trace_event { | 29 namespace trace_event { |
| 29 class ConvertableToTraceFormat; | 30 class ConvertableToTraceFormat; |
| 30 } | 31 } |
| 31 } | 32 } |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 371 base::TickClock* time_source); | 372 base::TickClock* time_source); |
| 372 ~MainThreadOnly(); | 373 ~MainThreadOnly(); |
| 373 | 374 |
| 374 TaskCostEstimator loading_task_cost_estimator; | 375 TaskCostEstimator loading_task_cost_estimator; |
| 375 TaskCostEstimator timer_task_cost_estimator; | 376 TaskCostEstimator timer_task_cost_estimator; |
| 376 QueueingTimeEstimator queueing_time_estimator; | 377 QueueingTimeEstimator queueing_time_estimator; |
| 377 LongTaskTracker long_task_tracker; | 378 LongTaskTracker long_task_tracker; |
| 378 IdleTimeEstimator idle_time_estimator; | 379 IdleTimeEstimator idle_time_estimator; |
| 379 UseCase current_use_case; | 380 UseCase current_use_case; |
| 380 Policy current_policy; | 381 Policy current_policy; |
| 382 TaskDurationReporter duration_reporter; | |
| 381 base::TimeTicks current_policy_expiration_time; | 383 base::TimeTicks current_policy_expiration_time; |
| 382 base::TimeTicks estimated_next_frame_begin; | 384 base::TimeTicks estimated_next_frame_begin; |
| 383 base::TimeDelta compositor_frame_interval; | 385 base::TimeDelta compositor_frame_interval; |
| 384 base::TimeDelta longest_jank_free_task_duration; | 386 base::TimeDelta longest_jank_free_task_duration; |
| 385 int timer_queue_suspend_count; // TIMER_TASK_QUEUE suspended if non-zero. | 387 int timer_queue_suspend_count; // TIMER_TASK_QUEUE suspended if non-zero. |
| 386 int navigation_task_expected_count; | 388 int navigation_task_expected_count; |
| 387 ExpensiveTaskPolicy expensive_task_policy; | 389 ExpensiveTaskPolicy expensive_task_policy; |
| 388 bool renderer_hidden; | 390 bool renderer_hidden; |
| 389 bool renderer_backgrounded; | 391 bool renderer_backgrounded; |
| 390 bool renderer_suspended; | 392 bool renderer_suspended; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 463 } | 465 } |
| 464 | 466 |
| 465 // Don't access compositor_thread_only_, instead use CompositorThreadOnly(). | 467 // Don't access compositor_thread_only_, instead use CompositorThreadOnly(). |
| 466 CompositorThreadOnly compositor_thread_only_; | 468 CompositorThreadOnly compositor_thread_only_; |
| 467 CompositorThreadOnly& CompositorThreadOnly() { | 469 CompositorThreadOnly& CompositorThreadOnly() { |
| 468 compositor_thread_only_.CheckOnValidThread(); | 470 compositor_thread_only_.CheckOnValidThread(); |
| 469 return compositor_thread_only_; | 471 return compositor_thread_only_; |
| 470 } | 472 } |
| 471 | 473 |
| 472 PollableThreadSafeFlag policy_may_need_update_; | 474 PollableThreadSafeFlag policy_may_need_update_; |
| 475 | |
|
majidvp
2016/07/27 20:05:42
nit: frivolous blank line
| |
| 473 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 476 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
| 474 | 477 |
| 475 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 478 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
| 476 }; | 479 }; |
| 477 | 480 |
| 478 } // namespace scheduler | 481 } // namespace scheduler |
| 479 | 482 |
| 480 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 483 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| OLD | NEW |