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

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

Issue 2014403002: Mojo C++ bindings: custom type mapping of map (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 if (!data.ReadFStringArray(&out->get_mutable_string_array())) 69 if (!data.ReadFStringArray(&out->get_mutable_string_array()))
70 return false; 70 return false;
71 71
72 if (!data.ReadFStruct(&out->get_mutable_struct())) 72 if (!data.ReadFStruct(&out->get_mutable_struct()))
73 return false; 73 return false;
74 74
75 if (!data.ReadFStructArray(&out->get_mutable_struct_array())) 75 if (!data.ReadFStructArray(&out->get_mutable_struct_array()))
76 return false; 76 return false;
77 77
78 if (!data.ReadFStructMap(&out->get_mutable_struct_map()))
79 return false;
80
78 return true; 81 return true;
79 } 82 }
80 83
81 // static 84 // static
82 bool StructTraits<test::PassByValueStructWithTraits, 85 bool StructTraits<test::PassByValueStructWithTraits,
83 test::PassByValueStructWithTraitsImpl>:: 86 test::PassByValueStructWithTraitsImpl>::
84 Read(test::PassByValueStructWithTraitsDataView data, 87 Read(test::PassByValueStructWithTraitsDataView data,
85 test::PassByValueStructWithTraitsImpl* out) { 88 test::PassByValueStructWithTraitsImpl* out) {
86 out->get_mutable_handle() = data.TakeFHandle(); 89 out->get_mutable_handle() = data.TakeFHandle();
87 return true; 90 return true;
88 } 91 }
89 92
90 } // namespace mojo 93 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698