chromium/components/site_engagement/content/BUILD.gn

# Copyright 2020 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") {
  sources = [
    "engagement_type.h",
    "site_engagement_helper.cc",
    "site_engagement_helper.h",
    "site_engagement_metrics.cc",
    "site_engagement_metrics.h",
    "site_engagement_observer.cc",
    "site_engagement_observer.h",
    "site_engagement_score.cc",
    "site_engagement_score.h",
    "site_engagement_service.cc",
    "site_engagement_service.h",
  ]

  deps = [
    "//base",
    "//components/browsing_data/core",
    "//components/content_settings/core/browser",
    "//components/content_settings/core/common",
    "//components/no_state_prefetch/browser",
    "//components/no_state_prefetch/common",
    "//components/permissions",
    "//components/prefs",
    "//components/security_state/core",
    "//components/site_engagement/core",
    "//components/site_engagement/core/mojom:mojo_bindings",
    "//components/user_prefs",
    "//components/variations",
    "//components/webapps/browser:webapps_client",
    "//components/webapps/common",
    "//content/public/browser",
    "//third_party/blink/public/mojom:mojom_platform_headers",
    "//url",
  ]

  if (is_android) {
    sources += [
      "android/site_engagement_service_android.cc",
      "android/site_engagement_service_android.h",
    ]

    deps += [ "//components/site_engagement/content/android:jni_headers" ]
  }
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "site_engagement_helper_unittest.cc",
    "site_engagement_score_unittest.cc",
  ]
  deps = [
    ":content",
    "//base",
    "//base/test:test_support",
    "//components/permissions:test_support",
    "//components/prefs:test_support",
    "//components/site_engagement/core/mojom:mojo_bindings",
    "//components/user_prefs:user_prefs",
    "//content/test:test_support",
    "//testing/gtest",
  ]
}