| OLD | NEW |
| 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 Loading... |
| 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) |
| OLD | NEW |