naiveproxy/components/download/public/common/BUILD.gn
2018-08-11 05:35:24 +00:00

134 lines
3.2 KiB
Plaintext

# Copyright 2018 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.
import("//mojo/public/tools/bindings/mojom.gni")
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni") # For generate_jni().
}
config("components_download_implementation") {
defines = [ "COMPONENTS_DOWNLOAD_IMPLEMENTATION" ]
}
component("public") {
sources = [
"base_file.h",
"download_content.h",
"download_create_info.h",
"download_danger_type.h",
"download_destination_observer.cc",
"download_destination_observer.h",
"download_features.cc",
"download_features.h",
"download_file.h",
"download_file_factory.h",
"download_file_impl.h",
"download_interrupt_reason_values.h",
"download_interrupt_reasons.h",
"download_interrupt_reasons_utils.h",
"download_item.h",
"download_item_factory.cc",
"download_item_factory.h",
"download_item_impl.h",
"download_item_impl_delegate.h",
"download_job.h",
"download_job_factory.h",
"download_request_handle_interface.h",
"download_response_handler.h",
"download_save_info.cc",
"download_save_info.h",
"download_source.h",
"download_stats.h",
"download_task_runner.h",
"download_ukm_helper.h",
"download_url_loader_factory_getter.h",
"download_url_parameters.cc",
"download_url_parameters.h",
"download_utils.h",
"in_progress_download_manager.h",
"input_stream.cc",
"input_stream.h",
"parallel_download_configs.h",
"rate_estimator.h",
"resume_mode.h",
"stream_handle_input_stream.h",
"url_download_handler_factory.h",
]
configs += [ ":components_download_implementation" ]
public_deps = [
":interfaces",
]
deps = [
"//base",
"//components/download/downloader/in_progress",
"//components/download/internal/common:internal",
"//crypto",
"//net",
"//services/metrics/public/cpp:metrics_cpp",
"//services/network/public/cpp",
"//storage/browser",
"//ui/base",
]
allow_circular_includes_from = [
"//components/download/internal/common:internal",
"//components/download/downloader/in_progress",
]
}
if (is_android) {
android_library("public_java") {
srcjar_deps = [ ":jni_enums" ]
deps = [
"//base:base_java",
"//third_party/android_tools:android_support_annotations_java",
]
}
java_cpp_enum("jni_enums") {
sources = [
"download_item.h",
]
}
}
mojom("interfaces") {
sources = [
"download_stream.mojom",
]
export_class_attribute = "COMPONENTS_DOWNLOAD_EXPORT"
export_define = "COMPONENTS_DOWNLOAD_IMPLEMENTATION=1"
export_header = "components/download/public/common/download_export.h"
}
source_set("test_support") {
testonly = true
sources = [
"mock_download_file.cc",
"mock_download_file.h",
"mock_download_item.cc",
"mock_download_item.h",
"mock_download_item_impl.cc",
"mock_download_item_impl.h",
"mock_input_stream.cc",
"mock_input_stream.h",
]
public_deps = [
":public",
"//base",
"//net",
"//testing/gmock",
"//url",
]
}