File: BUILD.gn

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (143 lines) | stat: -rw-r--r-- 3,806 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chrome/common/features.gni")
import("//chromeos/dbus/config/use_real_dbus_clients.gni")
import("//components/safe_browsing/buildflags.gni")
import("//components/signin/features.gni")
import("//extensions/buildflags/buildflags.gni")
import("//tools/metrics/generate_allowlist_from_histograms_file.gni")

generate_allowlist_from_histograms_file("webui_url_hashes") {
  namespace = "webui_metrics"
  input_xml_file = "//tools/metrics/histograms/metadata/ui/enums.xml"
  tag = "enum"
  output_file = "webui_url_hashes.h"
  allow_list_name = "WebUIUrlHashes"
}

source_set("configs") {
  sources = [
    "chrome_untrusted_web_ui_configs.cc",
    "chrome_untrusted_web_ui_configs.h",
    "chrome_web_ui_configs.cc",
    "chrome_web_ui_configs.h",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]

  if (!is_android) {
    public_deps = [
      "//chrome/browser/ui/tabs/tab_group_home",
      "//chrome/browser/ui/webui/commerce",
    ]
  }

  deps = [
    ":webui",
    "//chrome/browser/optimization_guide:optimization_guide",
    "//chrome/browser/ui",
    "//chrome/browser/ui/webui/about",
    "//chrome/browser/ui/webui/accessibility",
    "//chrome/browser/ui/webui/autofill_and_password_manager_internals",
    "//chrome/browser/ui/webui/internal_debug_pages_disabled",
    "//components/compose:buildflags",
    "//components/lens:buildflags",
    "//components/security_interstitials/content:security_interstitial_page",
    "//content/public/browser",
    "//extensions/buildflags:buildflags",
    "//printing/buildflags",
    "//skia",
    "//third_party/abseil-cpp:absl",
  ]

  if (!is_android) {
    deps += [
      "//chrome/browser/ui/webui/access_code_cast",
      "//chrome/browser/ui/webui/actor_internals",
      "//chrome/browser/ui/webui/app_service_internals",
      "//chrome/browser/ui/webui/infobar_internals",
      "//chrome/browser/ui/webui/new_tab_footer",
      "//chrome/browser/ui/webui/privacy_sandbox",
    ]

    if (!is_chromeos) {
      deps += [ "//chrome/browser/ui/webui/app_home" ]
    }
  }

  if (safe_browsing_mode != 0) {
    deps += [ "//chrome/browser/ui/webui/safe_browsing" ]
  }

  if (is_win || is_mac || is_linux || is_chromeos) {
    deps += [
      "//chrome/browser/ui/lens",
      "//chrome/browser/ui/views/side_panel",
      "//chrome/browser/ui/webui/signin",
    ]

    if (!is_chromeos) {
      deps += [
        "//chrome/browser/ui/webui/app_settings",
        "//chrome/browser/ui/webui/signin:profile",
        "//chrome/browser/ui/webui/whats_new",
      ]
    }
  }

  if (is_chromeos) {
    deps += [
      "//chrome/browser/ui/webui/ash/config",
      "//chromeos/constants",
    ]
  }

  if (enable_dice_support) {
    deps += [ "//chrome/browser/ui/webui/signin/signout_confirmation:signout_confirmation" ]
  }

  if (enable_glic) {
    deps += [ "//chrome/browser/glic" ]
  }
}

source_set("webui") {
  sources = [
    "constrained_web_dialog_ui.cc",
    "constrained_web_dialog_ui.h",
    "current_channel_logo.cc",
    "current_channel_logo.h",
  ]

  sources += get_target_outputs(":webui_url_hashes")

  public_deps = [ "//content/public/browser" ]

  deps = [
    ":webui_url_hashes",
    "//chrome/common",
    "//extensions/buildflags",
  ]
  if (enable_extensions_core) {
    deps += [ "//chrome/browser/extensions" ]
  }
  if (!is_android) {
    deps += [ "//ui/web_dialogs" ]
  }
}

if (!is_android) {
  source_set("webui_util") {
    sources = [
      "webui_embedding_context.cc",
      "webui_embedding_context.h",
    ]

    deps = [
      "//chrome/browser/ui/browser_window:browser_window",
      "//chrome/browser/ui/tabs:tabs_public",
    ]
  }
}