| # Copyright 2025 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//extensions/buildflags/buildflags.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| source_set("themes") { |
| public = [ |
| "ntp_background_data.h", |
| "ntp_background_service.h", |
| "ntp_background_service_observer.h", |
| ] |
| sources = [ |
| "ntp_background_data.cc", |
| "ntp_background_service.cc", |
| ] |
| public_deps = [ |
| ":ntp_background_proto", |
| "//base", |
| "//components/image_fetcher/core", |
| "//components/keyed_service/core", |
| "//components/prefs", |
| "//components/signin/public/identity_manager", |
| "//net", |
| "//services/network/public/cpp", |
| "//skia", |
| "//ui/gfx:color_utils", |
| "//url", |
| ] |
| deps = [ |
| "//build:branding_buildflags", |
| "//components/application_locale_storage", |
| "//components/optimization_guide/core:features", |
| "//components/pref_registry", |
| "//components/search", |
| "//components/version_info", |
| "//ui/base:features", |
| "//ui/base/mojom", |
| "//ui/gfx", |
| "//ui/gfx/codec", |
| ] |
| } |
| |
| proto_library("ntp_background_proto") { |
| sources = [ "ntp_background.proto" ] |
| generate_python = false |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ "ntp_background_service_unittest.cc" ] |
| |
| deps = [ |
| ":themes", |
| "//base", |
| "//base/test:test_support", |
| "//components/application_locale_storage", |
| "//components/policy/core/browser", |
| "//components/prefs", |
| "//components/search", |
| "//components/version_info", |
| "//services/network:test_support", |
| "//services/network/public/cpp:cpp_base", |
| "//testing/gtest", |
| "//ui/base", |
| "//url", |
| ] |
| |
| if (is_win || is_mac || is_linux || is_ios) { |
| sources += [ "theme_color_policy_handler_unittest.cc" ] |
| deps += [ |
| ":policy", |
| ":prefs", |
| "//components/policy/core/browser", |
| "//components/prefs", |
| ] |
| } |
| |
| data = [ "//media/test/data/" ] |
| } |
| |
| if (is_win || is_mac || is_linux || is_ios) { |
| source_set("policy") { |
| public = [ "theme_color_policy_handler.h" ] |
| sources = [ "theme_color_policy_handler.cc" ] |
| deps = [ |
| ":prefs", |
| "//components/policy:generated", |
| "//components/policy:policy_code_generate", |
| "//components/policy/core/browser", |
| "//components/prefs", |
| "//components/strings", |
| "//skia", |
| "//third_party/re2", |
| ] |
| } |
| } |
| |
| source_set("prefs") { |
| public = [ "pref_names.h" ] |
| } |