Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.cc

Issue 2146153002: Mojo typemap config: support "copyable_pass_by_value" attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@69_change_move_only
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698