Index: base/task.h |
diff --git a/base/task.h b/base/task.h |
index 4a33de0e1f5d0fa378ea016d91a056f772b2d6a7..69112c1cd7244875bec678061c36761236344808 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 |