| 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/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "components/scheduler/base/pollable_thread_safe_flag.h" | 10 #include "components/scheduler/base/pollable_thread_safe_flag.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 double MonotonicallyIncreasingTimeSeconds() const override; | 75 double MonotonicallyIncreasingTimeSeconds() const override; |
| 76 | 76 |
| 77 // RenderWidgetSignals::Observer implementation: | 77 // RenderWidgetSignals::Observer implementation: |
| 78 void SetAllRenderWidgetsHidden(bool hidden) override; | 78 void SetAllRenderWidgetsHidden(bool hidden) override; |
| 79 void SetHasVisibleRenderWidgetWithTouchHandler( | 79 void SetHasVisibleRenderWidgetWithTouchHandler( |
| 80 bool has_visible_render_widget_with_touch_handler) override; | 80 bool has_visible_render_widget_with_touch_handler) override; |
| 81 | 81 |
| 82 // TaskQueueManager::Observer implementation: | 82 // TaskQueueManager::Observer implementation: |
| 83 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; | 83 void OnUnregisterTaskQueue(const scoped_refptr<TaskQueue>& queue) override; |
| 84 | 84 |
| 85 // Returns a task runner where tasks run at the highest possible priority. |
| 86 scoped_refptr<TaskQueue> ControlTaskRunner(); |
| 87 |
| 85 // Test helpers. | 88 // Test helpers. |
| 86 SchedulerHelper* GetSchedulerHelperForTesting(); | 89 SchedulerHelper* GetSchedulerHelperForTesting(); |
| 87 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); | 90 TaskCostEstimator* GetLoadingTaskCostEstimatorForTesting(); |
| 88 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting(); | 91 TaskCostEstimator* GetTimerTaskCostEstimatorForTesting(); |
| 89 IdleTimeEstimator* GetIdleTimeEstimatorForTesting(); | 92 IdleTimeEstimator* GetIdleTimeEstimatorForTesting(); |
| 90 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; | 93 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; |
| 91 | 94 |
| 92 private: | 95 private: |
| 93 friend class RendererSchedulerImplTest; | 96 friend class RendererSchedulerImplTest; |
| 94 friend class RendererSchedulerImplForTest; | 97 friend class RendererSchedulerImplForTest; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 345 |
| 343 PollableThreadSafeFlag policy_may_need_update_; | 346 PollableThreadSafeFlag policy_may_need_update_; |
| 344 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 347 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
| 345 | 348 |
| 346 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 349 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
| 347 }; | 350 }; |
| 348 | 351 |
| 349 } // namespace scheduler | 352 } // namespace scheduler |
| 350 | 353 |
| 351 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 354 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| OLD | NEW |