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

Unified Diff: mojo/public/interfaces/bindings/tests/struct_with_traits.mojom

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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/interfaces/bindings/tests/struct_with_traits.mojom
diff --git a/mojo/public/interfaces/bindings/tests/struct_with_traits.mojom b/mojo/public/interfaces/bindings/tests/struct_with_traits.mojom
index b1b7437e89c52767fb1884c7026a2a5f3483fe2e..d395a73b015445df8ba17ecd19a66a476d2ffb2b 100644
--- a/mojo/public/interfaces/bindings/tests/struct_with_traits.mojom
+++ b/mojo/public/interfaces/bindings/tests/struct_with_traits.mojom
@@ -33,14 +33,20 @@ struct StructWithTraitsContainer {
StructWithTraits f_struct;
};
-struct PassByValueStructWithTraits {
+// Maps to a pass-by-value trivial struct.
+struct TrivialStructWithTraits {
+ int32 value;
+};
+
+// Maps to a move-only struct.
+struct MoveOnlyStructWithTraits {
handle f_handle;
};
-// The custom type for PassByValueStructWithTraits is not clonable. Test that
+// The custom type for MoveOnlyStructWithTraits is not clonable. Test that
// this container can compile as long as Clone() is not used.
-struct PassByValueStructWithTraitsContainer {
- PassByValueStructWithTraits f_struct;
+struct MoveOnlyStructWithTraitsContainer {
+ MoveOnlyStructWithTraits f_struct;
};
struct StructWithTraitsForUniquePtrTest {
@@ -50,8 +56,11 @@ struct StructWithTraitsForUniquePtrTest {
interface TraitsTestService {
EchoStructWithTraits(StructWithTraits s) => (StructWithTraits passed);
- EchoPassByValueStructWithTraits(PassByValueStructWithTraits s) =>
- (PassByValueStructWithTraits passed);
+ EchoTrivialStructWithTraits(TrivialStructWithTraits s) =>
+ (TrivialStructWithTraits passed);
+
+ EchoMoveOnlyStructWithTraits(MoveOnlyStructWithTraits s) =>
+ (MoveOnlyStructWithTraits passed);
EchoEnumWithTraits(EnumWithTraits e) => (EnumWithTraits passed);
« no previous file with comments | « mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.cc ('k') | mojo/public/tools/bindings/generate_type_mappings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698