mojo/public/tools/mojom/mojom/generate/generator.py
def _GetResponseStructFromMethod(method):
    """Converts a method's response_parameters into the fields of a struct."""
    params_class = "%s_%s_ResponseParams" % (method.interface.mojom_name,
                                             method.mojom_name)
    struct = mojom.Struct(params_class,
                          module=method.interface.module,
                          attributes={})
    for param in method.response_parameters:
      struct.AddField(
          param.mojom_name,
          param.kind,
          param.ordinal,
          attributes=param.attributes)
    _AddStructComputedData(False, struct)
    return struct
Converts a method's response_parameters into the fields of a struct.
Converts a method's response_parameters into the fields of a struct.
Converts a method ' s response_parameters into the fields of a struct .
def _GetResponseStructFromMethod(method):
    params_class = "%s_%s_ResponseParams" % (method.interface.mojom_name,
                                             method.mojom_name)
    struct = mojom.Struct(params_class,
                          module=method.interface.module,
                          attributes={})
    for param in method.response_parameters:
      struct.AddField(
          param.mojom_name,
          param.kind,
          param.ordinal,
          attributes=param.attributes)
    _AddStructComputedData(False, struct)
    return struct
def _GetResponseStructFromMethod ( method ) : params_class = "%s_%s_ResponseParams" % ( method . interface . mojom_name , method . mojom_name ) struct = mojom . Struct ( params_class , module = method . interface . module , attributes = { } ) for param in method . response_parameters : struct . AddField ( param . mojom_name , param . kind , param . ordinal , attributes = param . attributes ) _AddStructComputedData ( False , struct ) return struct
Converts a method's response_parameters into the fields of a struct.
Converts a method ' s response_parameters into the fields of a struct .
"""Converts a method's response_parameters into the fields of a struct."""
method