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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
# 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("//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
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",
"browser_context_keyed_service_factories.cc",
"browser_context_keyed_service_factories.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/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",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
public_deps = [ "//chrome/browser:browser_public_dependencies" ]
deps = [
"//chrome/app:generated_resources_grit",
"//chrome/browser:primitives",
# TODO(crbug.com/40593486): 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:browser_process",
"//chrome/browser/extensions",
"//chrome/browser/profiles:profile",
"//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",
"//ui/shell_dialogs",
]
visibility = []
if (is_chromeos) {
# For transition period of crosapi removal.
visibility += [ "//chrome/browser/ash/crosapi" ]
sources += [
"arc_apps_private/arc_apps_private_api.cc",
"arc_apps_private/arc_apps_private_api.h",
"enterprise_remote_apps/enterprise_remote_apps_api.cc",
"enterprise_remote_apps/enterprise_remote_apps_api.h",
]
deps += [
"//chrome/browser/ash/app_list/arc",
"//chrome/browser/ash/login/demo_mode",
"//chrome/browser/ash/remote_apps",
"//chromeos/components/remote_apps/mojom",
"//ui/events:event_constants",
]
# TODO(crbug.com/40251081): Remove these deps. Needed only to allow circular includes.
deps += [ "//chrome/browser/ash/extensions/file_manager" ]
# TODO(crbug.com/40251079): Remove circular dependencies.
allow_circular_includes_from =
[ "//chrome/browser/ash/extensions/file_manager" ]
}
if (use_lld) {
visibility += [
"//chrome/browser",
"//chrome/browser/profiles:profiles_extra_parts_impl",
"//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/profiles:profiles_extra_parts_impl",
"//chrome/browser/ui:*",
]
}
visibility += [ ":api_registration" ]
}
|