# 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("//build/config/chromecast_build.gni") import("//build/config/features.gni") import("//content/common/common.gni") import("//mojo/public/tools/bindings/mojom.gni") # See //content/BUILD.gn for how this works. group("common") { if (is_component_build) { public_deps = [ "//content", ] } else { public_deps = [ ":common_sources", ] } } # This target allows other targets to depend on result_codes.h which is a # header-only dependency, without bringing in all of content. source_set("result_codes") { sources = [ "result_codes.h", ] } # This target allows other targets to depend on content_descriptors.h which is # a header-only dependency, without bringing in all of content. source_set("content_descriptors") { sources = [ "content_descriptors.h", ] public_configs = [ "//v8:external_startup_data" ] } # Forces static linking for targets using the static_switches constants, even # in the component build. This config makes it impossible to use the static # switches target and use the rest of content at the same time, because the # component export flags won't be consistent. config("static_switches_defines") { defines = [ "COMPILE_CONTENT_STATICALLY" ] } # Set in GN builds, triggering behavior in content when run from an external # Mojo shell. config("mojo_shell_client") { # This configuration has only been tested on these platforms. if ((is_win || is_linux || is_chromeos) && !is_chromecast) { defines = [ "MOJO_SHELL_CLIENT" ] } } # This target allows you to use the content_switches constants and statically # link to it, without depending on the rest of content. This is only for use # without content, or you will get multiply defined symbols. source_set("static_switches") { public = [ "content_switches.h", ] sources = [ "//content/common/content_export.h", "content_switches.cc", ] public_configs = [ ":static_switches_defines" ] } source_set("common_sources") { visibility = [ "//content/*" ] sources = rebase_path(content_common_gypi_values.public_common_sources, ".", "//content") configs += [ "//build/config:precompiled_headers", "//content:content_implementation", ] public_configs = [ "//v8:external_startup_data" ] public_deps = [ "//content/common", "//mojo/public/cpp/bindings", ] deps = [ "//net", "//skia", "//third_party/WebKit/public:blink_headers", "//third_party/icu", "//ui/base", "//ui/gfx", ] if (!enable_plugins) { sources -= [ "pepper_plugin_info.cc", "pepper_plugin_info.h", ] } if (enable_webrtc) { sources += [ "webrtc_ip_handling_policy.cc", "webrtc_ip_handling_policy.h", ] } } mojom("mojo_bindings") { sources = [ "background_sync.mojom", "mojo_geoposition.mojom", "permission_status.mojom", "service_worker_event_status.mojom", ] }