diff options
Diffstat (limited to 'base/task.h')
-rw-r--r-- | base/task.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/base/task.h b/base/task.h index 4a33de0..69112c1 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,19 @@ class BASE_EXPORT ScopedTaskRunner { DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTaskRunner); }; +class BASE_EXPORT ScopedClosureRunner { + public: + 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 |