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

Unified Diff: mojo/public/tools/bindings/generators/dart_templates/module_definition.tmpl

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/dart_templates/module_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/dart_templates/module_definition.tmpl b/mojo/public/tools/bindings/generators/dart_templates/module_definition.tmpl
deleted file mode 100644
index 9601a62ac51e8a4d75b7614683c94f0c8d4d3cdf..0000000000000000000000000000000000000000
--- a/mojo/public/tools/bindings/generators/dart_templates/module_definition.tmpl
+++ /dev/null
@@ -1,60 +0,0 @@
-{#--- Constants #}
-{%- for constant in module.constants %}
-const {{constant.kind|dart_type}} {{constant|name}} = {{constant.resolved_value}};
-{%- endfor %}
-
-{#--- Enums #}
-{%- from "enum_definition.tmpl" import enum_def %}
-{%- for enum in enums %}
-{{ enum_def(enum, typepkg, package) }}
-{%- endfor %}
-
-{#--- Struct definitions #}
-{%- from "struct_definition.tmpl" import struct_def %}
-{% for struct in structs %}
-{{ struct_def(struct, typepkg, package) }}
-{%- endfor -%}
-
-{#--- Union definitions #}
-{%- from "union_definition.tmpl" import union_def %}
-{% for union in unions %}
-{{ union_def(union, typepkg, package) }}
-{%- endfor -%}
-
-{#--- Interface definitions #}
-{%- for interface in interfaces -%}
-{%- include "interface_definition.tmpl" %}
-{%- endfor %}
-
-{% if should_gen_mojom_types -%}
-{{typepkg}}RuntimeTypeInfo getRuntimeTypeInfo() => _runtimeTypeInfo ??
- _initRuntimeTypeInfo();
-
-Map<String, {{typepkg}}UserDefinedType> getAllMojomTypeDefinitions() {
- return getRuntimeTypeInfo().typeMap;
-}
-
-var _runtimeTypeInfo;
-{{typepkg}}RuntimeTypeInfo _initRuntimeTypeInfo() {
- // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of
- // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this
- // file. The string contains the base64 encoding of the gzip-compressed bytes.
- var serializedRuntimeTypeInfo = "{{module.serialized_runtime_type_info}}";
-
- // Deserialize RuntimeTypeInfo
- var bytes = BASE64.decode(serializedRuntimeTypeInfo);
- var unzippedBytes = new ZLibDecoder().convert(bytes);
- var bdata = new ByteData.view(unzippedBytes.buffer);
- var message = new bindings.Message(bdata, null, unzippedBytes.length, 0);
- _runtimeTypeInfo = {{typepkg}}RuntimeTypeInfo.deserialize(message);
-
-{%- for import in imports %}
- {{import.unique_name}}.getAllMojomTypeDefinitions()
- .forEach((String s, {{typepkg}}UserDefinedType udt) {
- _runtimeTypeInfo.typeMap[s] = udt;
- });
-{% endfor %}
- return _runtimeTypeInfo;
-}
-
-{%- endif %}

Powered by Google App Engine
This is Rietveld 408576698