| Index: base/bind.h.pump
|
| diff --git a/base/bind.h.pump b/base/bind.h.pump
|
| index 62b313f666fcaabd4357e6bb1ef59e2d1053b284..eca00cdd0773edf9606a120f0fc431f7f9624887 100644
|
| --- a/base/bind.h.pump
|
| +++ b/base/bind.h.pump
|
| @@ -63,6 +63,26 @@ $for BOUND_ARG , [[P$(BOUND_ARG)]]>(
|
| }
|
|
|
| ]]
|
| +]] $$ for BOUND
|
| +
|
| +// Specializations to allow binding all the free arguments in a
|
| +// pre-existing base::Callback<>. This does not give full support for
|
| +// currying, but is significantly simpler and addresses the use case
|
| +// where a base::Callback<> needs to be invoked on another context/thread.
|
| +$for BOUND [[
|
| +$range BOUND_ARG 1..BOUND
|
| +$if BOUND != 0 [[
|
| +
|
| +template <typename Sig, $for BOUND_ARG , [[typename P$(BOUND_ARG)]]>
|
| +base::Closure Bind(const base::Callback<Sig>& callback, [[]]
|
| +$for BOUND_ARG , [[const P$(BOUND_ARG)& p$(BOUND_ARG)]]) {
|
| + return base::Bind([[]]
|
| +&internal::BindMoreFunc$(BOUND)<Sig, $for BOUND_ARG , [[P$(BOUND_ARG)]]>, [[]]
|
| +callback, [[]]
|
| +$for BOUND_ARG , [[p$(BOUND_ARG)]]);
|
| +}
|
| +
|
| +]]
|
|
|
| ]] $$ for BOUND
|
|
|
|
|