Chromium Code Reviews| Index: mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl |
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl |
| index 9306d2f816d01b260f5203732f517b3d5b06f799..b93507c2774273a5d2b951d4b99dd0aac4c44f5b 100644 |
| --- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl |
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl |
| @@ -86,6 +86,33 @@ namespace {{variant}} { |
| #include "{{export_header}}" |
| {%- endif %} |
| +{#--- WTF enum hashing #} |
| +{%- from "enum_macros.tmpl" import enum_hash_blink%} |
| +{%- if for_blink %} |
| +{#- Top-level #} |
| +{%- for enum in enums %} |
|
yzshen1
2017/02/28 18:48:34
you could use "all_enums" for all enums at top lev
tibell
2017/03/01 23:08:39
Done.
|
| +{%- if not enum|is_native_only_kind %} |
| +{{enum_hash_blink(enum)}} |
| +{%- endif %} |
| +{%- endfor %} |
| +{#- Inside structs #} |
| +{%- for struct in structs %} |
| +{%- for enum in struct.enums %} |
| +{%- if not enum|is_native_only_kind %} |
| +{{enum_hash_blink(enum)}} |
| +{%- endif %} |
| +{%- endfor %} |
| +{%- endfor %} |
| +{#- Inside interfaces #} |
| +{%- for iface in interfaces %} |
| +{%- for enum in iface.enums %} |
| +{%- if not enum|is_native_only_kind %} |
| +{{enum_hash_blink(enum)}} |
| +{%- endif %} |
| +{%- endfor %} |
| +{%- endfor %} |
| +{%- endif %} |
| + |
| {{namespace_begin()}} |
| {#--- Enums #} |