diff options
author | Alex Vakulenko <avakulenko@google.com> | 2016-03-17 10:36:19 -0700 |
---|---|---|
committer | Alex Vakulenko <avakulenko@google.com> | 2016-03-21 08:28:30 -0700 |
commit | 45779228f8c9e40851cfd23f727e2bd8ffdd4714 (patch) | |
tree | 6673daa05f208c2d2f2f1ad7e14f6c7a2d1e85ce /base/callback_forward.h | |
parent | 1a84f3b092fffe0c515acad230c10131a66cfd0e (diff) | |
download | libchrome-45779228f8c9e40851cfd23f727e2bd8ffdd4714.tar.gz |
Update libchrome to r381699
TEST=Build all
Change-Id: I962a83a044a102515c316d04bb65e7c9302e0f0c
Diffstat (limited to 'base/callback_forward.h')
-rw-r--r-- | base/callback_forward.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/base/callback_forward.h b/base/callback_forward.h index a9a263a50e..8b9b89cdc2 100644 --- a/base/callback_forward.h +++ b/base/callback_forward.h @@ -6,8 +6,19 @@ #define BASE_CALLBACK_FORWARD_H_ namespace base { +namespace internal { -template <typename Sig> +// CopyMode is used to control the copyablity of a Callback. +// MoveOnly indicates the Callback is not copyable but movable, and Copyable +// indicates it is copyable and movable. +enum class CopyMode { + MoveOnly, Copyable, +}; + +} // namespace internal + +template <typename Signature, + internal::CopyMode copy_mode = internal::CopyMode::Copyable> class Callback; // Syntactic sugar to make Callback<void()> easier to declare since it |