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.
5 #ifndef COMPONENTS_SCHEDULER_RENDERER_NULL_RENDERER_SCHEDULER_H_
6 #define COMPONENTS_SCHEDULER_RENDERER_NULL_RENDERER_SCHEDULER_H_
8 #include "components/scheduler/renderer/renderer_scheduler.h"
12 class NullRendererScheduler
: public RendererScheduler
{
14 NullRendererScheduler();
15 ~NullRendererScheduler() override
;
17 scoped_refptr
<base::SingleThreadTaskRunner
> DefaultTaskRunner() override
;
18 scoped_refptr
<base::SingleThreadTaskRunner
> CompositorTaskRunner() override
;
19 scoped_refptr
<base::SingleThreadTaskRunner
> LoadingTaskRunner() override
;
20 scoped_refptr
<SingleThreadIdleTaskRunner
> IdleTaskRunner() override
;
21 scoped_refptr
<base::SingleThreadTaskRunner
> TimerTaskRunner() override
;
23 void WillBeginFrame(const cc::BeginFrameArgs
& args
) override
;
24 void BeginFrameNotExpectedSoon() override
;
25 void DidCommitFrameToCompositor() override
;
26 void DidHandleInputEventOnCompositorThread(
27 const blink::WebInputEvent
& web_input_event
,
28 InputEventState event_state
) override
;
29 void DidHandleInputEventOnMainThread(
30 const blink::WebInputEvent
& web_input_event
) override
;
31 void OnRendererHidden() override
;
32 void OnRendererVisible() override
;
33 void OnPageLoadStarted() override
;
34 void DidAnimateForInputOnCompositorThread() override
;
35 bool IsHighPriorityWorkAnticipated() override
;
36 bool ShouldYieldForHighPriorityWork() override
;
37 bool CanExceedIdleDeadlineIfRequired() const override
;
38 void AddTaskObserver(base::MessageLoop::TaskObserver
* task_observer
) override
;
39 void RemoveTaskObserver(
40 base::MessageLoop::TaskObserver
* task_observer
) override
;
41 void Shutdown() override
;
42 void SuspendTimerQueue() override
;
43 void ResumeTimerQueue() override
;
46 scoped_refptr
<base::SingleThreadTaskRunner
> task_runner_
;
47 scoped_refptr
<SingleThreadIdleTaskRunner
> idle_task_runner_
;
49 DISALLOW_COPY_AND_ASSIGN(NullRendererScheduler
);
52 } // namespace scheduler
54 #endif // COMPONENTS_SCHEDULER_RENDERER_NULL_RENDERER_SCHEDULER_H_