| # Copyright 2016 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. |
| |
| if (is_android) { |
| import("//build/config/android/rules.gni") |
| } |
| |
| static_library("core") { |
| sources = [ |
| "cached_image_fetcher.cc", |
| "cached_image_fetcher.h", |
| "image_data_fetcher.cc", |
| "image_data_fetcher.h", |
| "image_decoder.h", |
| "image_fetcher.cc", |
| "image_fetcher.h", |
| "image_fetcher_impl.cc", |
| "image_fetcher_impl.h", |
| "image_fetcher_service.cc", |
| "image_fetcher_service.h", |
| "image_fetcher_types.h", |
| "request_metadata.cc", |
| "request_metadata.h", |
| ] |
| deps = [ |
| ":metrics", |
| "cache", |
| ] |
| public_deps = [ |
| "//base", |
| "//components/data_use_measurement/core", |
| "//components/keyed_service/core", |
| "//net", |
| "//services/network/public/cpp", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| "//url", |
| ] |
| } |
| |
| static_library("metrics") { |
| sources = [ |
| "image_fetcher_metrics_reporter.cc", |
| "image_fetcher_metrics_reporter.h", |
| ] |
| public_deps = [ |
| "//base", |
| ] |
| } |
| |
| static_library("test_support") { |
| testonly = true |
| sources = [ |
| "fake_image_decoder.cc", |
| "fake_image_decoder.h", |
| "mock_image_decoder.cc", |
| "mock_image_decoder.h", |
| "mock_image_fetcher.cc", |
| "mock_image_fetcher.h", |
| ] |
| public_deps = [ |
| ":core", |
| "//services/network:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/gfx:test_support", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "cached_image_fetcher_unittest.cc", |
| "image_data_fetcher_unittest.cc", |
| "image_fetcher_impl_unittest.cc", |
| "image_fetcher_metrics_reporter_unittest.cc", |
| "request_metadata_unittest.cc", |
| ] |
| deps = [ |
| ":core", |
| ":metrics", |
| ":test_support", |
| "cache", |
| "cache:cache_unit_tests", |
| "cache/proto", |
| "//components/leveldb_proto:test_support", |
| "//components/prefs:test_support", |
| "//net", |
| "//net:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/gfx:test_support", |
| ] |
| } |
| |
| if (is_android) { |
| java_cpp_enum("java_enums_srcjar") { |
| sources = [ |
| "image_fetcher_metrics_reporter.h", |
| "image_fetcher_service.h", |
| ] |
| } |
| } |