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

Side by Side Diff: content/child/worker_thread_task_runner.cc

Issue 165373004: Move WorkerTaskRunner to content/child. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/child/worker_thread_task_runner.h ('k') | content/content_child.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/worker_thread_task_runner.h" 5 #include "content/child/worker_thread_task_runner.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "webkit/child/worker_task_runner.h" 8 #include "content/child/worker_task_runner.h"
9
10 using webkit_glue::WorkerTaskRunner;
11 9
12 namespace content { 10 namespace content {
13 11
14 WorkerThreadTaskRunner::WorkerThreadTaskRunner(int worker_thread_id) 12 WorkerThreadTaskRunner::WorkerThreadTaskRunner(int worker_thread_id)
15 : worker_thread_id_(worker_thread_id) { 13 : worker_thread_id_(worker_thread_id) {
16 } 14 }
17 15
18 scoped_refptr<WorkerThreadTaskRunner> WorkerThreadTaskRunner::current() { 16 scoped_refptr<WorkerThreadTaskRunner> WorkerThreadTaskRunner::current() {
19 int worker_thread_id = WorkerTaskRunner::Instance()->CurrentWorkerId(); 17 int worker_thread_id = WorkerTaskRunner::Instance()->CurrentWorkerId();
20 if (!worker_thread_id) 18 if (!worker_thread_id)
(...skipping 10 matching lines...) Expand all
31 return WorkerTaskRunner::Instance()->PostTask(worker_thread_id_, task); 29 return WorkerTaskRunner::Instance()->PostTask(worker_thread_id_, task);
32 } 30 }
33 31
34 bool WorkerThreadTaskRunner::RunsTasksOnCurrentThread() const { 32 bool WorkerThreadTaskRunner::RunsTasksOnCurrentThread() const {
35 return worker_thread_id_ == WorkerTaskRunner::Instance()->CurrentWorkerId(); 33 return worker_thread_id_ == WorkerTaskRunner::Instance()->CurrentWorkerId();
36 } 34 }
37 35
38 WorkerThreadTaskRunner::~WorkerThreadTaskRunner() {} 36 WorkerThreadTaskRunner::~WorkerThreadTaskRunner() {}
39 37
40 } // namespace content 38 } // namespace content
OLDNEW
« no previous file with comments | « content/child/worker_thread_task_runner.h ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698