OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 #include "content/renderer/scheduler/renderer_scheduler_message_loop_delegate.h" |
| 6 |
| 7 namespace content { |
| 8 |
| 9 // static |
| 10 scoped_refptr<RendererSchedulerMessageLoopDelegate> |
| 11 RendererSchedulerMessageLoopDelegate::Create(base::MessageLoop* message_loop) { |
| 12 return make_scoped_refptr( |
| 13 new RendererSchedulerMessageLoopDelegate(message_loop)); |
| 14 } |
| 15 |
| 16 RendererSchedulerMessageLoopDelegate::RendererSchedulerMessageLoopDelegate( |
| 17 base::MessageLoop* message_loop) |
| 18 : message_loop_(message_loop) { |
| 19 } |
| 20 |
| 21 RendererSchedulerMessageLoopDelegate::~RendererSchedulerMessageLoopDelegate() { |
| 22 } |
| 23 |
| 24 bool RendererSchedulerMessageLoopDelegate::PostDelayedTask( |
| 25 const tracked_objects::Location& from_here, |
| 26 const base::Closure& task, |
| 27 base::TimeDelta delay) { |
| 28 return message_loop_->task_runner()->PostDelayedTask(from_here, task, delay); |
| 29 } |
| 30 |
| 31 bool RendererSchedulerMessageLoopDelegate::PostNonNestableDelayedTask( |
| 32 const tracked_objects::Location& from_here, |
| 33 const base::Closure& task, |
| 34 base::TimeDelta delay) { |
| 35 return message_loop_->task_runner()->PostNonNestableDelayedTask(from_here, |
| 36 task, delay); |
| 37 } |
| 38 |
| 39 bool RendererSchedulerMessageLoopDelegate::RunsTasksOnCurrentThread() const { |
| 40 return message_loop_->task_runner()->RunsTasksOnCurrentThread(); |
| 41 } |
| 42 |
| 43 bool RendererSchedulerMessageLoopDelegate::IsNested() const { |
| 44 return message_loop_->IsNested(); |
| 45 } |
| 46 |
| 47 } // namespace content |
OLD | NEW |