| # 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/chrome_build.gni") |
| import("//build/config/features.gni") |
| import("//ppapi/buildflags/buildflags.gni") |
| |
| extra_configs = [ |
| "//build/config/compiler:wexit_time_destructors", |
| "//content:content_implementation", |
| "//tools/v8_context_snapshot:use_v8_context_snapshot", |
| "//v8:external_startup_data", |
| ] |
| |
| content_app_deps = [ |
| "//base", |
| "//base:i18n", |
| "//content:export", |
| "//content:sandbox_helper_win", |
| "//content/public/common:common_sources", |
| "//content/public/common:service_names", |
| "//crypto", |
| "//mojo/core/embedder", |
| "//ppapi/buildflags", |
| "//services/service_manager/embedder", |
| "//services/service_manager/public/mojom", |
| "//services/tracing/public/cpp", |
| "//ui/base", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| ] |
| |
| if (is_win) { |
| content_app_deps += [ "//sandbox" ] |
| } else if (is_android) { |
| # Many of these are required for JNI registration. |
| content_app_deps += [ |
| "//content/browser", |
| "//content/child", |
| "//content/public/android:jni", |
| "//device/bluetooth", |
| "//device/gamepad", |
| "//gpu", |
| "//media", |
| "//media/capture", |
| "//media/midi", |
| "//net", |
| "//skia", |
| "//third_party/android_ndk:cpu_features", |
| "//ui/android", |
| "//ui/events", |
| "//ui/shell_dialogs", |
| ] |
| } |
| |
| if (enable_plugins) { |
| content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ] |
| } |
| |
| # Compile content_main_runner_impl.[h, cc] in a separate target to exempt from |
| # GN header checking without exempting any other source file. These files |
| # includes headers of all process types and varies significantly per platform |
| # in between browser and child. Otherwise it would require many "nogncheck" |
| # annotations that would both be useless and add noise. |
| source_set("content_main_runner_app") { |
| visibility = [ ":app" ] |
| check_includes = false |
| |
| sources = [ |
| "content_main_runner_impl.cc", |
| "content_main_runner_impl.h", |
| ] |
| |
| configs += extra_configs |
| deps = content_app_deps + [ |
| "//content/browser", |
| "//content/gpu:gpu_sources", |
| "//content/public/browser:browser_sources", |
| "//content/public/gpu:gpu_sources", |
| "//content/public/renderer:renderer_sources", |
| "//content/public/utility:utility_sources", |
| "//content/renderer", |
| "//content/utility", |
| ] |
| } |
| |
| source_set("app") { |
| # TODO(thakis): The comment above content_main_runner_app suggests this |
| # line shouldn't be here; try removing it. |
| check_includes = false |
| |
| sources = [ |
| "content_service_manager_main_delegate.cc", |
| "content_service_manager_main_delegate.h", |
| "mojo/mojo_init.cc", |
| "mojo/mojo_init.h", |
| "service_manager_environment.cc", |
| "service_manager_environment.h", |
| ] |
| |
| configs += extra_configs |
| deps = content_app_deps + [ |
| ":content_main_runner_app", |
| "//ipc", |
| "//services/service_manager/embedder", |
| ] |
| |
| # Only the public target should depend on this. All other targets (even |
| # internal content ones) should depend on the public one. |
| visibility = [ |
| ":for_content_tests", # See top of //content/BUILD.gn for why. |
| "//content/public/app:*", |
| ] |
| |
| if (is_android) { |
| sources += [ |
| "android/content_child_process_service_delegate.cc", |
| "android/content_jni_onload.cc", |
| "android/content_main.cc", |
| "android/library_loader_hooks.cc", |
| "android/library_loader_hooks.h", |
| ] |
| deps += [ |
| "//mojo/public/java/system:native_support", |
| "//ui/gl", |
| ] |
| } else { |
| sources += [ "content_main.cc" ] |
| } |
| } |
| |
| # See comment at the top of //content/BUILD.gn for how this works. |
| group("for_content_tests") { |
| visibility = [ "//content/test/*" ] |
| if (!is_component_build) { |
| public_deps = [ ":app" ] |
| } |
| } |