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

Side by Side Diff: bindings/dart/scripts/dart_attributes.py

Issue 551053003: Roll IDL Dartium37 (r181477) (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Created 6 years, 3 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 | « bindings/README ('k') | bindings/dart/scripts/dart_interface.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return contents 153 return contents
154 if not has_custom_getter: 154 if not has_custom_getter:
155 generate_getter(interface, attribute, contents) 155 generate_getter(interface, attribute, contents)
156 # FIXME: We did not previously support the PutForwards attribute, so I am 156 # FIXME: We did not previously support the PutForwards attribute, so I am
157 # disabling it here for now to get things compiling. 157 # disabling it here for now to get things compiling.
158 # We may wish to revisit this. 158 # We may wish to revisit this.
159 # if ((not attribute.is_read_only or 'PutForwards' in extended_attributes)): 159 # if ((not attribute.is_read_only or 'PutForwards' in extended_attributes)):
160 if (not attribute.is_read_only): 160 if (not attribute.is_read_only):
161 generate_setter(interface, attribute, contents) 161 generate_setter(interface, attribute, contents)
162 162
163 native_entry_getter = \
164 DartUtilities.generate_native_entry(interface.name, contents,
165 attribute.name, 'Getter',
166 None, [], None)
167 native_entry_setter = \
168 DartUtilities.generate_native_entry(interface.name, contents,
169 attribute.name, 'Setter',
170 None, ["value"], None)
171 contents.update({
172 'native_entry_getter': native_entry_getter,
173 'native_entry_setter': native_entry_setter,
174 })
175
163 return contents 176 return contents
164 177
165 178
166 ################################################################################ 179 ################################################################################
167 # Getter 180 # Getter
168 ################################################################################ 181 ################################################################################
169 182
170 def generate_getter(interface, attribute, contents): 183 def generate_getter(interface, attribute, contents):
171 idl_type = attribute.idl_type 184 idl_type = attribute.idl_type
172 base_idl_type = idl_type.base_type 185 base_idl_type = idl_type.base_type
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 lambda self: DartUtilities.strip_suffix(self.base_type, 'Constructor')) 463 lambda self: DartUtilities.strip_suffix(self.base_type, 'Constructor'))
451 464
452 465
453 def is_constructor_attribute(attribute): 466 def is_constructor_attribute(attribute):
454 # FIXME: replace this with [ConstructorAttribute] extended attribute 467 # FIXME: replace this with [ConstructorAttribute] extended attribute
455 return attribute.idl_type.base_type.endswith('Constructor') 468 return attribute.idl_type.base_type.endswith('Constructor')
456 469
457 470
458 def generate_constructor_getter(interface, attribute, contents): 471 def generate_constructor_getter(interface, attribute, contents):
459 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['deprecate_as'] 472 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['deprecate_as']
OLDNEW
« no previous file with comments | « bindings/README ('k') | bindings/dart/scripts/dart_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698