chromium/ios/chrome/browser/discover_feed/model/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("model") {
  sources = [
    "discover_feed_configuration.h",
    "discover_feed_configuration.mm",
    "discover_feed_experiments_tracker.h",
    "discover_feed_experiments_tracker.mm",
    "discover_feed_observer.h",
    "discover_feed_observer_bridge.h",
    "discover_feed_observer_bridge.mm",
    "discover_feed_service.h",
    "discover_feed_service.mm",
    "discover_feed_view_controller_configuration.h",
    "discover_feed_view_controller_configuration.mm",
    "feed_model_configuration.h",
    "feed_model_configuration.mm",
  ]
  deps = [
    "//components/feed/core/v2/public/ios:feed_ios_public",
    "//components/keyed_service/core",
    "//components/search_engines",
    "//components/variations:variations",
    "//ios/chrome/browser/metrics/model:accessor",
    "//ios/chrome/browser/search_engines/model:template_url_service_factory",
    "//ios/public/provider/chrome/browser/signin:signin_sso_api",
  ]
  public_deps = [
    ":constants",
    ":discover_feed_refresher",
    "//base",
  ]
  frameworks = [ "UIKit.framework" ]
}

# This is a separate target because the factory depends on the provider
# and the provider depends on the declaration of the service (since it
# provides an implementation). Using separate targets prevents circular
# dependencies.
source_set("discover_feed_factory") {
  sources = [
    "discover_feed_service_factory.h",
    "discover_feed_service_factory.mm",
  ]
  deps = [
    ":model",
    "//base",
    "//components/keyed_service/ios",
    "//components/signin/public/identity_manager",
    "//ios/chrome/browser/ntp/shared/metrics",
    "//ios/chrome/browser/search_engines/model:template_url_service_factory",
    "//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/chrome/browser/sync/model",
    "//ios/public/provider/chrome/browser/discover_feed:discover_feed_api",
  ]
}

source_set("constants") {
  sources = [
    "feed_constants.h",
    "feed_constants.mm",
  ]
}

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