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

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/v8_interface.py

Issue 2611823003: ABANDONED CL: Changes to compile and pass tests after Big Blink Rename (excluding functions). (Closed)
Patch Set: Inducing merge conflicts to force human review and changes after rename. Created 3 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
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # coding=utf-8 2 # coding=utf-8
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 set_wrapper_reference_to['idl_type'].add_includes_for_type() 236 set_wrapper_reference_to['idl_type'].add_includes_for_type()
237 237
238 # [Custom=VisitDOMWrapper] 238 # [Custom=VisitDOMWrapper]
239 has_visit_dom_wrapper_custom = ( 239 has_visit_dom_wrapper_custom = (
240 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper')) 240 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper'))
241 241
242 has_visit_dom_wrapper = (has_visit_dom_wrapper_custom or 242 has_visit_dom_wrapper = (has_visit_dom_wrapper_custom or
243 set_wrapper_reference_from or set_wrapper_reference_to) 243 set_wrapper_reference_from or set_wrapper_reference_to)
244 244
245 wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Nod e') else 'ObjectClassId') 245 wrapper_class_id = ('kNodeClassId' if inherits_interface(interface.name, 'No de') else 'kObjectClassId')
246 246
247 # [ActiveScriptWrappable] must be accompanied with [DependentLifetime]. 247 # [ActiveScriptWrappable] must be accompanied with [DependentLifetime].
248 if active_scriptwrappable and not is_dependent_lifetime: 248 if active_scriptwrappable and not is_dependent_lifetime:
249 raise Exception('[ActiveScriptWrappable] interface must also specify ' 249 raise Exception('[ActiveScriptWrappable] interface must also specify '
250 '[DependentLifetime]: %s' % interface.name) 250 '[DependentLifetime]: %s' % interface.name)
251 251
252 v8_class_name = v8_utilities.v8_class_name(interface) 252 v8_class_name = v8_utilities.v8_class_name(interface)
253 cpp_class_name = cpp_name(interface) 253 cpp_class_name = cpp_name(interface)
254 cpp_class_name_or_partial = cpp_name_or_partial(interface) 254 cpp_class_name_or_partial = cpp_name_or_partial(interface)
255 v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface) 255 v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface)
256 256
257 context = { 257 context = {
258 'cpp_class': cpp_class_name, 258 'cpp_class': cpp_class_name,
259 'cpp_class_or_partial': cpp_class_name_or_partial, 259 'cpp_class_or_partial': cpp_class_name_or_partial,
260 'event_target_inheritance': 'InheritFromEventTarget' if is_event_target else 'NotInheritFromEventTarget', 260 'event_target_inheritance': 'kInheritFromEventTarget' if is_event_target else 'kNotInheritFromEventTarget',
261 'is_gc_type': True, 261 'is_gc_type': True,
262 # FIXME: Remove 'EventTarget' special handling, http://crbug.com/383699 262 # FIXME: Remove 'EventTarget' special handling, http://crbug.com/383699
263 'has_access_check_callbacks': (is_check_security and 263 'has_access_check_callbacks': (is_check_security and
264 interface.name != 'EventTarget'), 264 interface.name != 'EventTarget'),
265 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] 265 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction]
266 'has_partial_interface': len(interface.partial_interfaces) > 0, 266 'has_partial_interface': len(interface.partial_interfaces) > 0,
267 'has_visit_dom_wrapper': has_visit_dom_wrapper, 267 'has_visit_dom_wrapper': has_visit_dom_wrapper,
268 'has_visit_dom_wrapper_custom': has_visit_dom_wrapper_custom, 268 'has_visit_dom_wrapper_custom': has_visit_dom_wrapper_custom,
269 'header_includes': header_includes, 269 'header_includes': header_includes,
270 'interface_name': interface.name, 270 'interface_name': interface.name,
271 'is_array_buffer_or_view': is_array_buffer_or_view, 271 'is_array_buffer_or_view': is_array_buffer_or_view,
272 'is_check_security': is_check_security, 272 'is_check_security': is_check_security,
273 'is_event_target': is_event_target, 273 'is_event_target': is_event_target,
274 'is_exception': interface.is_exception, 274 'is_exception': interface.is_exception,
275 'is_global': is_global, 275 'is_global': is_global,
276 'is_immutable_prototype': is_immutable_prototype, 276 'is_immutable_prototype': is_immutable_prototype,
277 'is_node': inherits_interface(interface.name, 'Node'), 277 'is_node': inherits_interface(interface.name, 'Node'),
278 'is_partial': interface.is_partial, 278 'is_partial': interface.is_partial,
279 'is_typed_array_type': is_typed_array_type, 279 'is_typed_array_type': is_typed_array_type,
280 'lifetime': 'Dependent' if (has_visit_dom_wrapper or is_dependent_lifeti me) else 'Independent', 280 'lifetime': 'kDependent' if (has_visit_dom_wrapper or is_dependent_lifet ime) else 'kIndependent',
281 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs] 281 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs]
282 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_funct ion_name(interface), 282 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_funct ion_name(interface),
283 'parent_interface': parent_interface, 283 'parent_interface': parent_interface,
284 'pass_cpp_type': cpp_name(interface) + '*', 284 'pass_cpp_type': cpp_name(interface) + '*',
285 'active_scriptwrappable': active_scriptwrappable, 285 'active_scriptwrappable': active_scriptwrappable,
286 'runtime_enabled_feature_name': runtime_enabled_feature_name(interface), # [RuntimeEnabled] 286 'runtime_enabled_feature_name': runtime_enabled_feature_name(interface), # [RuntimeEnabled]
287 'set_wrapper_reference_from': set_wrapper_reference_from, 287 'set_wrapper_reference_from': set_wrapper_reference_from,
288 'set_wrapper_reference_to': set_wrapper_reference_to, 288 'set_wrapper_reference_to': set_wrapper_reference_to,
289 'v8_class': v8_class_name, 289 'v8_class': v8_class_name,
290 'v8_class_or_partial': v8_class_name_or_partial, 290 'v8_class_or_partial': v8_class_name_or_partial,
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 extended_attributes = deleter.extended_attributes 1496 extended_attributes = deleter.extended_attributes
1497 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') 1497 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState')
1498 is_ce_reactions = 'CEReactions' in extended_attributes 1498 is_ce_reactions = 'CEReactions' in extended_attributes
1499 return { 1499 return {
1500 'is_call_with_script_state': is_call_with_script_state, 1500 'is_call_with_script_state': is_call_with_script_state,
1501 'is_ce_reactions': is_ce_reactions, 1501 'is_ce_reactions': is_ce_reactions,
1502 'is_custom': 'Custom' in extended_attributes, 1502 'is_custom': 'Custom' in extended_attributes,
1503 'is_raises_exception': 'RaisesException' in extended_attributes, 1503 'is_raises_exception': 'RaisesException' in extended_attributes,
1504 'name': cpp_name(deleter), 1504 'name': cpp_name(deleter),
1505 } 1505 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/v8_attributes.py ('k') | third_party/WebKit/Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698