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

Unified Diff: mojo/dart/embedder/tools/dart_embedder_url_mappings.py

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge with master Created 4 years, 11 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
« no previous file with comments | « mojo/dart/embedder/embedder.gni ('k') | mojo/dart/embedder/tools/dart_list_generated_bindings.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/embedder/tools/dart_embedder_url_mappings.py
diff --git a/mojo/dart/embedder/tools/dart_embedder_url_mappings.py b/mojo/dart/embedder/tools/dart_embedder_url_mappings.py
index 1f351588da83a2f0d70c895be6b1d217d90ca25d..52d298ec4f6c674f79cc51b7718c40cba2b85217 100755
--- a/mojo/dart/embedder/tools/dart_embedder_url_mappings.py
+++ b/mojo/dart/embedder/tools/dart_embedder_url_mappings.py
@@ -24,6 +24,13 @@ def scan(package_root, directory, mapped_to):
filenames = [f for f in filenames if f.endswith('.mojom')]
for f in filenames:
path = os.path.join(mapped_to, f)
+
+ # Note: This is incorrect for the files in the mojo.bindings.types
+ # module. We rectify the embedder url mapping by adding bindings/types.
+ if f.endswith('service_describer.mojom') or \
+ f.endswith('mojom_files.mojom') or f.endswith('mojom_types.mojom'):
+ path = os.path.join(mapped_to, 'bindings/types', f)
+
# Append .dart.
path += '.dart'
print('--url_mapping=dart:_' + path + ',' +
« no previous file with comments | « mojo/dart/embedder/embedder.gni ('k') | mojo/dart/embedder/tools/dart_list_generated_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698