| # Copyright 2016 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//components/guest_view/buildflags/buildflags.gni") |
| import("//extensions/buildflags/buildflags.gni") |
| |
| # APIs and features included in both normal desktop builds and the experimental |
| # desktop-android build. |
| # TODO(https://crbug.com/356905053): Continue moving more here. |
| extensions_api_schema_files_ = [ |
| "alarms.webidl", |
| "declarative_net_request.webidl", |
| "dns.webidl", |
| "events.json", |
| "i18n.json", |
| "idle.json", |
| "management.json", |
| "metrics_private.json", |
| "offscreen.webidl", |
| "permissions.json", |
| "power.webidl", |
| "proxy.json", |
| "runtime.json", |
| "scripting.webidl", |
| "storage.json", |
| "system_cpu.webidl", |
| "system_display.webidl", |
| "system_memory.webidl", |
| "system_network.webidl", |
| "test.json", |
| "user_scripts.webidl", |
| "web_request.json", |
| "webstore_private.json", |
| ] |
| |
| # Schemas that should be used only to auto-generate the C++ types. |
| # In many cases, this includes schemas used to generate types used in manifest |
| # parsing. |
| extensions_types_only_schema_files_ = [ |
| "chrome_url_overrides.webidl", |
| "content_scripts.webidl", |
| "cross_origin_isolation.webidl", |
| "extension_types.json", |
| "extensions_manifest_types.json", |
| "file_handlers.webidl", |
| "incognito.json", |
| "mime_handlers.webidl", |
| "oauth2.webidl", |
| "protocol_handlers.webidl", |
| "public_suffix.webidl", |
| "requirements.json", |
| "shared_module.webidl", |
| "types.json", |
| "web_accessible_resources_mv2.webidl", |
| "web_accessible_resources.webidl", |
| ] |
| |
| if (enable_guest_view) { |
| extensions_api_schema_files_ += [ |
| "guest_view_internal.json", |
| "web_view_internal.json", |
| ] |
| extensions_types_only_schema_files_ += [ |
| "extension_options_internal.webidl", |
| "icon_variants.webidl", |
| ] |
| } |
| |
| # APIs that are not currently supported on the experimental desktop-android. |
| if (enable_extensions) { |
| extensions_api_schema_files_ += [ |
| "app_current_window_internal.webidl", |
| "app_runtime.webidl", |
| "app_window.webidl", |
| "audio.webidl", |
| "automation_internal.webidl", |
| "cec_private.webidl", |
| "clipboard.webidl", |
| "feedback_private.webidl", |
| "file_system.webidl", |
| "hid.webidl", |
| "mime_handler.webidl", |
| "networking_private.webidl", |
| "printer_provider_internal.webidl", |
| "printer_provider.webidl", |
| "socket.webidl", |
| "sockets_tcp_server.webidl", |
| "sockets_tcp.webidl", |
| "sockets_udp.webidl", |
| "system_storage.webidl", |
| ] |
| extensions_types_only_schema_files_ += [ |
| # While the automation API defines a lot of APIs, they are all marked |
| # as [nocompile] and implemented in JS. As such, we somewhat-misleadingly |
| # categorize it as "types_only". |
| "automation.webidl", |
| "mime_handler_private.webidl", |
| "mojo_private.webidl", |
| "scripts_internal.webidl", |
| ] |
| |
| if (is_chromeos) { |
| extensions_api_schema_files_ += [ |
| "app_view_guest_internal.json", |
| "bluetooth_low_energy.webidl", |
| "bluetooth_private.webidl", |
| "bluetooth_socket.webidl", |
| "bluetooth.webidl", |
| "diagnostics.webidl", |
| "media_perception_private.webidl", |
| "serial.webidl", |
| "usb.webidl", |
| "virtual_keyboard_private.json", |
| "virtual_keyboard.webidl", |
| "webcam_private.webidl", |
| ] |
| } else { |
| # On non-ChromeOS platforms the USB API is not supported but the types are |
| # still used by other APIs (e.g. printerProvider). |
| extensions_types_only_schema_files_ += [ "usb.webidl" ] |
| } |
| } |
| |
| # In the experimental desktop-android configuration, we still need to compile |
| # the C++ types for certain APIs, since they are used from outside the |
| # extensions layer. These should be removed as we add support for the full |
| # API by moving these entries to the `extensions_api_schema_files_` above. |
| if (enable_desktop_android_extensions) { |
| extensions_types_only_schema_files_ += [ |
| "clipboard.webidl", |
| "scripts_internal.webidl", |
| "usb.webidl", |
| "virtual_keyboard_private.json", |
| "virtual_keyboard.webidl", |
| ] |
| } |
| |
| extensions_api_schema_files = |
| get_path_info(extensions_api_schema_files_, "abspath") |
| |
| extensions_types_only_schema_files = |
| get_path_info(extensions_types_only_schema_files_, "abspath") |
| |
| extensions_api_uncompiled_sources = |
| get_path_info([ "web_request_internal.json" ], "abspath") |
| |
| extensions_api_uncompiled_bundle_schema_sources = |
| get_path_info([ |
| "declarative_web_request.json", |
| "dom.json", |
| "web_view_request.json", |
| ], |
| "abspath") |
| |
| extensions_api_root_namespace = "extensions::api::%(namespace)s" |