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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 463 } | 464 } |
| 464 | 465 |
| 465 // Don't access compositor_thread_only_, instead use CompositorThreadOnly(). | 466 // Don't access compositor_thread_only_, instead use CompositorThreadOnly(). |
| 466 CompositorThreadOnly compositor_thread_only_; | 467 CompositorThreadOnly compositor_thread_only_; |
| 467 CompositorThreadOnly& CompositorThreadOnly() { | 468 CompositorThreadOnly& CompositorThreadOnly() { |
| 468 compositor_thread_only_.CheckOnValidThread(); | 469 compositor_thread_only_.CheckOnValidThread(); |
| 469 return compositor_thread_only_; | 470 return compositor_thread_only_; |
| 470 } | 471 } |
| 471 | 472 |
| 472 PollableThreadSafeFlag policy_may_need_update_; | 473 PollableThreadSafeFlag policy_may_need_update_; |
| 474 | |
| 475 TaskDurationReporter duration_reporter_; | |
|
tdresser
2016/07/27 18:04:25
I think we can put this in MainThreadOnly(), to ma
sunyunjia
2016/07/27 19:51:04
Done.
| |
| 476 | |
| 473 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 477 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
| 474 | 478 |
| 475 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 479 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
| 476 }; | 480 }; |
| 477 | 481 |
| 478 } // namespace scheduler | 482 } // namespace scheduler |
| 479 | 483 |
| 480 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 484 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| OLD | NEW |