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

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

Issue 839633003: IDL: [NoImplHeader] should not add '#include "None"' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 # 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 if native_array_element_type: 432 if native_array_element_type:
433 includes_for_type.update(impl_includes_for_type( 433 includes_for_type.update(impl_includes_for_type(
434 native_array_element_type, interfaces_info)) 434 native_array_element_type, interfaces_info))
435 includes_for_type.add('wtf/Vector.h') 435 includes_for_type.add('wtf/Vector.h')
436 436
437 base_idl_type = idl_type.base_type 437 base_idl_type = idl_type.base_type
438 if idl_type.is_string_type: 438 if idl_type.is_string_type:
439 includes_for_type.add('wtf/text/WTFString.h') 439 includes_for_type.add('wtf/text/WTFString.h')
440 if base_idl_type in interfaces_info: 440 if base_idl_type in interfaces_info:
441 interface_info = interfaces_info[idl_type.base_type] 441 interface_info = interfaces_info[idl_type.base_type]
442 includes_for_type.add(interface_info['include_path']) 442 if interface_info['include_path']:
443 includes_for_type.add(interface_info['include_path'])
443 if base_idl_type in INCLUDES_FOR_TYPE: 444 if base_idl_type in INCLUDES_FOR_TYPE:
444 includes_for_type.update(INCLUDES_FOR_TYPE[base_idl_type]) 445 includes_for_type.update(INCLUDES_FOR_TYPE[base_idl_type])
445 if idl_type.is_typed_array: 446 if idl_type.is_typed_array:
446 return set(['core/dom/DOMTypedArray.h']) 447 return set(['core/dom/DOMTypedArray.h'])
447 return includes_for_type 448 return includes_for_type
448 449
449 450
450 def impl_includes_for_type_union(idl_type, interfaces_info): 451 def impl_includes_for_type_union(idl_type, interfaces_info):
451 includes_for_type = set() 452 includes_for_type = set()
452 for member_type in idl_type.member_types: 453 for member_type in idl_type.member_types:
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 number_of_nullable_member_types_union) 945 number_of_nullable_member_types_union)
945 946
946 947
947 def includes_nullable_type_union(idl_type): 948 def includes_nullable_type_union(idl_type):
948 # http://heycam.github.io/webidl/#dfn-includes-a-nullable-type 949 # http://heycam.github.io/webidl/#dfn-includes-a-nullable-type
949 return idl_type.number_of_nullable_member_types == 1 950 return idl_type.number_of_nullable_member_types == 1
950 951
951 IdlTypeBase.includes_nullable_type = False 952 IdlTypeBase.includes_nullable_type = False
952 IdlNullableType.includes_nullable_type = True 953 IdlNullableType.includes_nullable_type = True
953 IdlUnionType.includes_nullable_type = property(includes_nullable_type_union) 954 IdlUnionType.includes_nullable_type = property(includes_nullable_type_union)
OLDNEW
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.py ('k') | Source/bindings/tests/idls/core/TestInterface3.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698