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

Unified Diff: base/bind_internal.h.pump

Issue 8073012: Callback API Change: Allow Bind() to take a Callback<> and bind all its free parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/bind_internal.h ('k') | base/bind_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bind_internal.h.pump
diff --git a/base/bind_internal.h.pump b/base/bind_internal.h.pump
index 31988c54b03b2457b4c4547c9440c75da97813ab..532fe3da92128b66579d290dccf89ca6b0fd3db8 100644
--- a/base/bind_internal.h.pump
+++ b/base/bind_internal.h.pump
@@ -266,6 +266,23 @@ $for M_UNBOUND_ARG , [[x$(M_UNBOUND_ARG)]]);
]] $$ for ARITY
]] $$ for BOUND
+// BindMoreFuncN<>
+//
+// This set of functions help in fully binding the free parameters in a
+// Callback<>.
+$for BOUND [[
+$range BOUND_ARG 1..BOUND
+$if BOUND != 0 [[
+
+template <typename Sig, $for BOUND_ARG , [[typename P$(BOUND_ARG)]]>
+void BindMoreFunc$(BOUND)(const base::Callback<Sig>& callback, [[]]
+$for BOUND_ARG , [[const P$(BOUND_ARG)& p$(BOUND_ARG)]]) {
+ callback.Run($for BOUND_ARG , [[p$(BOUND_ARG)]]);
+}
+
+]] $$ if BOUND
+]] $$ for BOUND
+
// InvokerStorageN<>
//
// These are the actual storage classes for the Invokers.
« no previous file with comments | « base/bind_internal.h ('k') | base/bind_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698