chromium/ios/chrome/browser/autofill/model/bottom_sheet/BUILD.gn

# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//ios/web/public/js_messaging/optimize_ts.gni")

source_set("bottom_sheet") {
  sources = [
    "autofill_bottom_sheet_java_script_feature.h",
    "autofill_bottom_sheet_java_script_feature.mm",
    "autofill_bottom_sheet_observer.h",
    "autofill_bottom_sheet_observer_bridge.h",
    "autofill_bottom_sheet_observer_bridge.mm",
    "autofill_bottom_sheet_tab_helper.h",
    "autofill_bottom_sheet_tab_helper.mm",
  ]
  deps = [
    ":bottom_sheet_ts",
    ":virtual_card_enrollment_callbacks",
    "//base",
    "//components/autofill/core/browser",
    "//components/autofill/core/common",
    "//components/autofill/ios/browser",
    "//components/autofill/ios/common",
    "//components/autofill/ios/form_util",
    "//components/password_manager/core/browser/features:password_features",
    "//components/password_manager/core/common:features",
    "//components/password_manager/ios",
    "//components/prefs",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/web/public",
    "//ios/web/public:web_state_observer",
    "//ios/web/public/js_messaging",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "autofill_bottom_sheet_observer_bridge_unittest.mm",
    "autofill_bottom_sheet_tab_helper_unittest.mm",
  ]
  deps = [
    ":bottom_sheet",
    "//base/test:test_support",
    "//components/autofill/ios/browser",
    "//components/autofill/ios/form_util",
    "//components/infobars/core",
    "//components/password_manager/core/browser/features:password_features",
    "//ios/chrome/browser/autofill/ui_bundled:coordinator",
    "//ios/chrome/browser/infobars/model",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/web/model:web_internal",
    "//ios/web/public/js_messaging",
    "//ios/web/public/test",
    "//ios/web/public/test/fakes",
    "//testing/gtest",
    "//third_party/ocmock",
  ]
}

optimize_ts("bottom_sheet_ts") {
  visibility = [ ":bottom_sheet" ]

  sources = [ "bottom_sheet.ts" ]
  deps = [
    "//ios/web/public/js_messaging:gcrweb",
    "//ios/web/public/js_messaging:util_scripts",
  ]
}

source_set("virtual_card_enrollment_callbacks") {
  sources = [
    "virtual_card_enrollment_callbacks.cc",
    "virtual_card_enrollment_callbacks.h",
  ]
  deps = [ "//base" ]
}