# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//chromeos/assistant/assistant.gni") import("//chromeos/components/help_app_ui/help_app_ui.gni") import("//chromeos/components/media_app_ui/media_app_ui.gni") import("//tools/grit/grit_rule.gni") assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos") grit("resources") { source = "chromeos_resources.grd" outputs = [ "grit/chromeos_resources.h", "grit/chromeos_resources_map.cc", "grit/chromeos_resources_map.h", "chromeos_resources.pak", ] output_dir = "$root_gen_dir/chromeos" defines = [ "enable_cros_libassistant=$enable_cros_libassistant", "enable_cros_media_app=$enable_cros_media_app", ] grit_flags = [ "-E", "mojom_root=" + rebase_path(root_gen_dir, root_build_dir), ] deps = [ "//chromeos/components/multidevice/mojom:mojom_js", "//chromeos/services/cellular_setup/public/mojom:mojom_js", "//chromeos/services/device_sync/public/mojom:mojom_js", "//chromeos/services/machine_learning/public/mojom:mojom_js", "//chromeos/services/multidevice_setup/public/mojom:mojom_js", "//chromeos/services/network_config/public/mojom:mojom_js", "//chromeos/services/network_health/public/mojom:mojom_js", ] } # Resources used by chrome://camera-app. grit("camera_app_resources") { source = "../components/camera_app_ui/resources/camera_app_resources.grd" outputs = [ "grit/chromeos_camera_app_resources.h", "grit/chromeos_camera_app_resources_map.cc", "grit/chromeos_camera_app_resources_map.h", "chromeos_camera_app_resources.pak", ] output_dir = "$root_gen_dir/chromeos" grit_flags = [ "-E", "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), ] deps = [ "//chromeos/components/camera_app_ui:mojo_bindings_js", "//media/capture/video/chromeos/mojom:cros_camera_js", "//mojo/public/js:bindings_lite", "//third_party/blink/public/mojom:mojom_platform_js", ] } # Resources used by chrome://help-app, and parts of the sandboxed app it hosts # that do not come from the app bundle (below). grit("help_app_resources") { source = "../components/help_app_ui/resources/help_app_resources.grd" outputs = [ "grit/chromeos_help_app_resources.h", "grit/chromeos_help_app_resources_map.cc", "grit/chromeos_help_app_resources_map.h", "chromeos_help_app_resources.pak", ] output_dir = "$root_gen_dir/chromeos" grit_flags = [ "-E", "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), ] deps = [ "//chromeos/components/help_app_ui:mojo_bindings_js" ] } # Resources automatically served by the chrome://help-app bundle, obtained via DEPS. grit("help_app_bundle_resources") { if (enable_cros_help_app) { # Obtained via an internal CIPD package in src/DEPS. source = "../components/help_app_ui/resources/prod/help_app_bundle_resources.grd" } else { source = "../components/help_app_ui/resources/mock/help_app_bundle_mock_resources.grd" } use_brotli = true outputs = [ "grit/chromeos_help_app_bundle_resources.h", "grit/chromeos_help_app_bundle_resources_map.cc", "grit/chromeos_help_app_bundle_resources_map.h", "chromeos_help_app_bundle_resources.pak", ] output_dir = "$root_gen_dir/chromeos" } # Resources used by chrome://sample-system-web-app grit("sample_system_web_app_resources") { source = "../components/sample_system_web_app_ui/resources/sample_system_web_app_resources.grd" outputs = [ "grit/chromeos_sample_system_web_app_resources.h", "grit/chromeos_sample_system_web_app_resources_map.cc", "grit/chromeos_sample_system_web_app_resources_map.h", "chromeos_sample_system_web_app_resources.pak", ] output_dir = "$root_gen_dir/chromeos" } # Resources used by chrome://telemetry-extension grit("telemetry_extension_resources") { source = "../components/telemetry_extension_ui/resources/telemetry_extension_resources.grd" deps = [ "../components/telemetry_extension_ui/mojom:mojom_js" ] outputs = [ "grit/chromeos_telemetry_extension_resources.h", "grit/chromeos_telemetry_extension_resources_map.cc", "grit/chromeos_telemetry_extension_resources_map.h", "chromeos_telemetry_extension_resources.pak", ] grit_flags = [ "-E", "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), ] output_dir = "$root_gen_dir/chromeos" } # Resources used by chrome://media-app, and parts of the sandboxed app it hosts # that do not come from the app bundle (below). grit("media_app_resources") { source = "../components/media_app_ui/resources/media_app_resources.grd" outputs = [ "grit/chromeos_media_app_resources.h", "chromeos_media_app_resources.pak", ] output_dir = "$root_gen_dir/chromeos" use_brotli = true grit_flags = [ "-E", "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), ] deps = [ "//chromeos/components/media_app_ui:mojo_bindings_js" ] } # Resources automatically served by the chrome://media-app bundle, obtained via DEPS. grit("media_app_bundle_resources") { if (enable_cros_media_app) { # Obtained via an internal CIPD package in src/DEPS. source = "../components/media_app_ui/resources/prod/media_app_bundle_resources.grd" } else { source = "../components/media_app_ui/resources/mock/media_app_bundle_mock_resources.grd" } use_brotli = true outputs = [ "grit/chromeos_media_app_bundle_resources.h", "grit/chromeos_media_app_bundle_resources_map.cc", "grit/chromeos_media_app_bundle_resources_map.h", "chromeos_media_app_bundle_resources.pak", ] output_dir = "$root_gen_dir/chromeos" } grit("print_management_resources") { source = "../components/print_management/resources/print_management_resources.grd" deps = [ "../components/print_management/mojom:mojom_js", "../components/print_management/resources:polymer3_elements", ] outputs = [ "grit/chromeos_print_management_resources.h", "grit/chromeos_print_management_resources_map.cc", "grit/chromeos_print_management_resources_map.h", "chromeos_print_management_resources.pak", ] grit_flags = [ "-E", "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), ] output_dir = "$root_gen_dir/chromeos" }