chromium/ios/chrome/browser/content_notification/model/BUILD.gn

# Copyright 2024 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("content_notification_service") {
  sources = [
    "content_notification_configuration.h",
    "content_notification_configuration.mm",
    "content_notification_service.h",
    "content_notification_service.mm",
  ]
  deps = [
    "//components/keyed_service/core:core",
    "//url:url",
  ]
}

source_set("content_notification_service_factory") {
  sources = [
    "content_notification_service_factory.h",
    "content_notification_service_factory.mm",
  ]
  deps = [
    ":content_notification_service",
    "//components/keyed_service/ios",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/signin/model",
    "//ios/public/provider/chrome/browser/content_notification:content_notification_api",
  ]
}

source_set("content_notification_client") {
  sources = [
    "content_notification_client.h",
    "content_notification_client.mm",
  ]
  deps = [
    ":content_notification_nau_configuration",
    ":content_notification_service",
    ":content_notification_service_factory",
    "//base",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/push_notification/model:constants",
    "//ios/chrome/browser/push_notification/model:push_notification_client",
    "//ui/base",
    "//url:url",
  ]

  frameworks = [ "UserNotifications.framework" ]
}

source_set("content_notification_nau_configuration") {
  sources = [
    "content_notification_nau_configuration.h",
    "content_notification_nau_configuration.mm",
    "content_notification_settings_action.h",
    "content_notification_settings_action.mm",
  ]
  deps = [
    "//base",
    "//ios/chrome/browser/push_notification/model:constants",
    "//ui/base",
    "//url:url",
  ]

  frameworks = [ "UserNotifications.framework" ]
}

source_set("util") {
  sources = [
    "content_notification_util.h",
    "content_notification_util.mm",
  ]
  deps = [
    ":constants",
    "//base",
    "//components/prefs",
    "//components/search_engines",
    "//ios/chrome/browser/metrics/model:constants",
    "//ios/chrome/browser/push_notification/model:constants",
    "//ios/chrome/browser/push_notification/model:push_notification_client",
    "//ios/chrome/browser/search_engines/model:template_url_service_factory",
    "//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/utils",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/signin/model",
  ]

  frameworks = [ "UserNotifications.framework" ]
}

source_set("constants") {
  sources = [
    "constants.h",
    "constants.mm",
  ]
  deps = []
  frameworks = [ "UserNotifications.framework" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "content_notification_client_unittest.mm",
    "content_notification_service_factory_unittest.mm",
  ]
  deps = [
    ":constants",
    ":content_notification_client",
    ":content_notification_service_factory",
    "//base",
    "//base/test:test_support",
    "//ios/chrome/browser/default_browser/model",
    "//ios/chrome/browser/default_browser/model:test_support",
    "//ios/chrome/browser/default_browser/model:utils",
    "//ios/chrome/browser/first_run/model",
    "//ios/chrome/browser/push_notification/model:constants",
    "//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/test:test_support",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/test:test_support",
    "//ios/testing:block_swizzler",
    "//third_party/ocmock",
  ]
}