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 CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ |
6 #define CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ | 6 #define CONTENT_RENDERER_SCHEDULER_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 "content/child/scheduler/scheduler_helper.h" | 10 #include "content/child/scheduler/scheduler_helper.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 bool IsHighPriorityWorkAnticipated() override; | 44 bool IsHighPriorityWorkAnticipated() override; |
45 bool ShouldYieldForHighPriorityWork() override; | 45 bool ShouldYieldForHighPriorityWork() override; |
46 bool CanExceedIdleDeadlineIfRequired() const override; | 46 bool CanExceedIdleDeadlineIfRequired() const override; |
47 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; | 47 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; |
48 void RemoveTaskObserver( | 48 void RemoveTaskObserver( |
49 base::MessageLoop::TaskObserver* task_observer) override; | 49 base::MessageLoop::TaskObserver* task_observer) override; |
50 void Shutdown() override; | 50 void Shutdown() override; |
51 void SuspendTimerQueue() override; | 51 void SuspendTimerQueue() override; |
52 void ResumeTimerQueue() override; | 52 void ResumeTimerQueue() override; |
53 | 53 |
54 void SetTimeSourceForTesting(scoped_refptr<cc::TestNowSource> time_source); | 54 SchedulerHelper* GetSchedulerHelperForTesting(); |
55 void SetWorkBatchSizeForTesting(size_t work_batch_size); | 55 void SetWorkBatchSizeForTesting(size_t work_batch_size); |
56 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; | 56 base::TimeTicks CurrentIdleTaskDeadlineForTesting() const; |
57 | 57 |
58 private: | 58 private: |
59 friend class RendererSchedulerImplTest; | 59 friend class RendererSchedulerImplTest; |
60 friend class RendererSchedulerImplForTest; | 60 friend class RendererSchedulerImplForTest; |
61 | 61 |
62 // Keep RendererSchedulerImpl::TaskQueueIdToString in sync with this enum. | 62 // Keep RendererSchedulerImpl::TaskQueueIdToString in sync with this enum. |
63 enum QueueId { | 63 enum QueueId { |
64 COMPOSITOR_TASK_QUEUE = SchedulerHelper::TASK_QUEUE_COUNT, | 64 COMPOSITOR_TASK_QUEUE = SchedulerHelper::TASK_QUEUE_COUNT, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 int timer_queue_suspend_count_; // TIMER_TASK_QUEUE suspended if non-zero. | 205 int timer_queue_suspend_count_; // TIMER_TASK_QUEUE suspended if non-zero. |
206 | 206 |
207 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 207 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
208 | 208 |
209 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 209 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
210 }; | 210 }; |
211 | 211 |
212 } // namespace content | 212 } // namespace content |
213 | 213 |
214 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ | 214 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ |
OLD | NEW |