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

Unified Diff: mojo/public/cpp/bindings/union_traits.h

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase 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/union_traits.h
diff --git a/mojo/public/cpp/bindings/union_traits.h b/mojo/public/cpp/bindings/union_traits.h
index 452bac03fa6d3df51065a4f4d9b465f35f2dfd45..292ee58f277a2de016da051dea5a80971712f7cf 100644
--- a/mojo/public/cpp/bindings/union_traits.h
+++ b/mojo/public/cpp/bindings/union_traits.h
@@ -8,7 +8,11 @@
namespace mojo {
// This must be specialized for any type |T| to be serialized/deserialized as
-// a mojom union of type |MojomType|.
+// a mojom union. |DataViewType| is the corresponding data view type of the
+// mojom union. For example, if the mojom union is example.Foo, |DataViewType|
+// will be example::FooDataView, which can also be referred to by
+// example::Foo::DataView (in chromium) and example::blink::Foo::DataView (in
+// blink).
//
// Similar to StructTraits, each specialization of UnionTraits implements the
// following methods:
@@ -22,12 +26,12 @@ namespace mojo {
// 5. A static GetTag() method indicating which field is the current active
// field for serialization:
//
-// static |MojomType|DataView::Tag GetTag(const T& input);
+// static DataViewType::Tag GetTag(const T& input);
//
// During serialization, only the field getter corresponding to this tag
// will be called.
//
-template <typename MojomType, typename T>
+template <typename DataViewType, typename T>
struct UnionTraits;
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698