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

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

Issue 622593002: mojo: Allow circular dependencies between structs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/bindings_internal.h
diff --git a/mojo/public/cpp/bindings/lib/bindings_internal.h b/mojo/public/cpp/bindings/lib/bindings_internal.h
index f12be10ab62a16923d0d0d216c84deb08d1edbe2..95a318eb09952cf089be2772788f468f45a53d8a 100644
--- a/mojo/public/cpp/bindings/lib/bindings_internal.h
+++ b/mojo/public/cpp/bindings/lib/bindings_internal.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_
#include "mojo/public/cpp/bindings/lib/template_util.h"
+#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/system/core.h"
namespace mojo {
@@ -76,8 +77,17 @@ template <typename T> struct WrapperTraits<T, false> {
template <typename H> struct WrapperTraits<ScopedHandleBase<H>, true> {
typedef H DataType;
};
+template <typename S> struct WrapperTraits<StructPtr<S>, true> {
+ typedef typename S::Data_* DataType;
+ typedef typename S::Data_ PlainDataType;
viettrungluu 2014/10/01 17:18:23 I'm not a huge fan of the name "PlainDataType", bu
qsr 2014/10/06 08:20:26 Unfortunately, I don't have anything that really f
+};
+template <typename S> struct WrapperTraits<InlinedStructPtr<S>, true> {
+ typedef typename S::Data_* DataType;
+ typedef typename S::Data_ PlainDataType;
+};
template <typename S> struct WrapperTraits<S, true> {
typedef typename S::Data_* DataType;
+ typedef typename S::Data_ PlainDataType;
};
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698