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