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 }; |
| 83 template <typename S> struct WrapperTraits<InlinedStructPtr<S>, true> { |
| 84 typedef typename S::Data_* DataType; |
| 85 }; |
79 template <typename S> struct WrapperTraits<S, true> { | 86 template <typename S> struct WrapperTraits<S, true> { |
80 typedef typename S::Data_* DataType; | 87 typedef typename S::Data_* DataType; |
81 }; | 88 }; |
82 | 89 |
83 } // namespace internal | 90 } // namespace internal |
84 } // namespace mojo | 91 } // namespace mojo |
85 | 92 |
86 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ | 93 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ |
OLD | NEW |