Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl |
| diff --git a/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl b/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl |
| index 551d2cc1b6d9d37d2e5c19da37b776bc01b92c44..df3efe1a417b1ce697a46f2209552dee0babdfe3 100644 |
| --- a/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl |
| +++ b/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl |
| @@ -1,3 +1,22 @@ |
| -{% macro decl_methods(field) -%} |
| +{% from 'fields/field.tmpl' import encode, decode, return_type, argument_type %} |
| +{% macro decl_public_methods(field) -%} |
| // Getters and setters not generated |
| {%- endmacro %} |
| +{% macro decl_protected_methods(field) -%} |
| +{% if field.is_bit_field %} |
| +{{return_type(field)}} {{field.internal_getter_method_name}}() const { |
| + return {{decode(field, field.name)}}; |
| +} |
| +{% else %} |
| +const {{return_type(field)}} {{field.internal_getter_method_name}}() const { |
| + return {{decode(field, field.name)}}; |
| +} |
| +{{field.type_name}}& {{field.internal_mutable_method_name}}() { |
|
suzyh_UTC10 (ex-contributor)
2017/04/20 00:12:18
return_type?
nainar
2017/04/20 02:53:04
Done.
suzyh_UTC10 (ex-contributor)
2017/04/20 03:48:02
Ditto: return_type(field)?
nainar
2017/04/20 05:15:58
Done.
|
| + return {{decode(field, field.name)}}; |
| +} |
| +{% endif %} |
| +void {{field.internal_setter_method_name}}({{argument_type(field)}} v) { |
| + {{field.name}} = {{encode(field, "v")}}; |
| +} |
| +{%- endmacro %} |
| + |