| 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_TASK_RUNNER_H_ | 5 #ifndef BASE_TASK_RUNNER_H_ |
| 6 #define BASE_TASK_RUNNER_H_ | 6 #define BASE_TASK_RUNNER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/location.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 14 | 15 |
| 15 namespace tracked_objects { | |
| 16 class Location; | |
| 17 } // namespace tracked_objects | |
| 18 | |
| 19 namespace base { | 16 namespace base { |
| 20 | 17 |
| 21 struct TaskRunnerTraits; | 18 struct TaskRunnerTraits; |
| 22 | 19 |
| 23 // A TaskRunner is an object that runs posted tasks (in the form of | 20 // A TaskRunner is an object that runs posted tasks (in the form of |
| 24 // Closure objects). The TaskRunner interface provides a way of | 21 // Closure objects). The TaskRunner interface provides a way of |
| 25 // decoupling task posting from the mechanics of how each task will be | 22 // decoupling task posting from the mechanics of how each task will be |
| 26 // run. TaskRunner provides very weak guarantees as to how posted | 23 // run. TaskRunner provides very weak guarantees as to how posted |
| 27 // tasks are run (or if they're run at all). In particular, it only | 24 // tasks are run (or if they're run at all). In particular, it only |
| 28 // guarantees: | 25 // guarantees: |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 virtual void OnDestruct() const; | 142 virtual void OnDestruct() const; |
| 146 }; | 143 }; |
| 147 | 144 |
| 148 struct BASE_EXPORT TaskRunnerTraits { | 145 struct BASE_EXPORT TaskRunnerTraits { |
| 149 static void Destruct(const TaskRunner* task_runner); | 146 static void Destruct(const TaskRunner* task_runner); |
| 150 }; | 147 }; |
| 151 | 148 |
| 152 } // namespace base | 149 } // namespace base |
| 153 | 150 |
| 154 #endif // BASE_TASK_RUNNER_H_ | 151 #endif // BASE_TASK_RUNNER_H_ |
| OLD | NEW |