OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef BASE_THREADING_WORKER_POOL_H_ | 5 #ifndef BASE_THREADING_WORKER_POOL_H_ |
6 #define BASE_THREADING_WORKER_POOL_H_ | 6 #define BASE_THREADING_WORKER_POOL_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 | 11 |
12 class Task; | |
13 | |
14 namespace tracked_objects { | 12 namespace tracked_objects { |
15 class Location; | 13 class Location; |
16 } // namespace tracked_objects | 14 } // namespace tracked_objects |
17 | 15 |
18 namespace base { | 16 namespace base { |
19 | 17 |
20 class TaskRunner; | 18 class TaskRunner; |
21 | 19 |
22 // This is a facility that runs tasks that don't require a specific thread or | 20 // This is a facility that runs tasks that don't require a specific thread or |
23 // a message loop. | 21 // a message loop. |
(...skipping 27 matching lines...) Expand all Loading... |
51 static bool RunsTasksOnCurrentThread(); | 49 static bool RunsTasksOnCurrentThread(); |
52 | 50 |
53 // Get a TaskRunner wrapper which posts to the WorkerPool using the given | 51 // Get a TaskRunner wrapper which posts to the WorkerPool using the given |
54 // |task_is_slow| behavior. | 52 // |task_is_slow| behavior. |
55 static const scoped_refptr<TaskRunner>& GetTaskRunner(bool task_is_slow); | 53 static const scoped_refptr<TaskRunner>& GetTaskRunner(bool task_is_slow); |
56 }; | 54 }; |
57 | 55 |
58 } // namespace base | 56 } // namespace base |
59 | 57 |
60 #endif // BASE_THREADING_WORKER_POOL_H_ | 58 #endif // BASE_THREADING_WORKER_POOL_H_ |
OLD | NEW |