# Copyright 2014 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("//third_party/protobuf/proto_library.gni")

# GYP version: components/autofill.gypi:autofill_content_browser
static_library("browser") {
  sources = [
    "content_autofill_driver.cc",
    "content_autofill_driver.h",
    "request_autocomplete_manager.cc",
    "request_autocomplete_manager.h",
    "risk/fingerprint.cc",
    "risk/fingerprint.h",
    "wallet/form_field_error.cc",
    "wallet/form_field_error.h",
    "wallet/full_wallet.cc",
    "wallet/full_wallet.h",
    "wallet/gaia_account.cc",
    "wallet/gaia_account.h",
    "wallet/instrument.cc",
    "wallet/instrument.h",
    "wallet/required_action.cc",
    "wallet/required_action.h",
    "wallet/wallet_address.cc",
    "wallet/wallet_address.h",
    "wallet/wallet_client.cc",
    "wallet/wallet_client.h",
    "wallet/wallet_client_delegate.h",
    "wallet/wallet_items.cc",
    "wallet/wallet_items.h",
    "wallet/wallet_service_url.cc",
    "wallet/wallet_service_url.h",
    "wallet/wallet_signin_helper.cc",
    "wallet/wallet_signin_helper.h",
  ]

  public_deps = [
    "//skia",
  ]
  deps = [
    ":risk_proto",
    "//base",
    "//base:i18n",
    "//base:prefs",
    "//components/autofill/content/common",
    "//components/autofill/core/browser",
    "//components/autofill/core/browser:regexes",
    "//components/autofill/core/common",
    "//components/os_crypt",
    "//components/resources",
    "//components/strings",
    "//components/user_prefs",
    "//components/webdata/common",
    "//content/public/browser",
    "//content/public/common",
    "//google_apis",
    "//ipc",
    "//sql",
    "//third_party/icu",
    "//third_party/libphonenumber",
    "//third_party/libjingle",
    "//ui/base",
    "//ui/gfx",
    "//ui/gfx/geometry",
    "//url",
  ]
}

proto_library("risk_proto") {
  sources = [
    "risk/proto/fingerprint.proto",
  ]
  proto_out_dir = "components/autofill/content/browser/risk/proto"
}

static_library("test_support") {
  testonly = true
  sources = [
    "wallet/mock_wallet_client.cc",
    "wallet/mock_wallet_client.h",
    "wallet/wallet_test_util.cc",
    "wallet/wallet_test_util.h",
  ]

  deps = [
    "//testing/gmock",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "content_autofill_driver_unittest.cc",
    "request_autocomplete_manager_unittest.cc",
    "wallet/full_wallet_unittest.cc",
    "wallet/instrument_unittest.cc",
    "wallet/wallet_address_unittest.cc",
    "wallet/wallet_client_unittest.cc",
    "wallet/wallet_items_unittest.cc",
    "wallet/wallet_service_url_unittest.cc",
    "wallet/wallet_signin_helper_unittest.cc",
  ]

  deps = [
    ":browser",
    ":test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}