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

Unified Diff: mojo/public/bindings/generators/module_struct.h

Issue 52973003: mojo: break struct headers into headers and source (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add constant for header size Created 7 years, 2 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/bindings/generators/module_struct.h
diff --git a/mojo/public/bindings/generators/module_struct.h b/mojo/public/bindings/generators/module_struct.h
new file mode 100644
index 0000000000000000000000000000000000000000..8768781243a683bf71a0d5d6e49c8b62a4180cdf
--- /dev/null
+++ b/mojo/public/bindings/generators/module_struct.h
@@ -0,0 +1,38 @@
+// Copyright $YEAR The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef $HEADER_GUARD
+#define $HEADER_GUARD
+
+#include "mojo/public/bindings/lib/bindings.h"
+
+namespace $NAMESPACE {
+$FORWARDS
+#pragma pack(push, 1)
+
+class $CLASS {
+ public:
+ static $CLASS* New(mojo::Buffer* buf);
+
+$SETTERS
+
+$GETTERS
+
+ private:
+ friend class mojo::internal::ObjectTraits<$CLASS>;
+
+ $CLASS();
+ ~$CLASS(); // NOT IMPLEMENTED
+
+ mojo::internal::StructHeader _header_;
+$FIELDS
+};
+
+MOJO_COMPILE_ASSERT(sizeof($CLASS) == $SIZE, bad_sizeof_$CLASS);
+
+#pragma pack(pop)
+
+} // namespace $NAMESPACE
+
+#endif // $HEADER_GUARD
« no previous file with comments | « mojo/public/bindings/generators/module_interface.h ('k') | mojo/public/bindings/generators/module_struct.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698