-// Copyright (c) 2006-2011 Google Inc. All rights reserved.
+// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
+// Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// The contents of this file are identical to base/tuple.h
// A Tuple is a generic templatized container, similar in concept to std::pair.
// There are classes Tuple0 to Tuple6, cooresponding to the number of elements
// DispatchToMethod(&foo, &Foo::SomeMeth, MakeTuple(1, 2, 3));
// // foo->SomeMeth(1, 2, 3);
-#ifndef CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_
-#define CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_
+#ifndef CEF_INCLUDE_BASE_CEF_TUPLE_H_
+#define CEF_INCLUDE_BASE_CEF_TUPLE_H_
#pragma once
-// If base/tuple.h is included first then exclude this file. This is to
-// facilitate the use of both base/bind.h and cef_runnable.h in unit tests.
-#ifndef BASE_TUPLE_H__
+#if defined(BASE_TUPLE_H_)
+// Do nothing if the Chromium header has already been included.
+// This can happen in cases where Chromium code is used directly by the
+// client application. When using Chromium code directly always include
+// the Chromium header first to avoid type conflicts.
+#elif defined(USING_CHROMIUM_INCLUDES)
+// When building CEF include the Chromium header directly.
+#include "base/tuple.h"
+#else // !USING_CHROMIUM_INCLUDES
+// The following is substantially similar to the Chromium implementation.
+// If the Chromium implementation diverges the below implementation should be
+// updated to match.
+
+#include "include/base/cef_bind_helpers.h"
+
+namespace base {
-#if defined(OS_CHROMEOS)
-// To troubleshoot crosbug.com/7327.
-#include "base/logging.h"
-#endif
// Traits ----------------------------------------------------------------------
//
// A simple traits class for tuple arguments.
Tuple3(typename TupleTraits<A>::ParamType a,
typename TupleTraits<B>::ParamType b,
typename TupleTraits<C>::ParamType c)
- : a(a), b(b), c(c) {
+ : a(a), b(b), c(c){
}
A a;
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) {
- (obj->*method)(arg);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg));
}
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const Tuple1<A>& arg) {
-#if defined(OS_CHROMEOS)
- // To troubleshoot crosbug.com/7327.
- CHECK(obj);
- CHECK(&arg);
- CHECK(method);
-#endif
- (obj->*method)(arg.a);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));
}
template<class ObjT, class Method, class A, class B>
inline void DispatchToMethod(ObjT* obj,
Method method,
const Tuple2<A, B>& arg) {
- (obj->*method)(arg.a, arg.b);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));
}
template<class ObjT, class Method, class A, class B, class C>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<A, B, C>& arg) {
- (obj->*method)(arg.a, arg.b, arg.c);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));
}
template<class ObjT, class Method, class A, class B, class C, class D>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<A, B, C, D>& arg) {
- (obj->*method)(arg.a, arg.b, arg.c, arg.d);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<A, B, C, D, E>& arg) {
- (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E,
class F>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<A, B, C, D, E, F>& arg) {
- (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
+ base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E,
class F, class G>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple7<A, B, C, D, E, F, G>& arg) {
- (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
+ base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),
+ base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g));
+}
+
+template<class ObjT, class Method, class A, class B, class C, class D, class E,
+ class F, class G, class H>
+inline void DispatchToMethod(ObjT* obj, Method method,
+ const Tuple8<A, B, C, D, E, F, G, H>& arg) {
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
+ base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),
+ base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g),
+ base::cef_internal::UnwrapTraits<H>::Unwrap(arg.h));
}
// Static Dispatchers with no out params.
template <class Function, class A>
inline void DispatchToFunction(Function function, const Tuple1<A>& arg) {
- (*function)(arg.a);
+ (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));
}
template<class Function, class A, class B>
inline void DispatchToFunction(Function function, const Tuple2<A, B>& arg) {
- (*function)(arg.a, arg.b);
+ (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));
}
template<class Function, class A, class B, class C>
inline void DispatchToFunction(Function function, const Tuple3<A, B, C>& arg) {
- (*function)(arg.a, arg.b, arg.c);
+ (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));
}
template<class Function, class A, class B, class C, class D>
inline void DispatchToFunction(Function function,
const Tuple4<A, B, C, D>& arg) {
- (*function)(arg.a, arg.b, arg.c, arg.d);
+ (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d));
}
template<class Function, class A, class B, class C, class D, class E>
inline void DispatchToFunction(Function function,
const Tuple5<A, B, C, D, E>& arg) {
- (*function)(arg.a, arg.b, arg.c, arg.d, arg.e);
+ (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e));
}
template<class Function, class A, class B, class C, class D, class E, class F>
inline void DispatchToFunction(Function function,
const Tuple6<A, B, C, D, E, F>& arg) {
- (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f);
+ (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
+ base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f));
}
template<class Function, class A, class B, class C, class D, class E, class F,
class G>
inline void DispatchToFunction(Function function,
const Tuple7<A, B, C, D, E, F, G>& arg) {
- (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g);
+ (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
+ base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),
+ base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g));
}
template<class Function, class A, class B, class C, class D, class E, class F,
class G, class H>
inline void DispatchToFunction(Function function,
const Tuple8<A, B, C, D, E, F, G, H>& arg) {
- (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g, arg.h);
+ (*function)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
+ base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f),
+ base::cef_internal::UnwrapTraits<G>::Unwrap(arg.g),
+ base::cef_internal::UnwrapTraits<H>::Unwrap(arg.h));
}
// Dispatchers with 0 out param (as a Tuple0).
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj, Method method, const A& arg, Tuple0*) {
- (obj->*method)(arg);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg));
}
template <class ObjT, class Method, class A>
inline void DispatchToMethod(ObjT* obj,
Method method,
const Tuple1<A>& arg, Tuple0*) {
- (obj->*method)(arg.a);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a));
}
template<class ObjT, class Method, class A, class B>
inline void DispatchToMethod(ObjT* obj,
Method method,
const Tuple2<A, B>& arg, Tuple0*) {
- (obj->*method)(arg.a, arg.b);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b));
}
template<class ObjT, class Method, class A, class B, class C>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<A, B, C>& arg, Tuple0*) {
- (obj->*method)(arg.a, arg.b, arg.c);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c));
}
template<class ObjT, class Method, class A, class B, class C, class D>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<A, B, C, D>& arg, Tuple0*) {
- (obj->*method)(arg.a, arg.b, arg.c, arg.d);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<A, B, C, D, E>& arg, Tuple0*) {
- (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E,
class F>
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<A, B, C, D, E, F>& arg, Tuple0*) {
- (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f);
+ (obj->*method)(base::cef_internal::UnwrapTraits<A>::Unwrap(arg.a),
+ base::cef_internal::UnwrapTraits<B>::Unwrap(arg.b),
+ base::cef_internal::UnwrapTraits<C>::Unwrap(arg.c),
+ base::cef_internal::UnwrapTraits<D>::Unwrap(arg.d),
+ base::cef_internal::UnwrapTraits<E>::Unwrap(arg.e),
+ base::cef_internal::UnwrapTraits<F>::Unwrap(arg.f));
}
// Dispatchers with 1 out param.
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple1<OutA>* out) {
- (obj->*method)(in.a, &out->a);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a);
}
template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple1<OutA>* out) {
- (obj->*method)(in.a, in.b, &out->a);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ &out->a);
}
template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple1<OutA>* out) {
- (obj->*method)(in.a, in.b, in.c, &out->a);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ &out->a);
}
template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple1<OutA>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, &out->a);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ &out->a);
}
template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple1<OutA>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ &out->a);
}
template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple1<OutA>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
+ &out->a);
}
// Dispatchers with 2 out params.
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple2<OutA, OutB>* out) {
- (obj->*method)(in.a, &out->a, &out->b);
+ (obj->*method)(
+ base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a, &out->b);
}
template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple2<OutA, OutB>* out) {
- (obj->*method)(in.a, in.b, &out->a, &out->b);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ &out->a,
+ &out->b);
}
template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple2<OutA, OutB>* out) {
- (obj->*method)(in.a, in.b, in.c, &out->a, &out->b);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ &out->a,
+ &out->b);
}
template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple2<OutA, OutB>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ &out->a,
+ &out->b);
}
template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple2<OutA, OutB>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a, &out->b);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ &out->a,
+ &out->b);
}
template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple2<OutA, OutB>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a, &out->b);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
+ &out->a,
+ &out->b);
}
// Dispatchers with 3 out params.
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple3<OutA, OutB, OutC>* out) {
- (obj->*method)(in.a, &out->a, &out->b, &out->c);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ &out->a,
+ &out->b,
+ &out->c);
}
template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple3<OutA, OutB, OutC>* out) {
- (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ &out->a,
+ &out->b,
+ &out->c);
}
template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple3<OutA, OutB, OutC>* out) {
- (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ &out->a,
+ &out->b,
+ &out->c);
}
template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple3<OutA, OutB, OutC>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ &out->a,
+ &out->b,
+ &out->c);
}
template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple3<OutA, OutB, OutC>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a, &out->b, &out->c);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ &out->a,
+ &out->b,
+ &out->c);
}
template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple3<OutA, OutB, OutC>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a, &out->b, &out->c);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
+ &out->a,
+ &out->b,
+ &out->c);
}
// Dispatchers with 4 out params.
inline void DispatchToMethod(ObjT* obj, Method method,
const InA& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
- (obj->*method)(in, &out->a, &out->b, &out->c, &out->d);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d);
}
template<class ObjT, class Method, class InA,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
- (obj->*method)(in.a, &out->a, &out->b, &out->c, &out->d);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d);
}
template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
- (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c, &out->d);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d);
}
template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
- (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c, &out->d);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d);
}
template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c, &out->d);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d);
}
template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e,
- &out->a, &out->b, &out->c, &out->d);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d);
}
template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple4<OutA, OutB, OutC, OutD>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f,
- &out->a, &out->b, &out->c, &out->d);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d);
}
// Dispatchers with 5 out params.
inline void DispatchToMethod(ObjT* obj, Method method,
const InA& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
- (obj->*method)(in, &out->a, &out->b, &out->c, &out->d, &out->e);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d,
+ &out->e);
}
template<class ObjT, class Method, class InA,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple1<InA>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
- (obj->*method)(in.a, &out->a, &out->b, &out->c, &out->d, &out->e);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d,
+ &out->e);
}
template<class ObjT, class Method, class InA, class InB,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple2<InA, InB>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
- (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c, &out->d, &out->e);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d,
+ &out->e);
}
template<class ObjT, class Method, class InA, class InB, class InC,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple3<InA, InB, InC>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
- (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c, &out->d, &out->e);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d,
+ &out->e);
}
template<class ObjT, class Method, class InA, class InB, class InC, class InD,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple4<InA, InB, InC, InD>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c, &out->d,
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d,
&out->e);
}
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple5<InA, InB, InC, InD, InE>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e,
- &out->a, &out->b, &out->c, &out->d, &out->e);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d,
+ &out->e);
}
template<class ObjT, class Method,
inline void DispatchToMethod(ObjT* obj, Method method,
const Tuple6<InA, InB, InC, InD, InE, InF>& in,
Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
- (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f,
- &out->a, &out->b, &out->c, &out->d, &out->e);
+ (obj->*method)(base::cef_internal::UnwrapTraits<InA>::Unwrap(in.a),
+ base::cef_internal::UnwrapTraits<InB>::Unwrap(in.b),
+ base::cef_internal::UnwrapTraits<InC>::Unwrap(in.c),
+ base::cef_internal::UnwrapTraits<InD>::Unwrap(in.d),
+ base::cef_internal::UnwrapTraits<InE>::Unwrap(in.e),
+ base::cef_internal::UnwrapTraits<InF>::Unwrap(in.f),
+ &out->a,
+ &out->b,
+ &out->c,
+ &out->d,
+ &out->e);
}
-#endif // BASE_TUPLE_H__
+} // namespace base
+
+#endif // !USING_CHROMIUM_INCLUDES
-#endif // CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_
+#endif // CEF_INCLUDE_BASE_CEF_TUPLE_H_