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

Side by Side Diff: components/scheduler/child/web_scheduler_impl.cc

Issue 1058873010: Move blink scheduler implementation into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 8 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 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/child/scheduler/web_scheduler_impl.h" 5 #include "components/scheduler/child/web_scheduler_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "content/child/scheduler/worker_scheduler.h" 9 #include "components/scheduler/child/worker_scheduler.h"
10 #include "third_party/WebKit/public/platform/WebTraceLocation.h" 10 #include "third_party/WebKit/public/platform/WebTraceLocation.h"
11 11
12 namespace content { 12 namespace scheduler {
13 13
14 WebSchedulerImpl::WebSchedulerImpl( 14 WebSchedulerImpl::WebSchedulerImpl(
15 ChildScheduler* child_scheduler, 15 ChildScheduler* child_scheduler,
16 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner, 16 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner,
17 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner, 17 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner,
18 scoped_refptr<base::SingleThreadTaskRunner> timer_task_runner) 18 scoped_refptr<base::SingleThreadTaskRunner> timer_task_runner)
19 : child_scheduler_(child_scheduler), 19 : child_scheduler_(child_scheduler),
20 idle_task_runner_(idle_task_runner), 20 idle_task_runner_(idle_task_runner),
21 loading_task_runner_(loading_task_runner), 21 loading_task_runner_(loading_task_runner),
22 timer_task_runner_(timer_task_runner) { 22 timer_task_runner_(timer_task_runner) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 DCHECK(timer_task_runner_); 96 DCHECK(timer_task_runner_);
97 scoped_ptr<blink::WebThread::Task> scoped_task(task); 97 scoped_ptr<blink::WebThread::Task> scoped_task(task);
98 tracked_objects::Location location(web_location.functionName(), 98 tracked_objects::Location location(web_location.functionName(),
99 web_location.fileName(), -1, nullptr); 99 web_location.fileName(), -1, nullptr);
100 timer_task_runner_->PostDelayedTask( 100 timer_task_runner_->PostDelayedTask(
101 location, 101 location,
102 base::Bind(&WebSchedulerImpl::runTask, base::Passed(&scoped_task)), 102 base::Bind(&WebSchedulerImpl::runTask, base::Passed(&scoped_task)),
103 base::TimeDelta::FromMilliseconds(delayMs)); 103 base::TimeDelta::FromMilliseconds(delayMs));
104 } 104 }
105 105
106 } // namespace content 106 } // namespace scheduler
OLDNEW
« no previous file with comments | « components/scheduler/child/web_scheduler_impl.h ('k') | components/scheduler/child/webthread_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698