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

Unified Diff: mojo/public/cpp/bindings/tests/struct_with_traits_impl.h

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/cpp/bindings/tests/struct_with_traits_impl.h
diff --git a/mojo/public/cpp/bindings/tests/struct_with_traits_impl.h b/mojo/public/cpp/bindings/tests/struct_with_traits_impl.h
index b62ba562090a3b4d580915a389ec76e0ab663c4f..4d5160630f7b4e4c5f9bc024462ff5a62fc3ddad 100644
--- a/mojo/public/cpp/bindings/tests/struct_with_traits_impl.h
+++ b/mojo/public/cpp/bindings/tests/struct_with_traits_impl.h
@@ -91,19 +91,25 @@ class StructWithTraitsImpl {
std::map<std::string, NestedStructWithTraitsImpl> struct_map_;
};
-// A type which knows how to look like a mojo::test::PassByValueStructWithTraits
+// A type which knows how to look like a mojo::test::TrivialStructWithTraits
// mojom type by way of mojo::StructTraits.
-class PassByValueStructWithTraitsImpl {
+struct TrivialStructWithTraitsImpl {
+ int32_t value;
+};
+
+// A type which knows how to look like a mojo::test::MoveOnlyStructWithTraits
+// mojom type by way of mojo::StructTraits.
+class MoveOnlyStructWithTraitsImpl {
public:
- PassByValueStructWithTraitsImpl();
- PassByValueStructWithTraitsImpl(PassByValueStructWithTraitsImpl&& other);
- ~PassByValueStructWithTraitsImpl();
+ MoveOnlyStructWithTraitsImpl();
+ MoveOnlyStructWithTraitsImpl(MoveOnlyStructWithTraitsImpl&& other);
+ ~MoveOnlyStructWithTraitsImpl();
ScopedHandle& get_mutable_handle() { return handle_; }
private:
ScopedHandle handle_;
- DISALLOW_COPY_AND_ASSIGN(PassByValueStructWithTraitsImpl);
+ DISALLOW_COPY_AND_ASSIGN(MoveOnlyStructWithTraitsImpl);
};
} // namespace test
« no previous file with comments | « mojo/public/cpp/bindings/tests/struct_with_traits.typemap ('k') | mojo/public/cpp/bindings/tests/struct_with_traits_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698