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

Side by Side Diff: mojo/public/tools/bindings/pylib/generate/mojom_data.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 import mojom 5 import mojom
6 import copy 6 import copy
7 7
8 # mojom_data provides a mechanism to turn mojom Modules to dictionaries and 8 # mojom_data provides a mechanism to turn mojom Modules to dictionaries and
9 # back again. This can be used to persist a mojom Module created progromatically 9 # back again. This can be used to persist a mojom Module created progromatically
10 # or to read a dictionary from code or a file. 10 # or to read a dictionary from code or a file.
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 def OrderedModuleFromData(data): 299 def OrderedModuleFromData(data):
300 module = ModuleFromData(data) 300 module = ModuleFromData(data)
301 next_interface_ordinal = 0 301 next_interface_ordinal = 0
302 for interface in module.interfaces: 302 for interface in module.interfaces:
303 next_ordinal = 0 303 next_ordinal = 0
304 for method in interface.methods: 304 for method in interface.methods:
305 if method.ordinal is None: 305 if method.ordinal is None:
306 method.ordinal = next_ordinal 306 method.ordinal = next_ordinal
307 next_ordinal = method.ordinal + 1 307 next_ordinal = method.ordinal + 1
308 return module 308 return module
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/pylib/generate/mojom.py ('k') | mojo/public/tools/bindings/pylib/generate/mojom_data_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698