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

Unified Diff: tools/dom/scripts/generator.py

Issue 2242203002: record that Gamepad.buttons creates GamepadButtons (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add test 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
« no previous file with comments | « tools/dom/scripts/dartmetadata.py ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/generator.py
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index 9e15a96b391ed71d65fdb57fe913a9cfa810402c..8c5b4169c1f342ac103df79c9d27f3a1b989b9f5 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -1136,6 +1136,9 @@ class InterfaceIDLTypeInfo(IDLTypeInfo):
def list_item_type(self):
return self._data.item_type
+ def list_item_type_nullable(self):
+ return self._data.item_type_nullable
+
def merged_interface(self):
# All constants, attributes, and operations of merged interface should be
# added to this interface. Merged idl interface does not have corresponding
@@ -1390,7 +1393,8 @@ class TypeData(object):
conversion_includes=None,
webcore_getter_name='getAttribute',
webcore_setter_name='setAttribute',
- item_type=None, suppress_interface=False):
+ item_type=None, item_type_nullable=False,
+ suppress_interface=False):
self.clazz = clazz
self.dart_type = dart_type
self.native_type = native_type
@@ -1402,6 +1406,7 @@ class TypeData(object):
self.webcore_getter_name = webcore_getter_name
self.webcore_setter_name = webcore_setter_name
self.item_type = item_type
+ self.item_type_nullable = item_type_nullable
self.suppress_interface = suppress_interface
@@ -1488,7 +1493,7 @@ _idl_type_registry = monitored.Dict('generator._idl_type_registry', {
dart_type='List<File>'),
'Future': TypeData(clazz='Interface', dart_type='Future'),
'GamepadList': TypeData(clazz='Interface', item_type='Gamepad',
- suppress_interface=True),
+ item_type_nullable=True, suppress_interface=True),
'GLenum': TypeData(clazz='Primitive', dart_type='int',
native_type='unsigned'),
'GLboolean': TypeData(clazz='Primitive', dart_type='bool',
« no previous file with comments | « tools/dom/scripts/dartmetadata.py ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698