blob: e20a4add243f8118d0988062e413d21ce63da5ce [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# GYP version: components/dom_distiller.gypi:dom_distiller_core
static_library("core") {
sources = [
"../android/component_jni_registrar.cc",
"../android/component_jni_registrar.h",
"article_distillation_update.cc",
"article_distillation_update.h",
"article_entry.cc",
"article_entry.h",
"distilled_content_store.cc",
"distilled_content_store.h",
"distiller.cc",
"distiller.h",
"distiller_page.cc",
"distiller_page.h",
"distilled_page_prefs.cc",
"distilled_page_prefs.h",
"distilled_page_prefs_android.cc",
"distilled_page_prefs_android.h",
"distiller_url_fetcher.cc",
"distiller_url_fetcher.h",
"dom_distiller_constants.cc",
"dom_distiller_constants.h",
"dom_distiller_model.cc",
"dom_distiller_model.h",
"dom_distiller_observer.h",
"dom_distiller_service.cc",
"dom_distiller_service.h",
"dom_distiller_store.cc",
"dom_distiller_store.h",
"feedback_reporter.cc",
"feedback_reporter.h",
"task_tracker.cc",
"task_tracker.h",
"url_constants.cc",
"url_constants.h",
"url_utils_android.cc",
"url_utils_android.h",
"url_utils.cc",
"url_utils.h",
"viewer.cc",
"viewer.h",
]
public_deps = [
"//components/dom_distiller/core/proto",
"//third_party/dom_distiller_js:proto",
]
deps = [
"//base",
"//components/leveldb_proto",
"//components/resources",
"//components/strings",
"//net",
"//skia",
"//sync",
"//ui/base",
"//url",
]
if (is_android) {
deps += [ ":jni_headers" ]
}
}
# GYP version: components/dom_distiller.gypi:dom_distiller_test_support
static_library("test_support") {
testonly = true
sources = [
"dom_distiller_test_util.cc",
"dom_distiller_test_util.h",
"fake_distiller.cc",
"fake_distiller.h",
"fake_distiller_page.cc",
"fake_distiller_page.h",
]
deps = [
":core",
"//components/leveldb_proto:test_support",
"//sync",
"//testing/gmock",
"//testing/gtest",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"article_entry_unittest.cc",
"distilled_content_store_unittest.cc",
"distilled_page_prefs_unittests.cc",
"distiller_unittest.cc",
"distiller_url_fetcher_unittest.cc",
"dom_distiller_model_unittest.cc",
"dom_distiller_service_unittest.cc",
"dom_distiller_store_unittest.cc",
"task_tracker_unittest.cc",
"url_utils_unittest.cc",
"viewer_unittest.cc",
]
deps = [
":core",
":test_support",
"//testing/gmock",
"//testing/gtest",
]
}
if (is_android) {
import("//build/config/android/rules.gni")
generate_jni("jni_headers") {
sources = [
"../android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java",
"../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java",
"../android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java",
]
jni_package = "dom_distiller_core"
}
}