summaryrefslogtreecommitdiffstats
path: root/chrome/browser/BUILD.gn
blob: 60494156048aa85f60ac07cef47fefcf2a6e961b (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
58
59
60
# Copyright 2014 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("//tools/grit/grit_rule.gni")

about_credits_file = "$target_gen_dir/about_credits.html"
additional_modules_list_file =
    "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt"

# GYP version: chrome/chrome_resources.gyp:chrome_resources
# (generate_browser_resources action)
grit("resources") {
  source = "browser_resources.grd"

  omnibox_mojom_file = "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js"

  grit_flags = [
    "-E", "about_credits_file=" +
          rebase_path(about_credits_file, root_build_dir),
    "-E", "additional_modules_list_file=" +
          rebase_path(additional_modules_list_file, root_build_dir),
    "-E", "omnibox_mojom_file=" +
          rebase_path(omnibox_mojom_file, root_build_dir),
  ]

  deps = [
    ":about_credits",
    ":chrome_internal_resources_gen",
    "//chrome/browser/ui/webui/omnibox:mojo_bindings",
  ]
}

# GYP version: chrome/chrome_resource.gyp:about_credits
action("about_credits") {
  script = "//tools/licenses.py"

  # TODO(phajdan.jr): input dependencies so this can be regenerated
  # automatically when one of the credits changes. The way this should work is
  # that licenses.py should write a .d file listing the input dependencies (see
  # "depfile" in GN).
  outputs = [ about_credits_file ]

  args = [
    "credits",
    rebase_path(about_credits_file, root_build_dir),
  ]
}

# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen
# TODO(GYP) write internal action
if (false) {  #if (is_chrome_branded) {
  action("chrome_internal_resources_gen") {
    # TODO(GYP)
  }
} else {
  group("chrome_internal_resources_gen") {
    # Empty placeholder.
  }
}