| Index: mojo/public/cpp/bindings/lib/callback_internal.h
|
| diff --git a/mojo/public/cpp/bindings/lib/callback_internal.h b/mojo/public/cpp/bindings/lib/callback_internal.h
|
| index 4802e437f2b6be2a4bec41ca7a27398175b1dcf2..f76ebef59e6c67ba12b4f13e67534be49cc3cdb7 100644
|
| --- a/mojo/public/cpp/bindings/lib/callback_internal.h
|
| +++ b/mojo/public/cpp/bindings/lib/callback_internal.h
|
| @@ -5,50 +5,21 @@
|
| #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_CALLBACK_INTERNAL_H_
|
| #define MOJO_PUBLIC_CPP_BINDINGS_LIB_CALLBACK_INTERNAL_H_
|
|
|
| -#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
|
| -
|
| namespace mojo {
|
| -namespace internal {
|
| -
|
| -template <typename T, bool is_object_type = TypeTraits<T>::kIsObject>
|
| -struct Callback_ParamTraits {};
|
| +class String;
|
|
|
| -template <typename T>
|
| -struct Callback_ParamTraits<T, true> {
|
| - typedef const T& ForwardType;
|
| - static const bool kIsScopedHandle = false;
|
| -};
|
| +namespace internal {
|
|
|
| template <typename T>
|
| -struct Callback_ParamTraits<T, false> {
|
| +struct Callback_ParamTraits {
|
| typedef T ForwardType;
|
| - static const bool kIsScopedHandle = false;
|
| };
|
|
|
| -template <typename H>
|
| -struct Callback_ParamTraits<ScopedHandleBase<H>, true> {
|
| - typedef ScopedHandleBase<H> ForwardType;
|
| - static const bool kIsScopedHandle = true;
|
| +template <>
|
| +struct Callback_ParamTraits<String> {
|
| + typedef const String& ForwardType;
|
| };
|
|
|
| -template<bool B, typename T = void>
|
| -struct EnableIf {};
|
| -
|
| -template<typename T>
|
| -struct EnableIf<true, T> { typedef T type; };
|
| -
|
| -template <typename T>
|
| -typename EnableIf<!Callback_ParamTraits<T>::kIsScopedHandle, T>::type&
|
| - Callback_Forward(T& t) {
|
| - return t;
|
| -}
|
| -
|
| -template <typename T>
|
| -typename EnableIf<Callback_ParamTraits<T>::kIsScopedHandle, T>::type
|
| - Callback_Forward(T& t) {
|
| - return t.Pass();
|
| -}
|
| -
|
| } // namespace internal
|
| } // namespace mojo
|
|
|
|
|