Chromium Code Reviews| Index: base/task.h |
| diff --git a/base/task.h b/base/task.h |
| index 4a33de0e1f5d0fa378ea016d91a056f772b2d6a7..831ef0e4379848c95f4c68c0bf93c6fddd55ad0b 100644 |
| --- a/base/task.h |
| +++ b/base/task.h |
| @@ -7,6 +7,7 @@ |
| #pragma once |
| #include "base/base_export.h" |
| +#include "base/callback.h" |
| #include "base/debug/alias.h" |
| #include "base/memory/raw_scoped_refptr_mismatch_checker.h" |
| #include "base/memory/weak_ptr.h" |
| @@ -566,6 +567,20 @@ class BASE_EXPORT ScopedTaskRunner { |
| DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTaskRunner); |
| }; |
| +class BASE_EXPORT ScopedClosureRunner { |
| + public: |
| + // Takes ownership of the task. |
|
awong
2011/10/04 00:22:42
Comment is stale.
Sergey Ulanov
2011/10/04 00:25:10
Done.
|
| + explicit ScopedClosureRunner(const Closure& closure); |
| + ~ScopedClosureRunner(); |
| + |
| + Closure Release(); |
| + |
| + private: |
| + Closure closure_; |
| + |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedClosureRunner); |
| +}; |
| + |
| namespace subtle { |
| // This class is meant for use in the implementation of MessageLoop classes |