BUILD.gn 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright 2018 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. import("//extensions/buildflags/buildflags.gni")
  5. import("//tools/json_schema_compiler/json_schema_api.gni")
  6. assert(enable_extensions,
  7. "Cannot depend on extensions because enable_extensions=false.")
  8. function_registration("api_registration") {
  9. sources = [
  10. "//electron/shell/common/extensions/api/extension.json",
  11. "//electron/shell/common/extensions/api/i18n.json",
  12. "//electron/shell/common/extensions/api/resources_private.idl",
  13. "//electron/shell/common/extensions/api/tabs.json",
  14. ]
  15. impl_dir = "//electron/shell/browser/extensions/api"
  16. configs = [ "//build/config:precompiled_headers" ]
  17. bundle_name = "Electron"
  18. root_namespace = "extensions::api::%(namespace)s"
  19. schema_include_rules = "extensions/common/api:extensions::api::%(namespace)s"
  20. deps = [
  21. # Different APIs include headers from these targets.
  22. "//components/zoom",
  23. "//content/public/browser",
  24. "//extensions/browser",
  25. # Different APIs include some headers from chrome/common that in turn
  26. # include generated headers from these targets.
  27. # TODO(brettw) this should be made unnecessary if possible.
  28. "//electron/shell/common/extensions/api",
  29. ]
  30. deps += [ "//extensions/common/api" ]
  31. }