OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CALLBACK_FORWARD_H_ | 5 #ifndef BASE_CALLBACK_FORWARD_H_ |
6 #define BASE_CALLBACK_FORWARD_H_ | 6 #define BASE_CALLBACK_FORWARD_H_ |
7 | 7 |
8 namespace base { | 8 namespace base { |
9 | 9 |
10 template <typename Sig> | 10 namespace internal { |
11 | |
12 enum class CopyMode { | |
13 MoveOnly, Copyable, | |
Nico
2016/02/15 21:47:57
Please give these two a comment explaining what th
tzik
2016/02/16 09:33:32
Added a brief comment.
| |
14 }; | |
15 | |
16 } // namespace internal | |
17 | |
18 template <typename Signature, | |
19 internal::CopyMode copy_mode = internal::CopyMode::Copyable> | |
11 class Callback; | 20 class Callback; |
12 | 21 |
13 // Syntactic sugar to make Callback<void()> easier to declare since it | 22 // Syntactic sugar to make Callback<void()> easier to declare since it |
14 // will be used in a lot of APIs with delayed execution. | 23 // will be used in a lot of APIs with delayed execution. |
15 using Closure = Callback<void()>; | 24 using Closure = Callback<void()>; |
16 | 25 |
17 } // namespace base | 26 } // namespace base |
18 | 27 |
19 #endif // BASE_CALLBACK_FORWARD_H_ | 28 #endif // BASE_CALLBACK_FORWARD_H_ |
OLD | NEW |