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

Side by Side Diff: components/scheduler/renderer/renderer_scheduler_impl.cc

Issue 1675633002: WebTaskRunnerImpl to take a TaskQueue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 10 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "components/scheduler/renderer/renderer_scheduler_impl.h" 5 #include "components/scheduler/renderer/renderer_scheduler_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void RendererSchedulerImpl::Shutdown() { 146 void RendererSchedulerImpl::Shutdown() {
147 throttling_helper_.reset(); 147 throttling_helper_.reset();
148 helper_.Shutdown(); 148 helper_.Shutdown();
149 MainThreadOnly().was_shutdown = true; 149 MainThreadOnly().was_shutdown = true;
150 } 150 }
151 151
152 scoped_ptr<blink::WebThread> RendererSchedulerImpl::CreateMainThread() { 152 scoped_ptr<blink::WebThread> RendererSchedulerImpl::CreateMainThread() {
153 return make_scoped_ptr(new WebThreadImplForRendererScheduler(this)); 153 return make_scoped_ptr(new WebThreadImplForRendererScheduler(this));
154 } 154 }
155 155
156 scoped_refptr<base::SingleThreadTaskRunner> 156 scoped_refptr<TaskQueue> RendererSchedulerImpl::DefaultTaskRunner() {
157 RendererSchedulerImpl::DefaultTaskRunner() {
158 return helper_.DefaultTaskRunner(); 157 return helper_.DefaultTaskRunner();
159 } 158 }
160 159
161 scoped_refptr<base::SingleThreadTaskRunner> 160 scoped_refptr<TaskQueue> RendererSchedulerImpl::CompositorTaskRunner() {
162 RendererSchedulerImpl::CompositorTaskRunner() {
163 helper_.CheckOnValidThread(); 161 helper_.CheckOnValidThread();
164 return compositor_task_runner_; 162 return compositor_task_runner_;
165 } 163 }
166 164
167 scoped_refptr<SingleThreadIdleTaskRunner> 165 scoped_refptr<SingleThreadIdleTaskRunner>
168 RendererSchedulerImpl::IdleTaskRunner() { 166 RendererSchedulerImpl::IdleTaskRunner() {
169 return idle_helper_.IdleTaskRunner(); 167 return idle_helper_.IdleTaskRunner();
170 } 168 }
171 169
172 scoped_refptr<base::SingleThreadTaskRunner> 170 scoped_refptr<TaskQueue> RendererSchedulerImpl::LoadingTaskRunner() {
173 RendererSchedulerImpl::LoadingTaskRunner() {
174 helper_.CheckOnValidThread(); 171 helper_.CheckOnValidThread();
175 return default_loading_task_runner_; 172 return default_loading_task_runner_;
176 } 173 }
177 174
178 scoped_refptr<TaskQueue> RendererSchedulerImpl::TimerTaskRunner() { 175 scoped_refptr<TaskQueue> RendererSchedulerImpl::TimerTaskRunner() {
179 helper_.CheckOnValidThread(); 176 helper_.CheckOnValidThread();
180 return default_timer_task_runner_; 177 return default_timer_task_runner_;
181 } 178 }
182 179
183 scoped_refptr<TaskQueue> RendererSchedulerImpl::ControlTaskRunner() { 180 scoped_refptr<TaskQueue> RendererSchedulerImpl::ControlTaskRunner() {
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 } 1201 }
1205 MainThreadOnly().have_reported_blocking_intervention_since_navigation = 1202 MainThreadOnly().have_reported_blocking_intervention_since_navigation =
1206 true; 1203 true;
1207 BroadcastConsoleWarning( 1204 BroadcastConsoleWarning(
1208 "Deferred long-running timer task(s) to improve scrolling smoothness. " 1205 "Deferred long-running timer task(s) to improve scrolling smoothness. "
1209 "See crbug.com/574343."); 1206 "See crbug.com/574343.");
1210 } 1207 }
1211 } 1208 }
1212 1209
1213 } // namespace scheduler 1210 } // namespace scheduler
OLDNEW
« no previous file with comments | « components/scheduler/renderer/renderer_scheduler_impl.h ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698