OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h" | 5 #include "mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h" |
6 | 6 |
7 namespace mojo { | 7 namespace mojo { |
8 namespace { | 8 namespace { |
9 | 9 |
10 struct Context { | 10 struct Context { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 if (!data.ReadFStructArray(&out->get_mutable_struct_array())) | 109 if (!data.ReadFStructArray(&out->get_mutable_struct_array())) |
110 return false; | 110 return false; |
111 | 111 |
112 if (!data.ReadFStructMap(&out->get_mutable_struct_map())) | 112 if (!data.ReadFStructMap(&out->get_mutable_struct_map())) |
113 return false; | 113 return false; |
114 | 114 |
115 return true; | 115 return true; |
116 } | 116 } |
117 | 117 |
118 // static | 118 // static |
119 bool StructTraits<test::PassByValueStructWithTraits, | 119 bool StructTraits<test::MoveOnlyStructWithTraits, |
120 test::PassByValueStructWithTraitsImpl>:: | 120 test::MoveOnlyStructWithTraitsImpl>:: |
121 Read(test::PassByValueStructWithTraits::DataView data, | 121 Read(test::MoveOnlyStructWithTraits::DataView data, |
122 test::PassByValueStructWithTraitsImpl* out) { | 122 test::MoveOnlyStructWithTraitsImpl* out) { |
123 out->get_mutable_handle() = data.TakeFHandle(); | 123 out->get_mutable_handle() = data.TakeFHandle(); |
124 return true; | 124 return true; |
125 } | 125 } |
126 | 126 |
127 } // namespace mojo | 127 } // namespace mojo |
OLD | NEW |