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

Unified Diff: mojo/public/cpp/bindings/lib/serialization.h

Issue 2259283003: Mojo C++ bindings: share DataView class between chromium and blink variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@92_change_traits_param
Patch Set: . Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/lib/serialization.h
diff --git a/mojo/public/cpp/bindings/lib/serialization.h b/mojo/public/cpp/bindings/lib/serialization.h
index e51d5f98b89ee1d435cc1769883e8778db2f1515..a570e2205bfed64562d70cbfd20eb82bf541680b 100644
--- a/mojo/public/cpp/bindings/lib/serialization.h
+++ b/mojo/public/cpp/bindings/lib/serialization.h
@@ -55,7 +55,7 @@ DataArrayType StructSerializeImpl(UserType* input) {
Buffer buffer;
buffer.Initialize(result_buffer, size);
- typename MojomType::Struct::Data_* data = nullptr;
+ typename MojomTypeTraits<MojomType>::Data* data = nullptr;
Serialize<MojomType>(*input, &buffer, &data, &context);
if (need_copy) {
@@ -70,7 +70,7 @@ template <typename MojomType, typename DataArrayType, typename UserType>
bool StructDeserializeImpl(const DataArrayType& input, UserType* output) {
static_assert(BelongsTo<MojomType, MojomTypeCategory::STRUCT>::value,
"Unexpected type.");
- using DataType = typename MojomType::Struct::Data_;
+ using DataType = typename MojomTypeTraits<MojomType>::Data;
if (input.is_null())
return false;
« no previous file with comments | « mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc ('k') | mojo/public/cpp/bindings/lib/string_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698