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

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

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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
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 import re 9 import re
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return self._AddStructComputedData(False, struct) 136 return self._AddStructComputedData(False, struct)
137 137
138 def _GetResponseStructFromMethod(self, method): 138 def _GetResponseStructFromMethod(self, method):
139 """Converts a method's response_parameters into the fields of a struct.""" 139 """Converts a method's response_parameters into the fields of a struct."""
140 params_class = "%s_%s_ResponseParams" % (method.interface.name, method.name) 140 params_class = "%s_%s_ResponseParams" % (method.interface.name, method.name)
141 struct = mojom.Struct(params_class, module=method.interface.module) 141 struct = mojom.Struct(params_class, module=method.interface.module)
142 for param in method.response_parameters: 142 for param in method.response_parameters:
143 struct.AddField(param.name, param.kind, param.ordinal, 143 struct.AddField(param.name, param.kind, param.ordinal,
144 attributes=param.attributes) 144 attributes=param.attributes)
145 return self._AddStructComputedData(False, struct) 145 return self._AddStructComputedData(False, struct)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698