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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_tests.py

Issue 2312093003: Generated bindings for IDL callback functions (Closed)
Patch Set: Addressed comments Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_tests.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_tests.py b/third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_tests.py
index 144edc6c73d06b0a00c915904adec7e573a81b1e..cd7b12a410795f3c5b6c6608e18872590b65db8d 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_tests.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_tests.py
@@ -40,7 +40,7 @@ source_path = os.path.normpath(os.path.join(module_path, os.pardir, os.pardir,
bindings_script_path = os.path.join(source_path, 'bindings', 'scripts')
sys.path.append(bindings_script_path) # for Source/bindings imports
-from code_generator_v8 import CodeGeneratorUnionType
+from code_generator_v8 import CodeGeneratorUnionType, CodeGeneratorCallbackFunction
from compute_interfaces_info_individual import InterfaceInfoCollector
from compute_interfaces_info_overall import compute_interfaces_info_overall, interfaces_info
from idl_compiler import IdlCompilerDictionaryImpl, IdlCompilerV8
@@ -276,6 +276,14 @@ def bindings_tests(output_directory, verbose):
for output_path, output_code in outputs:
write_file(output_code, output_path, only_if_changed=True)
+ def generate_callback_function_impl(output_directory, component):
+ generator = CodeGeneratorCallbackFunction(
+ component_info_providers[component], cache_dir=None,
+ output_dir=output_directory, target_component=component)
+ outputs = generator.generate_code()
+ for output_path, output_code in outputs:
+ write_file(output_code, output_path, only_if_changed=True)
+
try:
generate_interface_dependencies()
for component in COMPONENT_DIRECTORY:
@@ -284,6 +292,7 @@ def bindings_tests(output_directory, verbose):
os.makedirs(output_dir)
generate_union_type_containers(output_dir, component)
+ generate_callback_function_impl(output_dir, component)
idl_compiler = IdlCompilerV8(
output_dir,
@@ -292,6 +301,7 @@ def bindings_tests(output_directory, verbose):
if component == 'core':
partial_interface_output_dir = os.path.join(output_directory,
'modules')
+
bashi 2016/09/16 05:51:19 Remove this empty line
lkawai 2016/09/16 10:03:20 Done.
if not os.path.exists(partial_interface_output_dir):
os.makedirs(partial_interface_output_dir)
idl_partial_interface_compiler = IdlCompilerV8(

Powered by Google App Engine
This is Rietveld 408576698