chromium/ios/chrome/browser/shared/coordinator/scene/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.

source_set("scene_state_observer") {
  sources = [ "scene_state_observer.h" ]

  frameworks = [ "UIKit.framework" ]
}

source_set("observing_scene_agent") {
  sources = [
    "observing_scene_state_agent.h",
    "observing_scene_state_agent.mm",
  ]

  frameworks = [ "UIKit.framework" ]

  public_deps = [
    "//ios/chrome/browser/shared/coordinator/scene:scene_state_header",
    "//ios/chrome/browser/shared/coordinator/scene:scene_state_observer",
  ]
}

source_set("scene_state_header") {
  sources = [
    "connection_information.h",
    "scene_controller.h",
    "scene_state.h",
    "scene_ui_provider.h",
  ]
  public_deps = [
    ":scene_state_observer",
    "//ios/chrome/app/application_delegate:tab_opening",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/ui/scoped_ui_blocker",
    "//ios/chrome/browser/window_activities/model",
  ]
}

source_set("scene_testing") {
  sources = [ "scene_controller_testing.h" ]
  frameworks = [ "UIKit.framework" ]
}

source_set("scene") {
  sources = [
    "scene_controller.mm",
    "scene_delegate.h",
    "scene_delegate.mm",
    "scene_state.mm",
  ]

  deps = [
    ":scene_util",
    "//base",
    "//components/autofill/core/browser",
    "//components/breadcrumbs/core",
    "//components/breadcrumbs/core:status",
    "//components/enterprise/idle",
    "//components/feature_engagement/public",
    "//components/infobars/core",
    "//components/policy/core/common",
    "//components/prefs",
    "//components/prefs/ios",
    "//components/previous_session_info",
    "//components/signin/public/base",
    "//components/signin/public/identity_manager",
    "//components/signin/public/identity_manager/objc",
    "//components/supervised_user/core/browser",
    "//components/supervised_user/core/browser:fetcher",
    "//components/supervised_user/core/browser/proto",
    "//components/url_formatter",
    "//components/version_info",
    "//components/web_resource",
    "//ios/chrome/app",
    "//ios/chrome/app:blocking_scene_commands",
    "//ios/chrome/app:mode",
    "//ios/chrome/app:tests_hook",
    "//ios/chrome/app/application_delegate:app_state_header",
    "//ios/chrome/app/application_delegate:tab_opening",
    "//ios/chrome/app/application_delegate:url_opener_params",
    "//ios/chrome/app/profile",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/app_store_rating/ui_bundled",
    "//ios/chrome/browser/app_store_rating/ui_bundled:features",
    "//ios/chrome/browser/appearance/ui_bundled",
    "//ios/chrome/browser/blocking_overlay/ui_bundled",
    "//ios/chrome/browser/browser_state_metrics/model",
    "//ios/chrome/browser/browser_view/ui_bundled",
    "//ios/chrome/browser/browsing_data/model",
    "//ios/chrome/browser/crash_report/model",
    "//ios/chrome/browser/crash_report/model:model_internal",
    "//ios/chrome/browser/crash_report/model/breadcrumbs",
    "//ios/chrome/browser/credential_provider_promo/ui_bundled:coordinator",
    "//ios/chrome/browser/default_browser/model",
    "//ios/chrome/browser/default_browser/model:default_browser_interest_signals",
    "//ios/chrome/browser/default_browser/model:utils",
    "//ios/chrome/browser/default_promo/ui_bundled:coordinator",
    "//ios/chrome/browser/enterprise/model/idle",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/first_run/model",
    "//ios/chrome/browser/first_run/ui_bundled",
    "//ios/chrome/browser/geolocation/model",
    "//ios/chrome/browser/history/ui_bundled:coordinator",
    "//ios/chrome/browser/incognito_interstitial/ui_bundled:coordinator",
    "//ios/chrome/browser/incognito_reauth/ui_bundled:incognito_reauth_scene_agent",
    "//ios/chrome/browser/infobars/model",
    "//ios/chrome/browser/intents:user_activity_browser_agent",
    "//ios/chrome/browser/mailto_handler/model",
    "//ios/chrome/browser/mailto_handler/model:mailto_handler_factory",
    "//ios/chrome/browser/main/model",
    "//ios/chrome/browser/metrics/model:metrics_browser_agent",
    "//ios/chrome/browser/ntp/model",
    "//ios/chrome/browser/ntp/ui_bundled:feature_flags",
    "//ios/chrome/browser/passwords/model",
    "//ios/chrome/browser/passwords/model:password_checkup_utils",
    "//ios/chrome/browser/policy/model",
    "//ios/chrome/browser/policy/model:policy_util",
    "//ios/chrome/browser/policy/ui_bundled:user_policy_scene_agent",
    "//ios/chrome/browser/policy/ui_bundled/idle:idle_timeout_policy_scene_agent",
    "//ios/chrome/browser/promos_manager/model:factory",
    "//ios/chrome/browser/promos_manager/model:features",
    "//ios/chrome/browser/reading_list/model",
    "//ios/chrome/browser/screenshot/model",
    "//ios/chrome/browser/sessions/model:session_restoration_service",
    "//ios/chrome/browser/sessions/model:session_restoration_service_factory",
    "//ios/chrome/browser/sessions/model:session_saving",
    "//ios/chrome/browser/shared/coordinator/default_browser_promo",
    "//ios/chrome/browser/shared/coordinator/layout_guide:layout_guide_scene_agent",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/paths",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/model/url",
    "//ios/chrome/browser/shared/model/url:constants",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/model/web_state_list:utils",
    "//ios/chrome/browser/shared/public/commands:commands",
    "//ios/chrome/browser/shared/public/features",
    "//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_manager",
    "//ios/chrome/browser/snapshots/model",
    "//ios/chrome/browser/start_surface/ui_bundled",
    "//ios/chrome/browser/start_surface/ui_bundled:feature_flags",
    "//ios/chrome/browser/tab_insertion/model",
    "//ios/chrome/browser/ui/authentication",
    "//ios/chrome/browser/ui/authentication/enterprise:enterprise_utils",
    "//ios/chrome/browser/ui/authentication/signin",
    "//ios/chrome/browser/ui/lens:lens_entrypoint",
    "//ios/chrome/browser/ui/main",
    "//ios/chrome/browser/ui/main:default_browser_scene_agent",
    "//ios/chrome/browser/ui/main:incognito_blocker_scene_agent",
    "//ios/chrome/browser/ui/main:scene",
    "//ios/chrome/browser/ui/promos_manager:promos_manager_scene_agent",
    "//ios/chrome/browser/ui/promos_manager:utils",
    "//ios/chrome/browser/ui/scoped_ui_blocker",
    "//ios/chrome/browser/ui/settings:settings_root",
    "//ios/chrome/browser/ui/settings/clear_browsing_data:features",
    "//ios/chrome/browser/ui/settings/password",
    "//ios/chrome/browser/ui/settings/password/password_checkup",
    "//ios/chrome/browser/ui/settings/sync",
    "//ios/chrome/browser/ui/settings/utils",
    "//ios/chrome/browser/ui/tab_switcher:utils",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid",
    "//ios/chrome/browser/ui/whats_new/promo",
    "//ios/chrome/browser/url_loading/model",
    "//ios/chrome/browser/web/model:page_placeholder",
    "//ios/chrome/browser/web_state_list/model:session_metrics",
    "//ios/chrome/browser/web_state_list/model/web_usage_enabler",
    "//ios/chrome/browser/window_activities/model",
    "//ios/chrome/common/ui/reauthentication",
    "//ios/chrome/common/ui/util",
    "//ios/public/provider/chrome/browser/signin:choice_api",
    "//ios/public/provider/chrome/browser/ui_utils:ui_utils_api",
    "//ios/public/provider/chrome/browser/user_feedback:user_feedback_api",
    "//ios/third_party/material_components_ios",
    "//ios/web/public/session",
    "//ios/web/public/session/proto",
    "//ui/base:base",
  ]
  public_deps = [ ":scene_state_header" ]
  allow_circular_includes_from = [
    # TODO(crbug.com/40139309): remove circular dependency.
    "//ios/chrome/browser/ui/settings/sync",
  ]

  frameworks = [ "UIKit.framework" ]
}

source_set("scene_util") {
  sources = [
    "scene_util.h",
    "scene_util.mm",
  ]
  deps = [ "//base" ]
  frameworks = [ "UIKit.framework" ]
}

source_set("scene_util_test_support") {
  testonly = true
  sources = [
    "scene_util_test_support.h",
    "scene_util_test_support.mm",
  ]
  frameworks = [ "UIKit.framework" ]
  deps = [
    "//ios/chrome/app/application_delegate:app_state_header",
    "//ios/chrome/browser/shared/coordinator/scene:scene_state_header",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "scene_controller_unittest.mm",
    "scene_util_unittest.mm",
  ]
  deps = [
    ":scene_state_header",
    ":scene_util",
    ":scene_util_test_support",
    "//base/test:test_support",
    "//components/signin/public/identity_manager:test_support",
    "//components/supervised_user/test_support",
    "//components/variations",
    "//components/variations:test_support",
    "//ios/chrome/app/application_delegate:app_state_header",
    "//ios/chrome/browser/bookmarks/model",
    "//ios/chrome/browser/favicon/model",
    "//ios/chrome/browser/history/model",
    "//ios/chrome/browser/intents:constants",
    "//ios/chrome/browser/intents:user_activity_browser_agent",
    "//ios/chrome/browser/prerender/model",
    "//ios/chrome/browser/search_engines/model:template_url_service_factory",
    "//ios/chrome/browser/sessions/model:session_restoration_service_factory",
    "//ios/chrome/browser/sessions/model:test_support",
    "//ios/chrome/browser/shared/coordinator/scene",
    "//ios/chrome/browser/shared/coordinator/scene:scene_testing",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/signin/model:test_support",
    "//ios/chrome/browser/sync/model",
    "//ios/chrome/browser/ui/main",
    "//ios/chrome/test:test_support",
    "//ios/public/provider/chrome/browser/user_feedback:user_feedback_api",
    "//ios/web/public/test",
    "//services/network:test_support",
    "//testing/gtest",
    "//third_party/ocmock",
  ]
}