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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/data.py

Issue 262633005: Adding attributes to module and struct in mojom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/tools/bindings/pylib/mojom/generate/data.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/data.py b/mojo/public/tools/bindings/pylib/mojom/generate/data.py
index ffbffde606d3fb2c6f80953bd213e1df0a06ddb1..f172d7d31cf76a730f080d6dfeee37e65ba9cb41 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/data.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/data.py
@@ -132,6 +132,7 @@ def StructToData(struct):
def StructFromData(module, data):
struct = mojom.Struct()
struct.name = data['name']
+ struct.attributes = data['attributes']
struct.spec = 'x:' + module.namespace + '.' + struct.name
module.kinds[struct.spec] = struct
struct.enums = map(lambda enum:
@@ -284,6 +285,7 @@ def ModuleFromData(data):
module.name = data['name']
module.namespace = data['namespace']
+ module.attributes = data['attributes']
# Imports must come first, because they add to module.kinds which is used
# by by the others.
module.imports = map(

Powered by Google App Engine
This is Rietveld 408576698