| OLD | NEW |
| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name
, method, this_cpp_value, for_main_world=True), | 244 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name
, method, this_cpp_value, for_main_world=True), |
| 245 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind
ex), | 245 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind
ex), |
| 246 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc
_type), | 246 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc
_type), |
| 247 } | 247 } |
| 248 | 248 |
| 249 | 249 |
| 250 def argument_declarations_for_private_script(interface, method): | 250 def argument_declarations_for_private_script(interface, method): |
| 251 argument_declarations = ['LocalFrame* frame'] | 251 argument_declarations = ['LocalFrame* frame'] |
| 252 argument_declarations.append('%s* holderImpl' % interface.name) | 252 argument_declarations.append('%s* holderImpl' % interface.name) |
| 253 argument_declarations.extend(['%s %s' % (argument.idl_type.cpp_type_args( | 253 argument_declarations.extend(['%s %s' % (argument.idl_type.cpp_type_args( |
| 254 used_as_argument=True), argument.name) for argument in method.arguments]
) | 254 used_as_rvalue_type=True), argument.name) for argument in method.argumen
ts]) |
| 255 if method.idl_type.name != 'void': | 255 if method.idl_type.name != 'void': |
| 256 argument_declarations.append('%s* %s' % (method.idl_type.cpp_type, 'resu
lt')) | 256 argument_declarations.append('%s* %s' % (method.idl_type.cpp_type, 'resu
lt')) |
| 257 return argument_declarations | 257 return argument_declarations |
| 258 | 258 |
| 259 | 259 |
| 260 ################################################################################ | 260 ################################################################################ |
| 261 # Value handling | 261 # Value handling |
| 262 ################################################################################ | 262 ################################################################################ |
| 263 | 263 |
| 264 def cpp_value(interface, method, number_of_arguments): | 264 def cpp_value(interface, method, number_of_arguments): |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 | 393 |
| 394 | 394 |
| 395 def argument_default_cpp_value(argument): | 395 def argument_default_cpp_value(argument): |
| 396 if not argument.default_value: | 396 if not argument.default_value: |
| 397 return None | 397 return None |
| 398 return argument.idl_type.literal_cpp_value(argument.default_value) | 398 return argument.idl_type.literal_cpp_value(argument.default_value) |
| 399 | 399 |
| 400 IdlType.union_arguments = property(lambda self: None) | 400 IdlType.union_arguments = property(lambda self: None) |
| 401 IdlUnionType.union_arguments = property(union_arguments) | 401 IdlUnionType.union_arguments = property(union_arguments) |
| 402 IdlArgument.default_cpp_value = property(argument_default_cpp_value) | 402 IdlArgument.default_cpp_value = property(argument_default_cpp_value) |
| OLD | NEW |