summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/extensions/api/BUILD.gn
blob: 7d8f6dffd43faad60b934caf1bbc92fa81f7414f (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
61
62
63
64
# Copyright 2018 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/extensions/api/api_sources.gni")
import("//chrome/common/features.gni")
import("//extensions/buildflags/buildflags.gni")
import("//tools/json_schema_compiler/json_schema_api.gni")

assert(enable_extensions,
       "Cannot depend on extensions because enable_extensions=false.")

function_registration("api_registration") {
  sources = chrome_extensions_api_schema_sources +
            chrome_extensions_api_uncompiled_sources
  impl_dir = "//chrome/browser/extensions/api"
  configs = [ "//build/config:precompiled_headers" ]
  bundle_name = "Chrome"
  root_namespace = chrome_extensions_api_root_namespace
  schema_include_rules = chrome_extensions_api_schema_include_rules

  deps = [
    # This is not directly included by the target, but specified here
    # to avoid cyclic dependency chain related to private_membership
    # protos.
    "//components/policy/proto",

    # Different APIs include headers from these targets.
    "//chrome/common",
    "//chrome/common:mojo_bindings",
    "//components/autofill/core/common/mojom:mojo_types",
    "//components/omnibox/browser",
    "//components/translate/core/browser",
    "//components/zoom",
    "//content/public/browser",
    "//extensions/browser",
    "//extensions/browser/api:api_implementations",
    "//extensions/common/api",

    # Different APIs include some headers from chrome/common that in turn
    # include generated headers from these targets.
    # TODO(brettw) this should be made unnecessary if possible.
    "//chrome/common/extensions/api",
    "//components/sync",
    "//skia",
    "//third_party/metrics_proto",
    "//ui/accessibility:ax_enums_mojo",
  ]
  if (is_chromeos) {
    deps += [ "//chrome/browser/chromeos/extensions:constants" ]
  }

  if (is_qtwebengine) {
    deps = []
    deps = [
      "//chrome/common/extensions/api",
      "//extensions/browser",
      "//extensions/browser/api:api_implementations",
      "//extensions/common/api",
      "//qtwebengine/common:mojo_bindings",
      "//third_party/blink/public/mojom:mojom_platform",
    ]
  }
}