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

Side by Side Diff: mojo/public/tools/bindings/generators/mojom_js_generator.py

Issue 226263002: Mojo: Move mojo/public/bindings to mojo/public/tools/bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 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 """Generates JavaScript source files from a mojom.Module.""" 5 """Generates JavaScript source files from a mojom.Module."""
6 6
7 from generate import mojom 7 from generate import mojom
8 from generate import mojom_pack 8 from generate import mojom_pack
9 from generate import mojom_generator 9 from generate import mojom_generator
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 self.Write(self.GenerateJsModule(), "%s.js" % self.module.name) 218 self.Write(self.GenerateJsModule(), "%s.js" % self.module.name)
219 219
220 def GetImports(self): 220 def GetImports(self):
221 # Since each import is assigned a variable in JS, they need to have unique 221 # Since each import is assigned a variable in JS, they need to have unique
222 # names. 222 # names.
223 counter = 1 223 counter = 1
224 for each in self.module.imports: 224 for each in self.module.imports:
225 each["unique_name"] = "import" + str(counter) 225 each["unique_name"] = "import" + str(counter)
226 counter += 1 226 counter += 1
227 return self.module.imports 227 return self.module.imports
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698