blob: 98ecbe8116486435844307a6dc9f9cf58b52ebb7 [file] [log] [blame]
# Copyright 2018 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("//build/config/features.gni")
import("//chrome/common/apps/platform_apps/api/api_sources.gni")
import("//extensions/buildflags/buildflags.gni")
import("//tools/json_schema_compiler/json_schema_api.gni")
assert(enable_extensions)
function_registration("api_registration") {
sources = chrome_apps_api_schema_files + chrome_apps_uncompiled_schema_files
impl_dir = "//chrome/browser/apps/platform_apps/api"
configs = [ "//build/config:precompiled_headers" ]
bundle_name = "ChromeApps"
root_namespace = apps_api_root_namespace
deps = [
"//chrome/browser/apps/platform_apps/api",
"//extensions/browser",
]
}
source_set("api") {
sources = [
"browser/browser_api.cc",
"browser/browser_api.h",
"media_galleries/blob_data_source_factory.cc",
"media_galleries/blob_data_source_factory.h",
"media_galleries/media_galleries_api.cc",
"media_galleries/media_galleries_api.h",
"media_galleries/media_galleries_api_util.cc",
"media_galleries/media_galleries_api_util.h",
"sync_file_system/extension_sync_event_observer.cc",
"sync_file_system/extension_sync_event_observer.h",
"sync_file_system/sync_file_system_api.cc",
"sync_file_system/sync_file_system_api.h",
"sync_file_system/sync_file_system_api_helpers.cc",
"sync_file_system/sync_file_system_api_helpers.h",
]
deps = [
"//chrome/app:generated_resources_grit",
# TODO(https://crbug.com/883570): It'd be nice to have more APIs here
# extracted into their own BUILD files (so they are easy to audit, add, or
# remove), but any that depend on //chrome/browser:browser can't.
"//chrome/browser/apps/platform_apps/api/music_manager_private",
"//chrome/browser/extensions",
"//chrome/common",
"//chrome/common/apps/platform_apps",
"//chrome/common/apps/platform_apps/api",
"//chrome/services/media_gallery_util/public/cpp",
"//components/storage_monitor",
"//components/web_modal",
"//extensions/browser",
]
if (is_chromeos) {
sources += [
"webstore_widget_private/app_installer.cc",
"webstore_widget_private/app_installer.h",
"webstore_widget_private/webstore_widget_private_api.cc",
"webstore_widget_private/webstore_widget_private_api.h",
]
deps += [
"//chrome:strings",
"//chromeos/components/proximity_auth",
"//chromeos/components/proximity_auth/logging",
"//components/account_id",
"//components/cryptauth",
"//components/strings:components_strings_grit",
"//components/user_manager",
"//device/bluetooth",
"//ui/chromeos",
]
}
if (use_lld) {
visibility = [
"//chrome/browser",
"//chrome/browser/ui",
]
} else {
# //chrome/browser:browser and //chrome/browser/ui:* will be split into
# multiple libraries when not linking with lld.
visibility = [
"//chrome/browser:*",
"//chrome/browser/ui:*",
]
}
visibility += [
"//chrome/browser/chromeos",
":api_registration",
]
}