chromium/chrome/browser/resources/chromeos/BUILD.gn

# Copyright 2018 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/chromeos/ui_mode.gni")
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")

assert(is_chromeos_ash,
       "Only ChromeOS Ash resources in //c/b/resources//chromeos.")

group("resources") {
  public_deps = [
    ":app_icon_resources",
    ":multidevice_setup_resources",
    "accessibility:build",
    "add_supervision:resources",
    "app_install:resources",
    "arc_account_picker:resources",
    "assistant_optin:resources",
    "audio:resources",
    "bluetooth_pairing_dialog:resources",
    "borealis_installer:resources",
    "cloud_upload:resources",
    "desk_api:resources",
    "edu_coexistence:resources",
    "emoji_picker:resources",
    "enterprise_reporting:resources",
    "gaia_action_buttons:resources",
    "healthd_internals:resources",
    "internet_config_dialog:resources",
    "internet_detail_dialog:resources",
    "kerberos:resources",
    "launcher_internals:resources",
    "lock_screen_reauth:resources",
    "login:resources",
    "mako:resources",
    "manage_mirrorsync:resources",
    "multidevice_internals:resources",
    "network_ui:resources",
    "notification_tester:resources",
    "parent_access:resources",
    "password_change:resources",
    "remote_maintenance_curtain:resources",
    "seal:resources",
    "sensor_info:resources",
    "set_time_dialog:resources",
    "skyvault:resources",
    "supervision:resources",
    "vc_tray_tester:resources",
  ]
}

grit("app_icon_resources") {
  source = "app_icon/app_icon_resources.grd"
  defines = chrome_grit_defines
  outputs = [
    "grit/chromeos_app_icon_resources.h",
    "grit/chromeos_app_icon_resources_map.cc",
    "grit/chromeos_app_icon_resources_map.h",
    "chromeos_app_icon_resources_100_percent.pak",
    "chromeos_app_icon_resources_200_percent.pak",
  ]
  output_dir = "$root_gen_dir/chrome"
}

grit("multidevice_setup_resources") {
  multidevice_setup_gen_dir =
      "$root_gen_dir/chrome/browser/resources/chromeos/multidevice_setup"
  source = "$multidevice_setup_gen_dir/multidevice_setup_resources.grd"

  defines = chrome_grit_defines
  outputs = [
    "grit/multidevice_setup_resources.h",
    "grit/multidevice_setup_resources_map.cc",
    "grit/multidevice_setup_resources_map.h",
    "multidevice_setup_resources.pak",
  ]
  deps = [ "//chrome/browser/resources/chromeos/multidevice_setup:build_grd" ]
  enable_input_discovery_for_gn_analyze = false
  output_dir = "$root_gen_dir/chrome"
}

group("closure_compile") {
  deps = [
    ":closure_compile_local",
    "account_manager:closure_compile",
    "account_manager/components:closure_compile",
    "arc_account_picker:closure_compile",
    "assistant_optin:closure_compile",
    "crostini_installer:closure_compile",
    "crostini_upgrader:closure_compile",
    "emulator:closure_compile",
    "gaia_action_buttons:closure_compile",
    "multidevice_internals:closure_compile",
    "multidevice_setup:closure_compile",
    "password_change:closure_compile",
    "smb_shares:closure_compile",
    "sys_internals:closure_compile",
    "vm:closure_compile",
  ]
}

js_type_check("closure_compile_local") {
  deps = [
    ":power",
    ":slow",
  ]
}

js_library("power") {
  deps = [
    "//ash/webui/common/resources:cr.m",
    "//ash/webui/common/resources:load_time_data.m",
    "//ash/webui/common/resources:util",
  ]
}

js_library("slow") {
  deps = [
    "//ash/webui/common/resources:cr.m",
    "//ash/webui/common/resources:util",
  ]
  externs_list = [ "$externs_path/chrome_send.js" ]
}