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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py

Issue 1454113003: Require an explicit ServiceName annotation for interfaces in C++. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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/pylib/mojom/generate/mojom_translator.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py b/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py
index 52ccf926d4a944075bdda475acd72988137b9729..a31189fd9c4131945599a32e1e2b8b1b647657e7 100755
--- a/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py
@@ -374,6 +374,9 @@ class FileTranslator(object):
== mojom_types_mojom.UserDefinedType.Tags.interface_type)
mojom_interface = mojom_type.interface_type
interface.attributes = self.AttributesFromMojom(mojom_interface)
+ interface.service_name = None
+ if interface.attributes:
+ interface.service_name = interface.attributes.get('ServiceName')
self.PopulateModuleOrImportedFrom(interface, mojom_interface)
interface.name = mojom_interface.interface_name
interface.methods = [self.MethodFromMojom(mojom_method, interface)
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom/generate/data.py ('k') | mojo/services/asset_bundle/interfaces/asset_bundle.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698