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

Unified Diff: mojo/public/tools/bindings/generators/mojom_python_generator.py

Issue 796373006: Content handler for python. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/generators/mojom_python_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_python_generator.py b/mojo/public/tools/bindings/generators/mojom_python_generator.py
index 33bfdd5743b480029ef3ef778a607d1c825716b6..9c1a5208e8c81296515f68f9a1da5a921a76ef2f 100644
--- a/mojo/public/tools/bindings/generators/mojom_python_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_python_generator.py
@@ -311,6 +311,12 @@ class Generator(generator.Generator):
each['python_module'] = MojomToPythonImport(each['module_name'])
return self.module.imports
+ def GetGlobals(self):
qsr 2015/01/15 20:47:33 Do you need Globas? Can you put this in GeneratePy
etiennej 2015/01/15 20:48:45 I used GetGlobals to do the same as in mojom_java_
etiennej 2015/01/16 00:38:44 Done.
+ """Returns a dictionnary of global variables."""
+ return {
+ "namespace": self.module.namespace
+ }
+
def GetQualifiedInterfaces(self):
"""
Returns the list of interfaces of the module. Each interface that has a
« no previous file with comments | « mojo/public/python/src/common.cc ('k') | mojo/public/tools/bindings/generators/python_templates/module.py.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698