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

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

Issue 2007813004: Mojo C++ bindings: support attaching context object for StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_traits.h
diff --git a/mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h b/mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h
index 6b3acf69b4c385648037a95d7ffee51c13bae944..8f9e78ec032413024c252d0f7880f69a23b05d74 100644
--- a/mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h
+++ b/mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h
@@ -20,11 +20,15 @@ namespace mojo {
template <>
struct StructTraits<test::NestedStructWithTraits,
test::NestedStructWithTraitsImpl> {
+ static void* SetUpContext(const test::NestedStructWithTraitsImpl& input);
+ static void TearDownContext(const test::NestedStructWithTraitsImpl& input,
+ void* context);
+
+ static int32_t value(const test::NestedStructWithTraitsImpl& input,
+ void* context);
+
static bool Read(test::NestedStructWithTraitsDataView data,
test::NestedStructWithTraitsImpl* output);
- static int32_t value(const test::NestedStructWithTraitsImpl& input) {
- return input.value;
- }
};
template <>
« no previous file with comments | « mojo/public/cpp/bindings/struct_traits.h ('k') | mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698