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

Side by Side Diff: bindings/scripts/v8_callback_interface.py

Issue 1660113002: Updated to Chrome 45 (2454) moved from SVN to git. Base URL: https://github.com/dart-lang/webcore.git@roll_45
Patch Set: Created 4 years, 10 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
« no previous file with comments | « bindings/scripts/v8_attributes.py ('k') | bindings/scripts/v8_dictionary.py » ('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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 def callback_interface_context(callback_interface): 73 def callback_interface_context(callback_interface):
74 includes.clear() 74 includes.clear()
75 includes.update(CALLBACK_INTERFACE_CPP_INCLUDES) 75 includes.update(CALLBACK_INTERFACE_CPP_INCLUDES)
76 return { 76 return {
77 'conditional_string': v8_utilities.conditional_string(callback_interface ), 77 'conditional_string': v8_utilities.conditional_string(callback_interface ),
78 'cpp_class': callback_interface.name, 78 'cpp_class': callback_interface.name,
79 'v8_class': v8_utilities.v8_class_name(callback_interface), 79 'v8_class': v8_utilities.v8_class_name(callback_interface),
80 'header_includes': set(CALLBACK_INTERFACE_H_INCLUDES), 80 'header_includes': set(CALLBACK_INTERFACE_H_INCLUDES),
81 'methods': [method_context(operation) 81 'methods': [method_context(operation)
82 for operation in callback_interface.operations 82 for operation in callback_interface.operations],
83 if not v8_utilities.dart_custom_method(operation.extended_at tributes)],
84 } 83 }
85 84
86 85
87 def add_includes_for_operation(operation): 86 def add_includes_for_operation(operation):
88 operation.idl_type.add_includes_for_type() 87 operation.idl_type.add_includes_for_type()
89 for argument in operation.arguments: 88 for argument in operation.arguments:
90 argument.idl_type.add_includes_for_type() 89 argument.idl_type.add_includes_for_type()
91 90
92 91
93 def method_context(operation): 92 def method_context(operation):
(...skipping 29 matching lines...) Expand all
123 } 122 }
124 123
125 argument_declarations = ['ScriptValue thisValue'] if call_with_this_handle e lse [] 124 argument_declarations = ['ScriptValue thisValue'] if call_with_this_handle e lse []
126 argument_declarations.extend( 125 argument_declarations.extend(
127 '%s %s' % (argument.idl_type.callback_cpp_type, argument.name) 126 '%s %s' % (argument.idl_type.callback_cpp_type, argument.name)
128 for argument in arguments) 127 for argument in arguments)
129 return { 128 return {
130 'argument_declarations': argument_declarations, 129 'argument_declarations': argument_declarations,
131 'arguments': [argument_context(argument) for argument in arguments], 130 'arguments': [argument_context(argument) for argument in arguments],
132 } 131 }
OLDNEW
« no previous file with comments | « bindings/scripts/v8_attributes.py ('k') | bindings/scripts/v8_dictionary.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698