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

65 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-12-10 05:59:24 +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"
function_registration("generated_api_registration") {
sources = schema_sources
impl_dir = "//extensions/shell/browser/api"
bundle_name = "Shell"
deps = [
"//extensions/common",
]
visibility = [ ":api" ]
}
generated_json_strings("generated_api_json_strings") {
sources = schema_sources
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_json_strings",
":generated_api_registration",
":generated_api_types",
]
}
group("extensions_features") {
public_deps = [
":shell_api_features",
"//extensions/common/api:extensions_features",
]
}