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

Side by Side Diff: tools/dom/scripts/generator.py

Issue 11881027: Use proper default values for flags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for systems to generate 6 """This module provides shared functionality for systems to generate
7 Dart APIs from the IDL database.""" 7 Dart APIs from the IDL database."""
8 8
9 import copy 9 import copy
10 import re 10 import re
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 conversion_cast = conversion_cast % (self.native_type(), value) 1061 conversion_cast = conversion_cast % (self.native_type(), value)
1062 return 'Dart%s::toDart(%s)' % (self._idl_type, conversion_cast) 1062 return 'Dart%s::toDart(%s)' % (self._idl_type, conversion_cast)
1063 1063
1064 def argument_expression(self, name, interface_name): 1064 def argument_expression(self, name, interface_name):
1065 return name if interface_name.endswith('List') else '%s->propertyReference() ' % name 1065 return name if interface_name.endswith('List') else '%s->propertyReference() ' % name
1066 1066
1067 1067
1068 class TypeData(object): 1068 class TypeData(object):
1069 def __init__(self, clazz, dart_type=None, native_type=None, 1069 def __init__(self, clazz, dart_type=None, native_type=None,
1070 merged_interface=None, merged_into=None, 1070 merged_interface=None, merged_into=None,
1071 custom_to_dart=None, custom_to_native=None, 1071 custom_to_dart=False, custom_to_native=False,
1072 conversion_includes=None, 1072 conversion_includes=None,
1073 webcore_getter_name='getAttribute', 1073 webcore_getter_name='getAttribute',
1074 webcore_setter_name='setAttribute', 1074 webcore_setter_name='setAttribute',
1075 item_type=None, suppress_interface=False, is_typed_array=False): 1075 item_type=None, suppress_interface=False, is_typed_array=False):
1076 self.clazz = clazz 1076 self.clazz = clazz
1077 self.dart_type = dart_type 1077 self.dart_type = dart_type
1078 self.native_type = native_type 1078 self.native_type = native_type
1079 self.merged_interface = merged_interface 1079 self.merged_interface = merged_interface
1080 self.merged_into = merged_into 1080 self.merged_into = merged_into
1081 self.custom_to_dart = custom_to_dart 1081 self.custom_to_dart = custom_to_dart
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 self) 1284 self)
1285 1285
1286 if type_data.clazz == 'SVGTearOff': 1286 if type_data.clazz == 'SVGTearOff':
1287 dart_interface_name = self._renamer.RenameInterface( 1287 dart_interface_name = self._renamer.RenameInterface(
1288 self._database.GetInterface(type_name)) 1288 self._database.GetInterface(type_name))
1289 return SVGTearOffIDLTypeInfo( 1289 return SVGTearOffIDLTypeInfo(
1290 type_name, type_data, dart_interface_name, self) 1290 type_name, type_data, dart_interface_name, self)
1291 1291
1292 class_name = '%sIDLTypeInfo' % type_data.clazz 1292 class_name = '%sIDLTypeInfo' % type_data.clazz
1293 return globals()[class_name](type_name, type_data) 1293 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698