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

Side by Side Diff: Source/bindings/scripts/v8_utilities.py

Issue 202203009: Rename |imp| => |impl| in bindings generation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: custom/v8 too Created 6 years, 9 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 | « Source/bindings/scripts/v8_types.py ('k') | Source/bindings/templates/attributes.cpp » ('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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 for enum_value in idl_type.enum_values]) 106 for enum_value in idl_type.enum_values])
107 IdlType.enum_validation_expression = property(enum_validation_expression) 107 IdlType.enum_validation_expression = property(enum_validation_expression)
108 108
109 109
110 def scoped_name(interface, definition, base_name): 110 def scoped_name(interface, definition, base_name):
111 implemented_by = definition.extended_attributes.get('ImplementedBy') 111 implemented_by = definition.extended_attributes.get('ImplementedBy')
112 if implemented_by: 112 if implemented_by:
113 return '%s::%s' % (implemented_by, base_name) 113 return '%s::%s' % (implemented_by, base_name)
114 if definition.is_static: 114 if definition.is_static:
115 return '%s::%s' % (cpp_name(interface), base_name) 115 return '%s::%s' % (cpp_name(interface), base_name)
116 return 'imp->%s' % base_name 116 return 'impl->%s' % base_name
117 117
118 118
119 def v8_class_name(interface): 119 def v8_class_name(interface):
120 return v8_types.v8_type(interface.name) 120 return v8_types.v8_type(interface.name)
121 121
122 122
123 ################################################################################ 123 ################################################################################
124 # Specific extended attributes 124 # Specific extended attributes
125 ################################################################################ 125 ################################################################################
126 126
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 The returned function checks if a method/attribute is enabled. 230 The returned function checks if a method/attribute is enabled.
231 Given extended attribute RuntimeEnabled=FeatureName, return: 231 Given extended attribute RuntimeEnabled=FeatureName, return:
232 RuntimeEnabledFeatures::{featureName}Enabled 232 RuntimeEnabledFeatures::{featureName}Enabled
233 """ 233 """
234 extended_attributes = definition_or_member.extended_attributes 234 extended_attributes = definition_or_member.extended_attributes
235 if 'RuntimeEnabled' not in extended_attributes: 235 if 'RuntimeEnabled' not in extended_attributes:
236 return None 236 return None
237 feature_name = extended_attributes['RuntimeEnabled'] 237 feature_name = extended_attributes['RuntimeEnabled']
238 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name) 238 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name)
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_types.py ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698