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

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/scripts.gni

Issue 2970003002: Add code generation for ConditionalFeatures bindings code (Closed)
Patch Set: Move awkward dependency into scripts.gni with its counterpart Created 3 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//third_party/WebKit/Source/core/core_idl_files.gni") 5 import("//third_party/WebKit/Source/core/core_idl_files.gni")
6 import("//third_party/WebKit/Source/modules/modules_idl_files.gni") 6 import("//third_party/WebKit/Source/modules/modules_idl_files.gni")
7 7
8 bindings_scripts_dir = get_path_info(".", "abspath") 8 bindings_scripts_dir = get_path_info(".", "abspath")
9 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts" 9 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts"
10 10
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 args += [ rebase_path(output_idl_file, root_build_dir) ] 427 args += [ rebase_path(output_idl_file, root_build_dir) ]
428 output_idl_files += [ output_idl_file ] 428 output_idl_files += [ output_idl_file ]
429 output_header_files += 429 output_header_files +=
430 [ "$output_dir/${interface}${component}Constructors.h" ] 430 [ "$output_dir/${interface}${component}Constructors.h" ]
431 } 431 }
432 432
433 outputs = output_idl_files + output_header_files 433 outputs = output_idl_files + output_header_files
434 deps = invoker.deps 434 deps = invoker.deps
435 } 435 }
436 } 436 }
437
438 # Calls the generate_conditional_features script.
439 #
440 # Parameters:
441 # sources = a list of source IDL files.
442 # global_objects_file = a global objects file generated by compute_global_obje cts
443 # component = component to generate conditional feature bindings for ("Core" o r "Modules")
444 # output_dir = output directory to generate cpp file and header file.
445 # deps = dependencies
446 #
447 template("generate_conditional_features") {
448 action(target_name) {
449 script = "//third_party/WebKit/Source/bindings/scripts/generate_conditional_ features.py"
450
451 # Write the file list to a unique temp file to avoid blowing out the
452 # command line length limit.
453 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
454 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir))
455
456 inputs = [
457 "//third_party/WebKit/Source/bindings/scripts/utilities.py",
458 "//third_party/WebKit/Source/bindings/templates/ConditionalFeatur esFor${invoker.component}.cpp.tmpl",
459 "//third_party/WebKit/Source/bindings/templates/ConditionalFeatur esFor${invoker.component}.h.tmpl",
460 idl_files_list,
461 invoker.global_objects_file,
462 ] + invoker.sources
463
464 args = [
465 "--output-directory",
466 rebase_path(invoker.output_dir, root_build_dir),
467 "--info-dir",
468 "gen/blink/bindings",
469 "--cache-dir",
470 rebase_path(bindings_scripts_output_dir, root_build_dir),
471 "--target-component",
472 invoker.component,
473 "--idl-files-list",
474 rebase_path(idl_files_list, root_build_dir),
475 "--global-objects-file",
476 rebase_path(invoker.global_objects_file, root_build_dir),
477 ]
478
479 outputs = [
480 "${invoker.output_dir}/ConditionalFeaturesFor${invoker.component}.cpp",
481 "${invoker.output_dir}/ConditionalFeaturesFor${invoker.component}.h",
482 ]
483
484 # TODO: This should not always require modules; For core features, this
485 # should be interfaces_info_core (w/o modules). This is the same issue as
486 # above in the idl_compiler template.
487 # http://crbug.com/358074
haraken 2017/07/14 01:23:30 tasak, bashi: The question is whether this TODO is
bashi 2017/07/14 02:15:17 It depends on what information generate_conditiona
488 deps = invoker.deps +
489 [ "//third_party/WebKit/Source/bindings/modules:interfaces_info" ]
490 }
491 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698