Avi Drissman | 3e1a26c | 2022-09-15 20:26:03 | [diff] [blame] | 1 | # Copyright 2018 The Chromium Authors |
Kyle Horimoto | 8ef9b002 | 2018-03-07 19:35:19 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
Thomas Lukaszewicz | a8a6984f | 2025-03-13 01:53:36 | [diff] [blame] | 5 | import("//build/buildflag_header.gni") |
| 6 | import("//ui/webui/webui_features.gni") |
| 7 | |
Kyle Horimoto | 8ef9b002 | 2018-03-07 19:35:19 | [diff] [blame] | 8 | static_library("webui") { |
| 9 | sources = [ |
| 10 | "mojo_web_ui_controller.cc", |
| 11 | "mojo_web_ui_controller.h", |
Giovanni Ortuño Urquidi | 019a236 | 2020-12-15 05:06:40 | [diff] [blame] | 12 | "untrusted_web_ui_controller.cc", |
| 13 | "untrusted_web_ui_controller.h", |
| 14 | "untrusted_web_ui_controller_factory.cc", |
| 15 | "untrusted_web_ui_controller_factory.h", |
Jiewei Qian | 937a80b | 2020-05-11 04:22:14 | [diff] [blame] | 16 | "webui_allowlist.cc", |
| 17 | "webui_allowlist.h", |
| 18 | "webui_allowlist_provider.cc", |
| 19 | "webui_allowlist_provider.h", |
Teresa Mao | 268fce2 | 2024-12-18 09:20:40 | [diff] [blame] | 20 | "webui_util.cc", |
| 21 | "webui_util.h", |
Kyle Horimoto | 8ef9b002 | 2018-03-07 19:35:19 | [diff] [blame] | 22 | ] |
| 23 | |
| 24 | deps = [ |
| 25 | "//base", |
Jiewei Qian | 937a80b | 2020-05-11 04:22:14 | [diff] [blame] | 26 | "//components/content_settings/core/browser", |
Kyle Horimoto | 8ef9b002 | 2018-03-07 19:35:19 | [diff] [blame] | 27 | "//content/public/browser", |
Kyle Horimoto | 8ef9b002 | 2018-03-07 19:35:19 | [diff] [blame] | 28 | "//services/service_manager/public/cpp", |
dpapad | aaac8a06 | 2024-12-20 19:10:37 | [diff] [blame] | 29 | "//ui/webui/resources:resources_grit", |
Kyle Horimoto | 8ef9b002 | 2018-03-07 19:35:19 | [diff] [blame] | 30 | ] |
dpapad | c996ee5 | 2022-03-28 08:10:46 | [diff] [blame] | 31 | |
Keren Zhu | f985a6b | 2022-05-11 14:14:42 | [diff] [blame] | 32 | public_deps = [ |
Teresa Mao | 268fce2 | 2024-12-18 09:20:40 | [diff] [blame] | 33 | "//ui/base", |
Keren Zhu | f985a6b | 2022-05-11 14:14:42 | [diff] [blame] | 34 | "//ui/webui/resources/js/browser_command:mojo_bindings", |
| 35 | "//ui/webui/resources/js/metrics_reporter:mojo_bindings", |
| 36 | ] |
dpapad | c996ee5 | 2022-03-28 08:10:46 | [diff] [blame] | 37 | |
| 38 | if (!is_android && !is_ios) { |
| 39 | public_deps += [ |
| 40 | "//ui/webui/resources/cr_components/color_change_listener:mojom", |
Riley Tatum | 41f429d | 2023-06-06 06:57:44 | [diff] [blame] | 41 | "//ui/webui/resources/cr_components/customize_color_scheme_mode:mojom", |
Marlon Facey | 18a7d7d | 2022-05-09 21:22:29 | [diff] [blame] | 42 | "//ui/webui/resources/cr_components/history_clusters:mojo_bindings", |
dpapad | c996ee5 | 2022-03-28 08:10:46 | [diff] [blame] | 43 | "//ui/webui/resources/cr_components/most_visited:mojom", |
Riley Tatum | 687eb0f | 2023-07-28 13:09:37 | [diff] [blame] | 44 | "//ui/webui/resources/cr_components/theme_color_picker:mojom", |
dpapad | c996ee5 | 2022-03-28 08:10:46 | [diff] [blame] | 45 | ] |
Meredith Lane | dce700c | 2022-09-02 04:18:18 | [diff] [blame] | 46 | sources += [ |
| 47 | "color_change_listener/color_change_handler.cc", |
| 48 | "color_change_listener/color_change_handler.h", |
| 49 | ] |
dpapad | c996ee5 | 2022-03-28 08:10:46 | [diff] [blame] | 50 | } |
Kyle Horimoto | 8ef9b002 | 2018-03-07 19:35:19 | [diff] [blame] | 51 | } |
Giovanni Ortuño Urquidi | 019a236 | 2020-12-15 05:06:40 | [diff] [blame] | 52 | |
Thomas Lukaszewicz | a8a6984f | 2025-03-13 01:53:36 | [diff] [blame] | 53 | buildflag_header("buildflags") { |
| 54 | header = "buildflags.h" |
| 55 | flags = |
| 56 | [ "ENABLE_WEBUI_GENERATE_CODE_CACHE=$enable_webui_generate_code_cache" ] |
| 57 | } |
| 58 | |
Giovanni Ortuño Urquidi | 019a236 | 2020-12-15 05:06:40 | [diff] [blame] | 59 | source_set("test_support") { |
| 60 | testonly = true |
| 61 | |
| 62 | sources = [ |
| 63 | "untrusted_web_ui_browsertest_util.cc", |
| 64 | "untrusted_web_ui_browsertest_util.h", |
| 65 | ] |
| 66 | |
| 67 | deps = [ |
| 68 | ":webui", |
| 69 | "//base", |
| 70 | "//content/public/browser", |
| 71 | "//content/test:test_support", |
| 72 | ] |
| 73 | } |