naiveproxy/extensions/shell/common/api/BUILD.gn

68 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-08-15 01:19:20 +03:00
# 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("//extensions/buildflags/buildflags.gni")
import("//tools/json_schema_compiler/json_features.gni")
import("//tools/json_schema_compiler/json_schema_api.gni")
assert(enable_extensions,
"Cannot depend on extensions because enable_extensions=false.")
# TODO(devlin): Enforce visibility restrictions on more of these targets?
schema_sources = [ "identity.idl" ]
root_namespace = "extensions::shell::api::%(namespace)s"
json_schema_api("generated_api_registration_bundle") {
sources = schema_sources
impl_dir = "//extensions/shell/browser/api"
bundle_registration = true
bundle_name = "Shell"
deps = [
"//extensions/common",
]
visibility = [ ":api" ]
}
json_schema_api("generated_api_strings_bundle") {
sources = schema_sources
bundle = true
bundle_name = "Shell"
visibility = [ ":api" ]
}
generated_types("generated_api_types") {
sources = schema_sources
visibility = [ ":api" ]
}
json_features("shell_api_features") {
feature_type = "APIFeature"
method_name = "AddShellAPIFeatures"
sources = [
"_api_features.json",
]
}
# Public Targets
group("api") {
public_deps = [
":generated_api_registration_bundle",
":generated_api_strings_bundle",
":generated_api_types",
]
}
group("extensions_features") {
public_deps = [
":shell_api_features",
"//extensions/common/api:extensions_features",
]
}