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

Unified Diff: mojo/public/bindings/pylib/generate/mojom_data.py

Issue 184813004: Create response_parameters as part of mojom (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix up mojom files Created 6 years, 10 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
« no previous file with comments | « mojo/public/bindings/pylib/generate/mojom.py ('k') | mojo/public/bindings/pylib/parse/mojo_lexer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/bindings/pylib/generate/mojom_data.py
diff --git a/mojo/public/bindings/pylib/generate/mojom_data.py b/mojo/public/bindings/pylib/generate/mojom_data.py
index 9a575a806f863f23f7075c9573f1c85fff214dea..1eb05ebe857a81c90dec5490dd993db9534af638 100644
--- a/mojo/public/bindings/pylib/generate/mojom_data.py
+++ b/mojo/public/bindings/pylib/generate/mojom_data.py
@@ -133,6 +133,9 @@ def MethodToData(method):
}
if method.ordinal != None:
data[istr(2, 'ordinal')] = method.ordinal
+ if method.response_parameters != None:
+ data[istr(3, 'response_parameters')] = map(
+ ParameterToData, method.response_parameters)
return data
def MethodFromData(kinds, data):
@@ -142,6 +145,10 @@ def MethodFromData(kinds, data):
method.default = data.get('default')
method.parameters = map(
lambda parameter: ParameterFromData(kinds, parameter), data['parameters'])
+ if data.has_key('response_parameters'):
+ method.response_parameters = map(
+ lambda parameter: ParameterFromData(kinds, parameter),
+ data['response_parameters'])
return method
def InterfaceToData(interface):
@@ -195,9 +202,10 @@ def ModuleFromData(data):
module.namespace = data['namespace']
# Imports must come first, because they add to module.kinds which is used
# by by the others.
- module.imports = map(
- lambda import_data: ImportFromData(module, import_data),
- data['imports'])
+ if data.has_key('imports'):
+ module.imports = map(
+ lambda import_data: ImportFromData(module, import_data),
+ data['imports'])
module.structs = map(
lambda struct: StructFromData(module, struct), data['structs'])
module.interfaces = map(
« no previous file with comments | « mojo/public/bindings/pylib/generate/mojom.py ('k') | mojo/public/bindings/pylib/parse/mojo_lexer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698