Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ |
| 7 | 7 |
| 8 #include "mojo/public/cpp/bindings/lib/template_util.h" | 8 #include "mojo/public/cpp/bindings/lib/template_util.h" |
| 9 #include "mojo/public/cpp/bindings/struct_ptr.h" | |
| 9 #include "mojo/public/cpp/system/core.h" | 10 #include "mojo/public/cpp/system/core.h" |
| 10 | 11 |
| 11 namespace mojo { | 12 namespace mojo { |
| 12 class String; | 13 class String; |
| 13 | 14 |
| 14 namespace internal { | 15 namespace internal { |
| 15 template <typename T> class Array_Data; | 16 template <typename T> class Array_Data; |
| 16 | 17 |
| 17 #pragma pack(push, 1) | 18 #pragma pack(push, 1) |
| 18 | 19 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 | 70 |
| 70 template <typename T, bool move_only = IsMoveOnlyType<T>::value> | 71 template <typename T, bool move_only = IsMoveOnlyType<T>::value> |
| 71 struct WrapperTraits; | 72 struct WrapperTraits; |
| 72 | 73 |
| 73 template <typename T> struct WrapperTraits<T, false> { | 74 template <typename T> struct WrapperTraits<T, false> { |
| 74 typedef T DataType; | 75 typedef T DataType; |
| 75 }; | 76 }; |
| 76 template <typename H> struct WrapperTraits<ScopedHandleBase<H>, true> { | 77 template <typename H> struct WrapperTraits<ScopedHandleBase<H>, true> { |
| 77 typedef H DataType; | 78 typedef H DataType; |
| 78 }; | 79 }; |
| 80 template <typename S> struct WrapperTraits<StructPtr<S>, true> { | |
| 81 typedef typename S::Data_* DataType; | |
| 82 typedef typename S::Data_ PlainDataType; | |
|
viettrungluu
2014/10/01 17:18:23
I'm not a huge fan of the name "PlainDataType", bu
qsr
2014/10/06 08:20:26
Unfortunately, I don't have anything that really f
| |
| 83 }; | |
| 84 template <typename S> struct WrapperTraits<InlinedStructPtr<S>, true> { | |
| 85 typedef typename S::Data_* DataType; | |
| 86 typedef typename S::Data_ PlainDataType; | |
| 87 }; | |
| 79 template <typename S> struct WrapperTraits<S, true> { | 88 template <typename S> struct WrapperTraits<S, true> { |
| 80 typedef typename S::Data_* DataType; | 89 typedef typename S::Data_* DataType; |
| 90 typedef typename S::Data_ PlainDataType; | |
| 81 }; | 91 }; |
| 82 | 92 |
| 83 } // namespace internal | 93 } // namespace internal |
| 84 } // namespace mojo | 94 } // namespace mojo |
| 85 | 95 |
| 86 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ | 96 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ |
| OLD | NEW |