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

Side by Side Diff: base/callback_forward.h

Issue 2394023003: Move out OnceCallback and RepeatingCallback from internal namespace (Closed)
Patch Set: rebase Created 4 years, 2 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
« no previous file with comments | « base/bind_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 namespace internal { 9 namespace internal {
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 template <typename Signature, 26 template <typename Signature,
27 internal::CopyMode copy_mode = internal::CopyMode::Copyable, 27 internal::CopyMode copy_mode = internal::CopyMode::Copyable,
28 internal::RepeatMode repeat_mode = internal::RepeatMode::Repeating> 28 internal::RepeatMode repeat_mode = internal::RepeatMode::Repeating>
29 class Callback; 29 class Callback;
30 30
31 // Syntactic sugar to make Callback<void()> easier to declare since it 31 // Syntactic sugar to make Callback<void()> easier to declare since it
32 // will be used in a lot of APIs with delayed execution. 32 // will be used in a lot of APIs with delayed execution.
33 using Closure = Callback<void()>; 33 using Closure = Callback<void()>;
34 34
35 namespace internal {
36
37 template <typename Signature> 35 template <typename Signature>
38 using OnceCallback = Callback<Signature, 36 using OnceCallback = Callback<Signature,
39 internal::CopyMode::MoveOnly, 37 internal::CopyMode::MoveOnly,
40 internal::RepeatMode::Once>; 38 internal::RepeatMode::Once>;
41 template <typename Signature> 39 template <typename Signature>
42 using RepeatingCallback = Callback<Signature, 40 using RepeatingCallback = Callback<Signature,
43 internal::CopyMode::Copyable, 41 internal::CopyMode::Copyable,
44 internal::RepeatMode::Repeating>; 42 internal::RepeatMode::Repeating>;
45 using OnceClosure = OnceCallback<void()>; 43 using OnceClosure = OnceCallback<void()>;
46 using RepeatingClosure = RepeatingCallback<void()>; 44 using RepeatingClosure = RepeatingCallback<void()>;
47 45
48 } // namespace internal
49 } // namespace base 46 } // namespace base
50 47
51 #endif // BASE_CALLBACK_FORWARD_H_ 48 #endif // BASE_CALLBACK_FORWARD_H_
OLDNEW
« no previous file with comments | « base/bind_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698