chromium/ios/chrome/browser/ui/authentication/BUILD.gn

# Copyright 2016 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/chrome_build.gni")

source_set("authentication") {
  sources = [
    "account_capabilities_latency_tracker.h",
    "account_capabilities_latency_tracker.mm",
    "authentication_flow.h",
    "authentication_flow.mm",
    "authentication_flow_performer.h",
    "authentication_flow_performer.mm",
    "authentication_flow_performer_delegate.h",
    "authentication_ui_util.h",
    "authentication_ui_util.mm",
    "re_signin_infobar_delegate.h",
    "re_signin_infobar_delegate.mm",
    "signin_notification_infobar_delegate.h",
    "signin_notification_infobar_delegate.mm",
    "signin_promo_view_mediator.h",
    "signin_promo_view_mediator.mm",
  ]
  deps = [
    ":account_settings_presenter",
    ":authentication_constants",
    ":signin_presenter",
    "//components/bookmarks/common",
    "//components/consent_auditor",
    "//components/infobars/core",
    "//components/policy/core/common",
    "//components/prefs",
    "//components/reading_list/features:flags",
    "//components/signin/ios/browser",
    "//components/signin/public/base",
    "//components/signin/public/base:signin_switches",
    "//components/signin/public/identity_manager",
    "//components/signin/public/identity_manager/objc",
    "//components/strings",
    "//components/unified_consent",
    "//google_apis",
    "//ios/chrome/app/application_delegate:app_state_header",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/flags",
    "//ios/chrome/browser/infobars/model",
    "//ios/chrome/browser/ntp/ui_bundled:feature_flags",
    "//ios/chrome/browser/policy/model",
    "//ios/chrome/browser/shared/coordinator/alert",
    "//ios/chrome/browser/shared/coordinator/scene:scene_state_header",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser",
    "//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/model/web_state_list",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/public/features:system_flags",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/shared/ui/util:snackbar_util",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/signin/model:capabilities_types",
    "//ios/chrome/browser/signin/model:system_identity",
    "//ios/chrome/browser/signin/model:system_identity_manager",
    "//ios/chrome/browser/sync/model",
    "//ios/chrome/browser/ui/authentication/cells",
    "//ios/chrome/browser/ui/authentication/history_sync:capabilities_fetcher",
    "//ios/chrome/browser/ui/authentication/resources",
    "//ios/chrome/browser/ui/authentication/signin:signin_headers",
    "//ios/chrome/browser/ui/settings:settings_root",
    "//ios/chrome/browser/unified_consent/model",
    "//ios/chrome/common",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/util",
    "//ios/public/provider/chrome/browser/signin:signin_error_api",
    "//ios/public/provider/chrome/browser/signin:signin_resources_api",
    "//ios/third_party/material_components_ios",
    "//ios/web/public",
    "//services/network/public/cpp",
    "//ui/base",
    "//ui/gfx",
  ]
  public_deps = [
    "//base",
    "//ios/chrome/browser/ui/authentication/signin:constants",
  ]
  frameworks = [
    "CoreGraphics.framework",
    "QuartzCore.framework",
    "UIKit.framework",
  ]
}

source_set("authentication_constants") {
  sources = [
    "authentication_constants.h",
    "authentication_constants.mm",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("signin_presenter") {
  sources = [ "signin_presenter.h" ]
}

source_set("account_settings_presenter") {
  sources = [ "account_settings_presenter.h" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "authentication_flow_performer_unittest.mm",
    "authentication_flow_unittest.mm",
    "authentication_ui_util_unittest.mm",
    "re_signin_infobar_delegate_unittest.mm",
    "signin_promo_view_mediator_unittest.mm",
  ]
  deps = [
    ":account_settings_presenter",
    ":authentication",
    ":signin_presenter",
    "//base",
    "//base/test:test_support",
    "//build:branding_buildflags",
    "//components/consent_auditor",
    "//components/consent_auditor:test_support",
    "//components/policy/core/common",
    "//components/policy/core/common:test_support",
    "//components/pref_registry",
    "//components/prefs",
    "//components/signin/public/base",
    "//components/signin/public/identity_manager",
    "//components/signin/public/identity_manager:test_support",
    "//components/sync:test_support",
    "//components/sync/base:features",
    "//components/sync_preferences",
    "//components/sync_preferences:test_support",
    "//components/variations",
    "//components/variations:test_support",
    "//components/version_info",
    "//ios/chrome/app/application_delegate:app_state_header",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/infobars/model",
    "//ios/chrome/browser/policy/model",
    "//ios/chrome/browser/policy/model:constants",
    "//ios/chrome/browser/policy/model:policy_util",
    "//ios/chrome/browser/policy/model:test_support",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/prefs:browser_prefs",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/table_view:styler",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/signin/model:fake_system_identity_manager",
    "//ios/chrome/browser/signin/model:test_support",
    "//ios/chrome/browser/sync/model",
    "//ios/chrome/browser/sync/model:test_support",
    "//ios/chrome/browser/ui/authentication/cells",
    "//ios/chrome/browser/unified_consent/model",
    "//ios/chrome/test:test_support",
    "//ios/testing:protocol_fake",
    "//ios/web/public/test",
    "//testing/gtest",
    "//third_party/ocmock",
    "//ui/base",
    "//ui/strings:ui_strings_grit",
  ]
}

source_set("eg_app_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "signin_earl_grey_app_interface.h",
    "signin_earl_grey_app_interface.mm",
  ]
  visibility = [
    "//ios/chrome/test/earl_grey:eg_app_support+eg2",
    "//ios/chrome/test/earl_grey:hooks",
  ]
  deps = [
    ":account_settings_presenter",
    ":authentication",
    ":signin_presenter",
    "//components/bookmarks/browser",
    "//components/prefs",
    "//components/signin/public/identity_manager",
    "//components/signin/public/identity_manager:test_support",
    "//components/supervised_user/core/browser",
    "//components/sync",
    "//ios/chrome/browser/bookmarks/model",
    "//ios/chrome/browser/shared/coordinator/scene:scene_state_header",
    "//ios/chrome/browser/shared/model/application_context",
    "//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/ui/util",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/signin/model:capabilities_types",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/signin/model:fake_system_identity_manager",
    "//ios/chrome/browser/sync/model",
    "//ios/chrome/browser/ui/authentication/cells",
    "//ios/chrome/browser/ui/authentication/enterprise/enterprise_prompt",
    "//ios/chrome/test/app:test_support",
    "//ios/testing/earl_grey:eg_app_support+eg2",
    "//ios/third_party/earl_grey2:app_framework+link",
  ]
}

source_set("eg_test_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "signin_earl_grey.h",
    "signin_earl_grey.mm",
    "signin_earl_grey_app_interface.h",
    "signin_earl_grey_app_interface_stub.mm",
    "signin_earl_grey_ui_test_util.h",
    "signin_earl_grey_ui_test_util.mm",
    "signin_matchers.h",
    "signin_matchers.mm",
  ]
  deps = [
    ":account_settings_presenter",
    ":signin_presenter",
    "//base",
    "//base/test:test_support",
    "//components/signin/public/base",
    "//components/sync/base",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/first_run/ui_bundled:constants",
    "//ios/chrome/browser/shared/ui/table_view:constants",
    "//ios/chrome/browser/signin/model:capabilities_types",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/ui/authentication/cells:constants",
    "//ios/chrome/browser/ui/authentication/signin:constants",
    "//ios/chrome/browser/ui/authentication/views:views_constants",
    "//ios/chrome/browser/ui/recent_tabs:recent_tabs_ui_constants",
    "//ios/chrome/browser/ui/settings:constants",
    "//ios/chrome/browser/ui/settings/google_services:constants",
    "//ios/chrome/browser/ui/settings/google_services/manage_accounts:constants",
    "//ios/chrome/common/ui/promo_style:constants",
    "//ios/chrome/test:eg_test_support+eg2",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ui/base",
  ]
}