chromium/chrome/credential_provider/extension/BUILD.gn

# Copyright 2020 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/clang/clang.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/dcheck_always_on.gni")
import("//build/nocompile.gni")
import("//chrome/process_version_rc_template.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//tools/grit/grit_rule.gni")

process_version_rc_template("version") {
  template_file = "extension.rc.version"
  output = "$root_out_dir/extension_version.rc"
}

grit("extension_resources") {
  source = "extension_resources.grd"
  inputs = [ "extension_icon.ico" ]
  outputs = [
    "grit/extension_resources.h",
    "grit/extension_resources.rc",
  ]
  resource_ids = ""
}

source_set("common") {
  sources = [
    "extension_strings.cc",
    "extension_strings.h",
    "extension_utils.cc",
    "extension_utils.h",
    "os_service_manager.cc",
    "os_service_manager.h",
    "scoped_handle.h",
  ]
  deps = [
    "../gaiacp:util",
    "//base:base",
  ]
  configs += [ "//build/config/win:windowed" ]
}

source_set("extension_lib") {
  sources = [
    "service.cc",
    "service.h",
    "task.h",
    "task_manager.cc",
    "task_manager.h",
    "user_context_enumerator.cc",
    "user_context_enumerator.h",
    "user_device_context.cc",
    "user_device_context.h",
  ]
  deps = [
    ":common",
    "../gaiacp:util",
    "//base:base",
    "//net:net",
  ]
  configs += [ "//build/config/win:windowed" ]
}

# This component is used for the app inventory feature.
source_set("app_inventory") {
  sources = [
    "app_inventory_manager.cc",
    "app_inventory_manager.h",
  ]
  public_deps = [ "../gaiacp:common" ]
  deps = [
    ":extension_lib",
    "../gaiacp:mdm_utils",
    "../gaiacp:util",
    "//base",
    "//url",
  ]
}

executable("gcpw_extension") {
  sources = [ "extension_main.cc" ]
  deps = [
    ":app_inventory",
    ":common",
    ":extension_lib",
    ":extension_resources",
    ":version",
    "../eventlog:gcp_eventlog_messages",
    "../gaiacp:common",
    "../gaiacp:policies",
    "../gaiacp:util",
    "//base",
    "//components/crash/core/app:crash_export_thunks",
    "//components/crash/core/app:run_as_crashpad_handler",
  ]
  configs += [ "//build/config/win:windowed" ]
}