summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/net_internals/BUILD.gn
blob: a783fed3bbee76f50c4578124f8c4b36c181d750 (plain)
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
# Copyright 2019 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

import("//chrome/common/features.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_if_expr.gni")
import("//ui/webui/resources/tools/generate_grd.gni")

preprocess_folder = "preprocessed"
preprocess_manifest = "preprocessed_manifest.json"

grit("resources") {
  defines = chrome_grit_defines

  enable_input_discovery_for_gn_analyze = false
  source = "$target_gen_dir/resources.grd"
  deps = [ ":build_grd" ]
  outputs = [
    "grit/net_internals_resources.h",
    "grit/net_internals_resources_map.h",
    "grit/net_internals_resources_map.cc",
    "net_internals_resources.pak",
  ]
  output_dir = "$root_gen_dir/chrome"
}

generate_grd("build_grd") {
  grd_prefix = "net_internals"
  out_grd = "$target_gen_dir/resources.grd"
  input_files = [
    "browser_bridge.js",
    "chromeos_view.js",
    "dns_view.js",
    "domain_security_policy_view.js",
    "events_view.js",
    "index.js",
    "main.css",
    "proxy_view.js",
    "sockets_view.js",
    "tab_switcher_view.js",
    "util.js",
    "view.js",
  ]
  input_files_base_dir = rebase_path(".", "//")
  deps = [ ":preprocess" ]
  manifest_files = [ "$target_gen_dir/$preprocess_manifest" ]
}

preprocess_if_expr("preprocess") {
  out_folder = "$target_gen_dir/$preprocess_folder"
  out_manifest = "$target_gen_dir/$preprocess_manifest"
  in_files = [
    "index.html",
    "main.js",
  ]
}