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

Side by Side Diff: trunk/src/mojo/public/tools/bindings/pylib/mojom/generate/generator.py

Issue 354833003: Revert 279677 "Generate java bindings for structs." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Code shared by the various language-specific code generators.""" 5 """Code shared by the various language-specific code generators."""
6 6
7 from functools import partial 7 from functools import partial
8 import os.path 8 import os.path
9 9
10 import module as mojom 10 import module as mojom
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 def Write(self, contents, filename): 91 def Write(self, contents, filename):
92 if self.output_dir is None: 92 if self.output_dir is None:
93 print contents 93 print contents
94 return 94 return
95 with open(os.path.join(self.output_dir, filename), "w+") as f: 95 with open(os.path.join(self.output_dir, filename), "w+") as f:
96 f.write(contents) 96 f.write(contents)
97 97
98 def GenerateFiles(self, args): 98 def GenerateFiles(self, args):
99 raise NotImplementedError("Subclasses must override/implement this method") 99 raise NotImplementedError("Subclasses must override/implement this method")
100
101 def GetJinjaParameters(self):
102 """Returns default constructor parameters for the jinja environment."""
103 return {}
104
105 def GetGlobals(self):
106 """Returns global mappings for the template generation."""
107 return {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698