| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 Design doc: http://www.chromium.org/developers/design-documents/idl-compiler | 33 Design doc: http://www.chromium.org/developers/design-documents/idl-compiler |
| 34 """ | 34 """ |
| 35 | 35 |
| 36 from idl_types import IdlType, IdlTypeBase | 36 from idl_types import IdlType, IdlTypeBase |
| 37 import dart_types | 37 import dart_types |
| 38 from dart_utilities import DartUtilities | 38 from dart_utilities import DartUtilities |
| 39 from v8_globals import includes | 39 from v8_globals import includes |
| 40 | 40 |
| 41 CALLBACK_INTERFACE_H_INCLUDES = frozenset([ | 41 CALLBACK_INTERFACE_H_INCLUDES = frozenset([ |
| 42 'bindings2/dart_callback.h', | 42 'bindings/dart_callback.h', |
| 43 ]) | 43 ]) |
| 44 | 44 |
| 45 CALLBACK_INTERFACE_CPP_INCLUDES = frozenset([ | 45 CALLBACK_INTERFACE_CPP_INCLUDES = frozenset([ |
| 46 'wtf/GetPtr.h', | 46 'wtf/GetPtr.h', |
| 47 'wtf/RefPtr.h', | 47 'wtf/RefPtr.h', |
| 48 ]) | 48 ]) |
| 49 | 49 |
| 50 def cpp_type(idl_type): | 50 def cpp_type(idl_type): |
| 51 # FIXME: remove this function by making callback types consistent | 51 # FIXME: remove this function by making callback types consistent |
| 52 # (always use usual v8_types.cpp_type) | 52 # (always use usual v8_types.cpp_type) |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 argument_declarations = [ | 122 argument_declarations = [ |
| 123 '%s %s' % (argument.idl_type.callback_cpp_type, argument.name) | 123 '%s %s' % (argument.idl_type.callback_cpp_type, argument.name) |
| 124 for argument in arguments] | 124 for argument in arguments] |
| 125 if call_with_this_handle: | 125 if call_with_this_handle: |
| 126 argument_declarations.insert(0, 'ScriptValue thisValue') | 126 argument_declarations.insert(0, 'ScriptValue thisValue') |
| 127 return { | 127 return { |
| 128 'argument_declarations': argument_declarations, | 128 'argument_declarations': argument_declarations, |
| 129 'arguments': [generate_argument(argument) for argument in arguments], | 129 'arguments': [generate_argument(argument) for argument in arguments], |
| 130 } | 130 } |
| OLD | NEW |