Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_ | |
| 6 #define CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_ | |
| 7 | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 #include "base/time/time.h" | |
| 10 #include "third_party/WebKit/public/platform/WebScheduler.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 class RendererScheduler; | |
| 15 class SingleThreadIdleTaskRunner; | |
| 16 | |
| 17 class WebSchedulerImpl : public blink::WebScheduler { | |
| 18 public: | |
| 19 WebSchedulerImpl(RendererScheduler* renderer_scheduler); | |
| 20 ~WebSchedulerImpl() override; | |
| 21 | |
| 22 virtual bool shouldYieldForHighPriorityWork(); | |
|
no sievers
2014/10/30 23:40:51
'override' or 'final' for these methods
rmcilroy
2014/11/03 19:02:53
I had this originally however Sami commented that
| |
| 23 virtual void postIdleTask(const blink::WebTraceLocation& location, | |
| 24 blink::WebScheduler::IdleTask* task); | |
| 25 virtual void shutdown(); | |
| 26 | |
| 27 private: | |
| 28 static void runIdleTask(blink::WebScheduler::IdleTask* task, | |
| 29 base::TimeTicks deadline); | |
| 30 | |
| 31 RendererScheduler* renderer_scheduler_; | |
| 32 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_; | |
| 33 }; | |
| 34 | |
| 35 } // namespace content | |
| 36 | |
| 37 #endif // CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_ | |
| OLD | NEW |