ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / content / renderer / scheduler / null_renderer_scheduler.cc
blob7e5d2dbbe3c05a4caf12f301fe4c09b16b8d6eeb
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 #include "content/renderer/scheduler/null_renderer_scheduler.h"
7 #include "base/bind.h"
8 #include "base/message_loop/message_loop_proxy.h"
10 namespace content {
12 namespace {
14 class NullIdleTaskRunner : public SingleThreadIdleTaskRunner {
15 public:
16 NullIdleTaskRunner();
17 void PostIdleTask(const tracked_objects::Location& from_here,
18 const IdleTask& idle_task) override;
20 protected:
21 ~NullIdleTaskRunner() override;
24 } // namespace
26 NullIdleTaskRunner::NullIdleTaskRunner()
27 : SingleThreadIdleTaskRunner(nullptr,
28 nullptr,
29 base::Callback<void(base::TimeTicks*)>()) {
32 NullIdleTaskRunner::~NullIdleTaskRunner() {
35 void NullIdleTaskRunner::PostIdleTask(
36 const tracked_objects::Location& from_here,
37 const IdleTask& idle_task) {
40 NullRendererScheduler::NullRendererScheduler()
41 : task_runner_(base::MessageLoopProxy::current()),
42 idle_task_runner_(new NullIdleTaskRunner()) {
45 NullRendererScheduler::~NullRendererScheduler() {
48 scoped_refptr<base::SingleThreadTaskRunner>
49 NullRendererScheduler::DefaultTaskRunner() {
50 return task_runner_;
53 scoped_refptr<base::SingleThreadTaskRunner>
54 NullRendererScheduler::CompositorTaskRunner() {
55 return task_runner_;
58 scoped_refptr<base::SingleThreadTaskRunner>
59 NullRendererScheduler::LoadingTaskRunner() {
60 return task_runner_;
63 scoped_refptr<SingleThreadIdleTaskRunner>
64 NullRendererScheduler::IdleTaskRunner() {
65 return idle_task_runner_;
68 void NullRendererScheduler::WillBeginFrame(const cc::BeginFrameArgs& args) {
71 void NullRendererScheduler::BeginFrameNotExpectedSoon() {
74 void NullRendererScheduler::DidCommitFrameToCompositor() {
77 void NullRendererScheduler::DidReceiveInputEventOnCompositorThread(
78 const blink::WebInputEvent& web_input_event) {
81 void NullRendererScheduler::DidAnimateForInputOnCompositorThread() {
84 bool NullRendererScheduler::IsHighPriorityWorkAnticipated() {
85 return false;
88 bool NullRendererScheduler::ShouldYieldForHighPriorityWork() {
89 return false;
92 void NullRendererScheduler::AddTaskObserver(
93 base::MessageLoop::TaskObserver* task_observer) {
94 base::MessageLoop::current()->AddTaskObserver(task_observer);
97 void NullRendererScheduler::RemoveTaskObserver(
98 base::MessageLoop::TaskObserver* task_observer) {
99 base::MessageLoop::current()->RemoveTaskObserver(task_observer);
102 void NullRendererScheduler::Shutdown() {
105 } // namespace content