Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: base/callback_forward.h

Issue 1699773002: Extend base::Callback to have a move-only variant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msvc work around Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_
OLDNEW
« base/callback.h ('K') | « base/callback.h ('k') | base/callback_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698