# Copyright 2021 The Chromium Authors # 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") import("//ui/webui/webui_features.gni") assert(enable_webui_ntp) mojom("mojo_bindings") { sources = [ "new_tab_page_third_party.mojom" ] webui_module_path = "/" public_deps = [ "//skia/public/mojom", "//ui/webui/resources/cr_components/most_visited:mojom", ] } # The New Tab Page Third Party WebUI (other than its mojom bindings) is # desktop-only: it transitively requires desktop-only deps (themes, webui/ntp, # webui/util). Guard the non-mojom targets with !is_android so they are not # pulled into the desktop_android (is_desktop_android) build graph. if (!is_android) { # Thin public target providing headers without heavy deps. source_set("new_tab_page_third_party") { public = [ "new_tab_page_third_party_handler.h", "new_tab_page_third_party_ui.h", ] public_deps = [ ":mojo_bindings", "//chrome/browser:browser_public_dependencies", "//chrome/browser/themes", "//chrome/common", "//ui/webui", ] } # Full implementation target. source_set("impl") { sources = [ "new_tab_page_third_party_handler.cc", "new_tab_page_third_party_ui.cc", ] public_deps = [ "//chrome/browser:browser_public_dependencies" ] deps = [ ":mojo_bindings", ":new_tab_page_third_party", "//base", "//chrome/browser/profiles:profile", "//chrome/browser/resources/new_tab_page_third_party:resources", "//chrome/browser/themes", "//chrome/browser/ui/color:color_headers", "//chrome/browser/ui/search", "//chrome/browser/ui/webui:favicon_source", "//chrome/browser/ui/webui:theme_source", "//chrome/browser/ui/webui/cr_components/most_visited", "//chrome/browser/ui/webui/ntp:ntp_resource_cache", "//chrome/browser/ui/webui/page_not_available_for_guest", "//chrome/browser/ui/webui/util", "//chrome/common", "//components/favicon_base", "//components/prefs", "//components/search", "//content/public/browser", "//ui/color", "//ui/gfx:color_utils", "//ui/native_theme", "//ui/webui", ] } } # if (!is_android)