chromium/chrome/services/mac_notifications/BUILD.gn

# Copyright 2021 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("mac_notifications") {
  sources = [
    "mac_notification_provider_impl.h",
    "mac_notification_provider_impl.mm",
    "mac_notification_service_ns.h",
    "mac_notification_service_ns.mm",
    "mac_notification_service_un.h",
    "mac_notification_service_un.mm",
    "mac_notification_service_utils.h",
    "mac_notification_service_utils.mm",
    "notification_category_manager.h",
    "notification_category_manager.mm",
    "un_user_notifications_spi.h",
    "unnotification_metrics.h",
    "unnotification_metrics.mm",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]

  deps = [
    "//base",
    "//chrome/app:generated_resources",
    "//chrome/common:chrome_features",
    "//chrome/common/notifications",
    "//ui/base",
    "//ui/gfx",
  ]

  public_deps = [
    "//chrome/services/mac_notifications/public/cpp",
    "//chrome/services/mac_notifications/public/mojom",
    "//mojo/public/mojom/base",
  ]

  frameworks = [
    "UserNotifications.framework",
    "Foundation.framework",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "mac_notification_service_ns_unittest.mm",
    "mac_notification_service_un_unittest.mm",
    "notification_category_manager_unittest.mm",
    "notification_test_utils_mac.h",
    "notification_test_utils_mac.mm",
  ]

  deps = [
    ":mac_notifications",
    "//base",
    "//base/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/ocmock",
  ]

  frameworks = [
    "UserNotifications.framework",
    "Foundation.framework",
  ]
}