michael@0: // This file was GENERATED by command: michael@0: // pump.py bind.h.pump michael@0: // DO NOT EDIT BY HAND!!! michael@0: michael@0: michael@0: // Copyright (c) 2011 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #ifndef BASE_BIND_H_ michael@0: #define BASE_BIND_H_ michael@0: michael@0: #include "base/bind_internal.h" michael@0: #include "base/callback_internal.h" michael@0: michael@0: // ----------------------------------------------------------------------------- michael@0: // Usage documentation michael@0: // ----------------------------------------------------------------------------- michael@0: // michael@0: // See base/callback.h for documentation. michael@0: // michael@0: // michael@0: // ----------------------------------------------------------------------------- michael@0: // Implementation notes michael@0: // ----------------------------------------------------------------------------- michael@0: // michael@0: // If you're reading the implementation, before proceeding further, you should michael@0: // read the top comment of base/bind_internal.h for a definition of common michael@0: // terms and concepts. michael@0: // michael@0: // RETURN TYPES michael@0: // michael@0: // Though Bind()'s result is meant to be stored in a Callback<> type, it michael@0: // cannot actually return the exact type without requiring a large amount michael@0: // of extra template specializations. The problem is that in order to michael@0: // discern the correct specialization of Callback<>, Bind would need to michael@0: // unwrap the function signature to determine the signature's arity, and michael@0: // whether or not it is a method. michael@0: // michael@0: // Each unique combination of (arity, function_type, num_prebound) where michael@0: // function_type is one of {function, method, const_method} would require michael@0: // one specialization. We eventually have to do a similar number of michael@0: // specializations anyways in the implementation (see the Invoker<>, michael@0: // classes). However, it is avoidable in Bind if we return the result michael@0: // via an indirection like we do below. michael@0: // michael@0: // TODO(ajwong): We might be able to avoid this now, but need to test. michael@0: // michael@0: // It is possible to move most of the COMPILE_ASSERT asserts into BindState<>, michael@0: // but it feels a little nicer to have the asserts here so people do not michael@0: // need to crack open bind_internal.h. On the other hand, it makes Bind() michael@0: // harder to read. michael@0: michael@0: namespace base { michael@0: michael@0: template michael@0: base::Callback< michael@0: typename internal::BindState< michael@0: typename internal::FunctorTraits::RunnableType, michael@0: typename internal::FunctorTraits::RunType, michael@0: void()> michael@0: ::UnboundRunType> michael@0: Bind(Functor functor) { michael@0: // Typedefs for how to store and run the functor. michael@0: typedef typename internal::FunctorTraits::RunnableType RunnableType; michael@0: typedef typename internal::FunctorTraits::RunType RunType; michael@0: michael@0: // Use RunnableType::RunType instead of RunType above because our michael@0: // checks should below for bound references need to know what the actual michael@0: // functor is going to interpret the argument as. michael@0: typedef internal::FunctionTraits michael@0: BoundFunctorTraits; michael@0: michael@0: typedef internal::BindState BindState; michael@0: michael@0: michael@0: return Callback( michael@0: new BindState(internal::MakeRunnable(functor))); michael@0: } michael@0: michael@0: template michael@0: base::Callback< michael@0: typename internal::BindState< michael@0: typename internal::FunctorTraits::RunnableType, michael@0: typename internal::FunctorTraits::RunType, michael@0: void(typename internal::CallbackParamTraits::StorageType)> michael@0: ::UnboundRunType> michael@0: Bind(Functor functor, const P1& p1) { michael@0: // Typedefs for how to store and run the functor. michael@0: typedef typename internal::FunctorTraits::RunnableType RunnableType; michael@0: typedef typename internal::FunctorTraits::RunType RunType; michael@0: michael@0: // Use RunnableType::RunType instead of RunType above because our michael@0: // checks should below for bound references need to know what the actual michael@0: // functor is going to interpret the argument as. michael@0: typedef internal::FunctionTraits michael@0: BoundFunctorTraits; michael@0: michael@0: // Do not allow binding a non-const reference parameter. Non-const reference michael@0: // parameters are disallowed by the Google style guide. Also, binding a michael@0: // non-const reference parameter can make for subtle bugs because the michael@0: // invoked function will receive a reference to the stored copy of the michael@0: // argument and not the original. michael@0: COMPILE_ASSERT( michael@0: !(is_non_const_reference::value ), michael@0: do_not_bind_functions_with_nonconst_ref); michael@0: michael@0: // For methods, we need to be careful for parameter 1. We do not require michael@0: // a scoped_refptr because BindState<> itself takes care of AddRef() for michael@0: // methods. We also disallow binding of an array as the method's target michael@0: // object. michael@0: COMPILE_ASSERT( michael@0: internal::HasIsMethodTag::value || michael@0: !internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p1_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::HasIsMethodTag::value || michael@0: !is_array::value, michael@0: first_bound_argument_to_method_cannot_be_array); michael@0: typedef internal::BindState::StorageType)> BindState; michael@0: michael@0: michael@0: return Callback( michael@0: new BindState(internal::MakeRunnable(functor), p1)); michael@0: } michael@0: michael@0: template michael@0: base::Callback< michael@0: typename internal::BindState< michael@0: typename internal::FunctorTraits::RunnableType, michael@0: typename internal::FunctorTraits::RunType, michael@0: void(typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> michael@0: ::UnboundRunType> michael@0: Bind(Functor functor, const P1& p1, const P2& p2) { michael@0: // Typedefs for how to store and run the functor. michael@0: typedef typename internal::FunctorTraits::RunnableType RunnableType; michael@0: typedef typename internal::FunctorTraits::RunType RunType; michael@0: michael@0: // Use RunnableType::RunType instead of RunType above because our michael@0: // checks should below for bound references need to know what the actual michael@0: // functor is going to interpret the argument as. michael@0: typedef internal::FunctionTraits michael@0: BoundFunctorTraits; michael@0: michael@0: // Do not allow binding a non-const reference parameter. Non-const reference michael@0: // parameters are disallowed by the Google style guide. Also, binding a michael@0: // non-const reference parameter can make for subtle bugs because the michael@0: // invoked function will receive a reference to the stored copy of the michael@0: // argument and not the original. michael@0: COMPILE_ASSERT( michael@0: !(is_non_const_reference::value || michael@0: is_non_const_reference::value ), michael@0: do_not_bind_functions_with_nonconst_ref); michael@0: michael@0: // For methods, we need to be careful for parameter 1. We do not require michael@0: // a scoped_refptr because BindState<> itself takes care of AddRef() for michael@0: // methods. We also disallow binding of an array as the method's target michael@0: // object. michael@0: COMPILE_ASSERT( michael@0: internal::HasIsMethodTag::value || michael@0: !internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p1_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::HasIsMethodTag::value || michael@0: !is_array::value, michael@0: first_bound_argument_to_method_cannot_be_array); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p2_is_refcounted_type_and_needs_scoped_refptr); michael@0: typedef internal::BindState::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> BindState; michael@0: michael@0: michael@0: return Callback( michael@0: new BindState(internal::MakeRunnable(functor), p1, p2)); michael@0: } michael@0: michael@0: template michael@0: base::Callback< michael@0: typename internal::BindState< michael@0: typename internal::FunctorTraits::RunnableType, michael@0: typename internal::FunctorTraits::RunType, michael@0: void(typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> michael@0: ::UnboundRunType> michael@0: Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3) { michael@0: // Typedefs for how to store and run the functor. michael@0: typedef typename internal::FunctorTraits::RunnableType RunnableType; michael@0: typedef typename internal::FunctorTraits::RunType RunType; michael@0: michael@0: // Use RunnableType::RunType instead of RunType above because our michael@0: // checks should below for bound references need to know what the actual michael@0: // functor is going to interpret the argument as. michael@0: typedef internal::FunctionTraits michael@0: BoundFunctorTraits; michael@0: michael@0: // Do not allow binding a non-const reference parameter. Non-const reference michael@0: // parameters are disallowed by the Google style guide. Also, binding a michael@0: // non-const reference parameter can make for subtle bugs because the michael@0: // invoked function will receive a reference to the stored copy of the michael@0: // argument and not the original. michael@0: COMPILE_ASSERT( michael@0: !(is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value ), michael@0: do_not_bind_functions_with_nonconst_ref); michael@0: michael@0: // For methods, we need to be careful for parameter 1. We do not require michael@0: // a scoped_refptr because BindState<> itself takes care of AddRef() for michael@0: // methods. We also disallow binding of an array as the method's target michael@0: // object. michael@0: COMPILE_ASSERT( michael@0: internal::HasIsMethodTag::value || michael@0: !internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p1_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::HasIsMethodTag::value || michael@0: !is_array::value, michael@0: first_bound_argument_to_method_cannot_be_array); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p2_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p3_is_refcounted_type_and_needs_scoped_refptr); michael@0: typedef internal::BindState::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> BindState; michael@0: michael@0: michael@0: return Callback( michael@0: new BindState(internal::MakeRunnable(functor), p1, p2, p3)); michael@0: } michael@0: michael@0: template michael@0: base::Callback< michael@0: typename internal::BindState< michael@0: typename internal::FunctorTraits::RunnableType, michael@0: typename internal::FunctorTraits::RunType, michael@0: void(typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> michael@0: ::UnboundRunType> michael@0: Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4) { michael@0: // Typedefs for how to store and run the functor. michael@0: typedef typename internal::FunctorTraits::RunnableType RunnableType; michael@0: typedef typename internal::FunctorTraits::RunType RunType; michael@0: michael@0: // Use RunnableType::RunType instead of RunType above because our michael@0: // checks should below for bound references need to know what the actual michael@0: // functor is going to interpret the argument as. michael@0: typedef internal::FunctionTraits michael@0: BoundFunctorTraits; michael@0: michael@0: // Do not allow binding a non-const reference parameter. Non-const reference michael@0: // parameters are disallowed by the Google style guide. Also, binding a michael@0: // non-const reference parameter can make for subtle bugs because the michael@0: // invoked function will receive a reference to the stored copy of the michael@0: // argument and not the original. michael@0: COMPILE_ASSERT( michael@0: !(is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value ), michael@0: do_not_bind_functions_with_nonconst_ref); michael@0: michael@0: // For methods, we need to be careful for parameter 1. We do not require michael@0: // a scoped_refptr because BindState<> itself takes care of AddRef() for michael@0: // methods. We also disallow binding of an array as the method's target michael@0: // object. michael@0: COMPILE_ASSERT( michael@0: internal::HasIsMethodTag::value || michael@0: !internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p1_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::HasIsMethodTag::value || michael@0: !is_array::value, michael@0: first_bound_argument_to_method_cannot_be_array); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p2_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p3_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p4_is_refcounted_type_and_needs_scoped_refptr); michael@0: typedef internal::BindState::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> BindState; michael@0: michael@0: michael@0: return Callback( michael@0: new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4)); michael@0: } michael@0: michael@0: template michael@0: base::Callback< michael@0: typename internal::BindState< michael@0: typename internal::FunctorTraits::RunnableType, michael@0: typename internal::FunctorTraits::RunType, michael@0: void(typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> michael@0: ::UnboundRunType> michael@0: Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4, michael@0: const P5& p5) { michael@0: // Typedefs for how to store and run the functor. michael@0: typedef typename internal::FunctorTraits::RunnableType RunnableType; michael@0: typedef typename internal::FunctorTraits::RunType RunType; michael@0: michael@0: // Use RunnableType::RunType instead of RunType above because our michael@0: // checks should below for bound references need to know what the actual michael@0: // functor is going to interpret the argument as. michael@0: typedef internal::FunctionTraits michael@0: BoundFunctorTraits; michael@0: michael@0: // Do not allow binding a non-const reference parameter. Non-const reference michael@0: // parameters are disallowed by the Google style guide. Also, binding a michael@0: // non-const reference parameter can make for subtle bugs because the michael@0: // invoked function will receive a reference to the stored copy of the michael@0: // argument and not the original. michael@0: COMPILE_ASSERT( michael@0: !(is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value ), michael@0: do_not_bind_functions_with_nonconst_ref); michael@0: michael@0: // For methods, we need to be careful for parameter 1. We do not require michael@0: // a scoped_refptr because BindState<> itself takes care of AddRef() for michael@0: // methods. We also disallow binding of an array as the method's target michael@0: // object. michael@0: COMPILE_ASSERT( michael@0: internal::HasIsMethodTag::value || michael@0: !internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p1_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::HasIsMethodTag::value || michael@0: !is_array::value, michael@0: first_bound_argument_to_method_cannot_be_array); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p2_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p3_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p4_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p5_is_refcounted_type_and_needs_scoped_refptr); michael@0: typedef internal::BindState::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> BindState; michael@0: michael@0: michael@0: return Callback( michael@0: new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5)); michael@0: } michael@0: michael@0: template michael@0: base::Callback< michael@0: typename internal::BindState< michael@0: typename internal::FunctorTraits::RunnableType, michael@0: typename internal::FunctorTraits::RunType, michael@0: void(typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> michael@0: ::UnboundRunType> michael@0: Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4, michael@0: const P5& p5, const P6& p6) { michael@0: // Typedefs for how to store and run the functor. michael@0: typedef typename internal::FunctorTraits::RunnableType RunnableType; michael@0: typedef typename internal::FunctorTraits::RunType RunType; michael@0: michael@0: // Use RunnableType::RunType instead of RunType above because our michael@0: // checks should below for bound references need to know what the actual michael@0: // functor is going to interpret the argument as. michael@0: typedef internal::FunctionTraits michael@0: BoundFunctorTraits; michael@0: michael@0: // Do not allow binding a non-const reference parameter. Non-const reference michael@0: // parameters are disallowed by the Google style guide. Also, binding a michael@0: // non-const reference parameter can make for subtle bugs because the michael@0: // invoked function will receive a reference to the stored copy of the michael@0: // argument and not the original. michael@0: COMPILE_ASSERT( michael@0: !(is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value ), michael@0: do_not_bind_functions_with_nonconst_ref); michael@0: michael@0: // For methods, we need to be careful for parameter 1. We do not require michael@0: // a scoped_refptr because BindState<> itself takes care of AddRef() for michael@0: // methods. We also disallow binding of an array as the method's target michael@0: // object. michael@0: COMPILE_ASSERT( michael@0: internal::HasIsMethodTag::value || michael@0: !internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p1_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::HasIsMethodTag::value || michael@0: !is_array::value, michael@0: first_bound_argument_to_method_cannot_be_array); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p2_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p3_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p4_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p5_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p6_is_refcounted_type_and_needs_scoped_refptr); michael@0: typedef internal::BindState::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> BindState; michael@0: michael@0: michael@0: return Callback( michael@0: new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6)); michael@0: } michael@0: michael@0: template michael@0: base::Callback< michael@0: typename internal::BindState< michael@0: typename internal::FunctorTraits::RunnableType, michael@0: typename internal::FunctorTraits::RunType, michael@0: void(typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> michael@0: ::UnboundRunType> michael@0: Bind(Functor functor, const P1& p1, const P2& p2, const P3& p3, const P4& p4, michael@0: const P5& p5, const P6& p6, const P7& p7) { michael@0: // Typedefs for how to store and run the functor. michael@0: typedef typename internal::FunctorTraits::RunnableType RunnableType; michael@0: typedef typename internal::FunctorTraits::RunType RunType; michael@0: michael@0: // Use RunnableType::RunType instead of RunType above because our michael@0: // checks should below for bound references need to know what the actual michael@0: // functor is going to interpret the argument as. michael@0: typedef internal::FunctionTraits michael@0: BoundFunctorTraits; michael@0: michael@0: // Do not allow binding a non-const reference parameter. Non-const reference michael@0: // parameters are disallowed by the Google style guide. Also, binding a michael@0: // non-const reference parameter can make for subtle bugs because the michael@0: // invoked function will receive a reference to the stored copy of the michael@0: // argument and not the original. michael@0: COMPILE_ASSERT( michael@0: !(is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value || michael@0: is_non_const_reference::value ), michael@0: do_not_bind_functions_with_nonconst_ref); michael@0: michael@0: // For methods, we need to be careful for parameter 1. We do not require michael@0: // a scoped_refptr because BindState<> itself takes care of AddRef() for michael@0: // methods. We also disallow binding of an array as the method's target michael@0: // object. michael@0: COMPILE_ASSERT( michael@0: internal::HasIsMethodTag::value || michael@0: !internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p1_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::HasIsMethodTag::value || michael@0: !is_array::value, michael@0: first_bound_argument_to_method_cannot_be_array); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p2_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p3_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p4_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p5_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p6_is_refcounted_type_and_needs_scoped_refptr); michael@0: COMPILE_ASSERT(!internal::NeedsScopedRefptrButGetsRawPtr::value, michael@0: p7_is_refcounted_type_and_needs_scoped_refptr); michael@0: typedef internal::BindState::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType, michael@0: typename internal::CallbackParamTraits::StorageType)> BindState; michael@0: michael@0: michael@0: return Callback( michael@0: new BindState(internal::MakeRunnable(functor), p1, p2, p3, p4, p5, p6, michael@0: p7)); michael@0: } michael@0: michael@0: } // namespace base michael@0: michael@0: #endif // BASE_BIND_H_