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

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

Issue 1753013002: Mojom runtime type info: New implementation for Dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: No changes to sha1s Created 4 years, 10 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/public/tools/bindings/generators/mojom_dart_generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/pylib/mojom/generate/module.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/module.py b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
index 780b3a80e4256020294ff7763b066a9e51297607..089ba8dee416d2bd3ad311d6bd5dabdb1aff183f 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/module.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
@@ -463,45 +463,10 @@ class Module(object):
self.unions.append(union)
return union
-def GetMojomTypeName(kind):
- """Get the mojom type's name from its kind."""
- # Note: InterfaceRequest's should use the Interface inside them.
- if IsInterfaceRequestKind(kind):
- return kind.kind.name
- elif hasattr(kind, 'name'):
- return kind.name
- else:
- # These kinds (e.g., simple kinds, maps, and arrays) lack names.
- raise Exception('Unexpected kind: %s' % kind)
-
def GetPackageName(kind):
"""Get the package name from the given kind's module."""
return kind.module.name.split('.')[0]
-# TODO(rudominer) Remove this once the switch to the new runtime type
-# discovery mechanism is complete.
-def GetMojomTypeIdentifier(kind):
- """Get the mojom type's unique identifier from the kind's package and name."""
- # Note: InterfaceRequest's should use the Interface inside them.
- if hasattr(kind, 'module'):
- package = GetPackageName(kind)
- elif IsInterfaceRequestKind(kind):
- package = GetPackageName(kind.kind)
- else:
- # These kinds (e.g., simple kinds and fields) lack identifiers.
- raise Exception('Unexpected kind: %s' % kind)
- return "%s_%s__" % (package, GetMojomTypeName(kind))
-
-
-# Returns a string of the form package.path.TypeName - the full identifier
-# for an element.
-# TODO(rudominer) Remove this once the switch to the new runtime type
-# discovery mechanism is complete.
-def GetMojomTypeFullIdentifier(kind, exported=True):
- """Get the Full Identifier for a Mojom Type. Format: package.path.TypeName"""
- return '%s.%s' % (kind.module.namespace, GetMojomTypeName(kind))
-
-
def IsBoolKind(kind):
return kind.spec == BOOL.spec
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_dart_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698