| # Copyright 2021 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("//cobalt/browser/browser_bindings_variables.gni") |
| import("//cobalt/script/v8c/v8c_variables.gni") |
| |
| # Migrated from cobalt/bindings/bindings.gypi |
| ############################################# |
| # Blink interface info is calculated in two stages. First at a per-component level |
| # (in Blink this is core or modules) and then these are combined. While Cobalt |
| # currently does not and may not need to distinguish between components, we adhere to |
| # Blink's process for simplicity. |
| component_info_pickle = "$bindings_scripts_output_dir/component_info.pickle" |
| interfaces_info_individual_pickle = |
| "$bindings_scripts_output_dir/interfaces_info_individual.pickle" |
| interfaces_info_combined_pickle = |
| "$bindings_scripts_output_dir/interfaces_info_overall.pickle" |
| |
| # The allowlist of what extended attributes we support. If an attribute |
| # not in this list is encountered, it will cause an error in the |
| # pipeline. |
| extended_attributes_file = "//cobalt/bindings/IDLExtendedAttributes.txt" |
| |
| # Base directory into which generated bindings source files will be |
| # generated. Directory structure will mirror the directory structure |
| # that the .idl files came from. |
| generated_source_output_dir = "$bindings_output_dir/source" |
| |
| # Generated header file that contains forward declarations for converting |
| # to/from JS value and generated types. |
| generated_type_conversion_header_file = "$generated_source_output_dir/${generated_bindings_prefix}_gen_type_conversion.h" |
| |
| # Directory containing generated IDL files. |
| generated_idls_output_dir = "$bindings_output_dir/idl" |
| |
| # Templates that are shared by the code generation for multiple engines. |
| shared_template_files = [ |
| "//cobalt/bindings/templates/dictionary.h.template", |
| "//cobalt/bindings/templates/interface-base.cc.template", |
| "//cobalt/bindings/templates/interface-base.h.template", |
| "//cobalt/bindings/templates/callback-interface-base.cc.template", |
| "//cobalt/bindings/templates/callback-interface-base.h.template", |
| ] |
| |
| # Cobalt's Jinja templates. |
| code_generator_template_files = engine_template_files + shared_template_files |