1# Copyright (c) 2021 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/config/chrome_build.gni")
6import("//build_overrides/build.gni")
7
8declare_args() {
9  if (build_with_chromium) {
10    # devtools_location is used in DevTools to resolve to the correct location
11    # for any script/file referenced in the DevTools build scripts. Since
12    # DevTools supports both a standalone build and build integration with
13    # Chromium, we need to differentiate between the two versions.
14    # devtools_location points to the Chromium version in both Chrome-branded
15    # and not Chrome-branded builds. devtools_root_location points to the root
16    # of the Chrome-branded version when is_chrome_branded is true and to the root
17    # of the Chromium version when is_chrome_branded is false.
18    # devtools_grd_location is the location of the GRD file listing all DevTools
19    # resources.
20    if (is_chrome_branded) {
21      devtools_root_location = "third_party/devtools-frontend-internal"
22      devtools_location = "$devtools_root_location/devtools-frontend/"
23      devtools_grd_location =
24          "$devtools_root_location/chrome_devtools_resources.grd"
25    } else {
26      devtools_root_location = "third_party/devtools-frontend/src"
27      devtools_location = "third_party/devtools-frontend/src/"
28      devtools_grd_location =
29          "$devtools_root_location/front_end/devtools_resources.grd"
30    }
31  } else {
32    # DevTools is building a standalone version
33    devtools_location = ""
34    devtools_root_location = ""
35    devtools_grd_location = ""
36  }
37}
38