# Copyright 2014 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/chromebox_for_meetings/buildflags.gni") import("//build/config/chromeos/ui_mode.gni") import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chrome/test/base/js2gtest.gni") import("//components/signin/features.gni") import("//pdf/features.gni") import("//printing/buildflags/buildflags.gni") import("//third_party/closure_compiler/compile_js.gni") import("//tools/grit/grit_rule.gni") import("//tools/grit/repack.gni") assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome") group("resources") { public_deps = [ "segmentation_internals:resources" ] if (!is_android) { public_deps += [ ":app_icon_resources", ":component_extension_resources", ":dev_ui_paks", "access_code_cast:resources", "app_service_internals:resources", "bookmarks:resources", "commander:resources", "downloads:resources", "feed:resources", "feedback:resources", "gaia_auth_host:resources", "hats:resources", "history:resources", "identity_internals:resources", "inline_login:resources", "management:resources", "new_tab_page:resources", "new_tab_page_instant:resources", "new_tab_page_third_party:resources", "omnibox_popup:resources", "password_manager:resources", "privacy_sandbox:resources", "profile_internals:resources", "settings:resources", "settings_shared:resources", "side_panel/bookmarks:resources", "side_panel/commerce:resources", "side_panel/companion:resources", "side_panel/customize_chrome:resources", "side_panel/history_clusters:resources", "side_panel/read_anything:resources", "side_panel/reading_list:resources", "side_panel/shared:resources", "side_panel/user_notes:resources", "signin:resources", "suggest_internals:resources", "support_tool:resources", "tab_search:resources", "web_app_internals:resources", "webui_gallery:resources", "whats_new:resources", ] if (is_chrome_branded) { public_deps += [ "lens:resources", "lens:untrusted_resources", "media_router/cast_feedback:resources", ] } } if (is_chromeos_ash) { public_deps += [ "ash/settings:resources", "chromeos:resources", "nearby_internals:resources", "nearby_share:resources", ] } if (is_chromeos_lacros && enable_extensions) { public_deps += [ "accessibility:extension_resources" ] } if (is_win || is_mac || is_linux || is_chromeos_ash) { public_deps += [ "connectors_internals:resources" ] } if (is_win || is_mac || is_linux || is_chromeos_lacros || is_fuchsia) { public_deps += [ "browser_switch:resources" ] } if (is_win || is_mac || is_linux || is_chromeos || is_fuchsia) { public_deps += [ "discards:resources" ] } if (is_win || is_mac || is_linux || is_fuchsia) { public_deps += [ "app_home:resources", "app_settings:resources", ] } if (is_linux || is_chromeos) { public_deps += [ "webui_js_error:resources" ] } if (!is_android && !is_chromeos_ash) { public_deps += [ "intro:resources", "signin/profile_picker:resources", "welcome:resources", ] } if (enable_search_engine_choice) { public_deps += [ "search_engine_choice:resources" ] } if (enable_webui_tab_strip) { public_deps += [ "tab_strip:resources" ] } if (enable_extensions) { public_deps += [ "extensions:resources", "sync_file_system_internals:resources", ] } if (enable_pdf) { public_deps += [ "pdf:resources" ] } if (enable_print_preview) { public_deps += [ "print_preview:resources" ] } if (is_cfm) { public_deps += [ "chromeos/chromebox_for_meetings:resources" ] } if (enable_webui_certificate_viewer) { public_deps += [ "certificate_viewer:resources" ] } } if (is_chromeos_ash && enable_js_type_check) { group("closure_compile") { deps = [ "chromeos:closure_compile", "chromeos/contact_center_insights:closure_compile", "gaia_auth_host:closure_compile", "nearby_internals:closure_compile", ] } } if (!is_android) { grit("component_extension_resources") { source = "component_extension_resources.grd" defines = chrome_grit_defines if (enable_hangout_services_extension) { defines += [ "enable_hangout_services_extension" ] } # Some resources within component_extension_resources.grd are generated at # build time so we include them as explicit dependencies here if (is_chromeos) { deps = [ "chromeos/contact_center_insights:generate_ccaas_deps", "chromeos/desk_api:generate_desk_api_bundle", ] } outputs = [ "grit/component_extension_resources.h", "grit/component_extension_resources_map.cc", "grit/component_extension_resources_map.h", "component_extension_resources.pak", ] output_dir = "$root_gen_dir/chrome" } grit("app_icon_resources") { source = "app_icon/app_icon_resources.grd" defines = chrome_grit_defines outputs = [ "grit/app_icon_resources.h", "grit/app_icon_resources_map.cc", "grit/app_icon_resources_map.h", "app_icon_resources_100_percent.pak", "app_icon_resources_200_percent.pak", ] output_dir = "$root_gen_dir/chrome" } if (is_chrome_branded) { grit("preinstalled_web_apps_resources") { source = "preinstalled_web_apps/resources.grd" defines = chrome_grit_defines outputs = [ "grit/preinstalled_web_apps_resources.h", "grit/preinstalled_web_apps_resources_map.cc", "grit/preinstalled_web_apps_resources_map.h", "preinstalled_web_apps_resources.pak", ] output_dir = "$root_gen_dir/chrome" } } } group("dev_ui_resources") { public_deps = [ "accessibility:resources", "bluetooth_internals:resources", "browsing_topics:resources", "components:resources", "engagement:resources", "internals:resources", "invalidations:resources", "location_internals:resources", "media:resources", "memory_internals:resources", "net_internals:resources", "omnibox:resources", "predictors:resources", "usb_internals:resources", "//chrome/browser:dev_ui_browser_resources", "//components/commerce/core/internals/resources", "//components/download/resources/download_internals:resources", "//components/history_clusters/history_clusters_internals/resources", "//components/metrics/debug:resources", "//components/optimization_guide/optimization_guide_internals/resources", "//components/policy/resources/webui:resources", "//components/resources:dev_ui_components_resources", "//components/sync/service/resources", "//content/browser/resources/gpu:resources", "//content/browser/resources/media:resources", "//content/browser/resources/net:resources", "//content/browser/resources/process:resources", "//content/browser/resources/service_worker:resources", "//content/browser/webrtc/resources", ] if (enable_vr) { public_deps += [ "//content/browser/resources/webxr_internals:resources" ] } if (is_android) { public_deps += [ "//chrome/browser/resources/feed_internals:resources", "//chrome/browser/resources/webapks:resources", ] } if (is_android || is_linux || is_chromeos || is_win) { public_deps += [ "//chrome/browser/resources/sandbox_internals:resources" ] } } repack("dev_ui_paks") { output = "$root_gen_dir/chrome/dev_ui_resources.pak" sources = [ "$root_gen_dir/chrome/accessibility_resources.pak", "$root_gen_dir/chrome/bluetooth_internals_resources.pak", "$root_gen_dir/chrome/browsing_topics_internals_resources.pak", "$root_gen_dir/chrome/components_resources.pak", "$root_gen_dir/chrome/dev_ui_browser_resources.pak", "$root_gen_dir/chrome/engagement_resources.pak", "$root_gen_dir/chrome/internals_resources.pak", "$root_gen_dir/chrome/invalidations_resources.pak", "$root_gen_dir/chrome/location_internals_resources.pak", "$root_gen_dir/chrome/media_resources.pak", "$root_gen_dir/chrome/memory_internals_resources.pak", "$root_gen_dir/chrome/net_internals_resources.pak", "$root_gen_dir/chrome/omnibox_resources.pak", "$root_gen_dir/chrome/predictors_resources.pak", "$root_gen_dir/chrome/usb_internals_resources.pak", "$root_gen_dir/components/commerce_internals_resources.pak", "$root_gen_dir/components/dev_ui_components_resources.pak", "$root_gen_dir/components/download_internals_resources.pak", "$root_gen_dir/components/history_clusters_internals_resources.pak", "$root_gen_dir/components/metrics_internals_resources.pak", "$root_gen_dir/components/optimization_guide_internals_resources.pak", "$root_gen_dir/components/policy_resources.pak", "$root_gen_dir/components/sync_service_sync_internals_resources.pak", "$root_gen_dir/content/browser/resources/media/media_internals_resources.pak", "$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak", "$root_gen_dir/content/gpu_resources.pak", "$root_gen_dir/content/network_errors_resources.pak", "$root_gen_dir/content/process_resources.pak", "$root_gen_dir/content/service_worker_resources.pak", ] if (enable_vr) { sources += [ "$root_gen_dir/content/webxr_internals_resources.pak" ] } if (is_android) { sources += [ "$root_gen_dir/chrome/feed_internals_resources.pak", "$root_gen_dir/chrome/webapks_resources.pak", ] } if (is_android || is_linux || is_chromeos || is_win) { sources += [ "$root_gen_dir/chrome/sandbox_internals_resources.pak" ] } deps = [ ":dev_ui_resources" ] }