Chromium Code Reviews| Index: lib/html/scripts/generator.py |
| diff --git a/lib/html/scripts/generator.py b/lib/html/scripts/generator.py |
| index 99f2190270186e02cc09daeacd17bd5e806cce4e..574430f93dafb3acef998bd3702a9e0d306f9f34 100644 |
| --- a/lib/html/scripts/generator.py |
| +++ b/lib/html/scripts/generator.py |
| @@ -615,6 +615,12 @@ class IDLTypeInfo(object): |
| def narrow_dart_type(self): |
| return self.dart_type() |
| + def interface_name(self): |
| + raise NotImplementedError() |
| + |
| + def implementation_name(self): |
| + raise NotImplementedError() |
| + |
| def native_type(self): |
| return self._data.native_type or self._idl_type |
| @@ -715,6 +721,15 @@ class InterfaceIDLTypeInfo(IDLTypeInfo): |
| return self.idl_type() |
| return ImplementationClassName(self._dart_interface_name) |
|
Anton Muhin
2012/10/05 15:15:31
why not implementation_name here?
And overall, it
podivilov
2012/10/05 16:02:51
Done.
Anton Muhin
2012/10/05 16:04:16
I do understand that, but presence of both is real
podivilov1
2012/10/05 17:31:43
Renamed
|
| + def interface_name(self): |
| + return self._dart_interface_name |
| + |
| + def implementation_name(self): |
| + # TODO(podivilov): introduce ListLikeIDLTypeInfo and remove this hack. |
| + if self._data.suppress_public_interface: |
| + return ImplementationClassName(self.idl_type()) |
| + return ImplementationClassName(self._dart_interface_name) |
| + |
| class CallbackIDLTypeInfo(IDLTypeInfo): |
| def __init__(self, idl_type, data): |
| @@ -729,6 +744,12 @@ class SequenceIDLTypeInfo(IDLTypeInfo): |
| def dart_type(self): |
| return 'List<%s>' % self._item_info.dart_type() |
| + def interface_name(self): |
| + return self.dart_type() |
| + |
| + def implementation_name(self): |
| + return self.dart_type() |
| + |
| def vector_to_dart_template_parameter(self): |
| raise Exception('sequences of sequences are not supported yet') |