Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: content/renderer/scheduler/renderer_scheduler_message_loop_delegate.cc

Issue 970473004: [content] Add support for Non nestable idle tasks the the RendererScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix contentperftests Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698