# Copyright 2016 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 = [
"favicon_web_state_dispatcher_impl.h",
"favicon_web_state_dispatcher_impl.mm",
"offline_page_tab_helper.h",
"offline_page_tab_helper.mm",
"offline_url_utils.h",
"offline_url_utils.mm",
"reading_list_browser_agent.h",
"reading_list_browser_agent.mm",
"reading_list_distiller_page.h",
"reading_list_distiller_page.mm",
"reading_list_distiller_page_factory.h",
"reading_list_distiller_page_factory.mm",
"reading_list_download_service.h",
"reading_list_download_service.mm",
"reading_list_download_service_factory.h",
"reading_list_download_service_factory.mm",
"reading_list_model_factory.h",
"reading_list_model_factory.mm",
"reading_list_web_state_observer.h",
"reading_list_web_state_observer.mm",
"url_downloader.h",
"url_downloader.mm",
]
deps = [
":constants",
"//base",
"//components/browser_sync",
"//components/dom_distiller/ios",
"//components/favicon/core",
"//components/favicon/ios",
"//components/google/core/common",
"//components/keyed_service/core",
"//components/keyed_service/ios",
"//components/pref_registry",
"//components/prefs",
"//components/reading_list/core",
"//components/reading_list/ios",
"//components/sync",
"//components/ukm/ios:ukm_url_recorder",
"//ios/chrome/app/strings:ios_strings_grit",
"//ios/chrome/browser/favicon/model",
"//ios/chrome/browser/history/model",
"//ios/chrome/browser/ntp/shared/metrics:home_metrics",
"//ios/chrome/browser/shared/model/application_context",
"//ios/chrome/browser/shared/model/browser",
"//ios/chrome/browser/shared/model/browser_state",
"//ios/chrome/browser/shared/model/paths",
"//ios/chrome/browser/shared/model/profile",
"//ios/chrome/browser/shared/model/url:constants",
"//ios/chrome/browser/shared/model/web_state_list",
"//ios/chrome/browser/shared/public/commands",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/shared/public/features:system_flags",
"//ios/chrome/browser/shared/ui/util",
"//ios/chrome/browser/shared/ui/util:snackbar_util",
"//ios/chrome/browser/shared/ui/util:url_with_title",
"//ios/chrome/browser/signin/model",
"//ios/chrome/browser/sync/model:data_type_store_service_factory",
"//ios/chrome/common",
"//ios/components/webui:url_constants",
"//ios/third_party/material_components_ios",
"//ios/web/common",
"//ios/web/public",
"//ios/web/public/js_messaging:js_messaging",
"//ios/web/public/security",
"//net",
"//services/metrics/public/cpp:ukm_builders",
"//services/network/public/cpp",
"//services/network/public/mojom",
"//ui/base",
"//url",
]
public_deps = [ "//ios/chrome/browser/dom_distiller/model" ]
}
source_set("reading_list_remover") {
sources = [
"reading_list_remover_helper.h",
"reading_list_remover_helper.mm",
]
deps = [
":model",
"//base",
"//components/reading_list/core",
"//ios/chrome/browser/shared/model/browser_state",
"//ios/chrome/browser/shared/model/profile",
]
public_deps = [
# This is required because this target includes
# reading_list_download_service.h from :reading_list that includes
# a protobuf header from dom_distiller.
# the inclusion of reading_list_download_service.h is allowed using
# allow_circular_includes_from.
"//ios/chrome/browser/dom_distiller/model",
]
}
source_set("constants") {
sources = [
"reading_list_constants.h",
"reading_list_constants.mm",
]
}
source_set("test_support") {
testonly = true
sources = [
"reading_list_test_utils.cc",
"reading_list_test_utils.h",
]
deps = [
"//base",
"//components/reading_list/core:test_support",
"//components/sync/base",
"//components/sync/model",
]
public_deps = [
"//components/keyed_service/core",
"//components/reading_list/core",
"//ios/web/public",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"favicon_web_state_dispatcher_impl_unittest.mm",
"offline_page_tab_helper_unittest.mm",
"offline_url_utils_unittest.mm",
"reading_list_browser_agent_unittest.mm",
"reading_list_web_state_observer_unittest.mm",
"url_downloader_unittest.mm",
]
deps = [
":distilled_bundle_data",
":model",
":test_support",
"//base",
"//base/test:test_support",
"//components/favicon/ios",
"//components/prefs:test_support",
"//components/reading_list/core",
"//components/reading_list/core:test_support",
"//components/sync/base",
"//components/sync/model",
"//ios/chrome/browser/dom_distiller/model",
"//ios/chrome/browser/shared/model/browser/test:test_support",
"//ios/chrome/browser/shared/model/paths",
"//ios/chrome/browser/shared/model/prefs:browser_prefs",
"//ios/chrome/browser/shared/model/profile/test",
"//ios/chrome/browser/shared/public/commands",
"//ios/chrome/test:test_support",
"//ios/web",
"//ios/web/public",
"//ios/web/public/test",
"//ios/web/public/test/fakes",
"//net",
"//services/network:test_support",
"//testing/gtest",
"//third_party/ocmock",
"//url",
]
}
bundle_data("distilled_bundle_data") {
testonly = true
sources = [ "data/distilled.html" ]
outputs = [
"{{bundle_resources_dir}}/ios/testing/data/Offline/{{source_file_part}}",
]
}