summaryrefslogtreecommitdiff
path: root/chromium/content/child/BUILD.gn
blob: cdaf2b28aad9d681757acba53f841e1eb8d50db0 (plain)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# 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/features.gni")
import("//build/config/ui.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//third_party/blink/public/public_features.gni")
if (is_android) {
  import("//build/config/android/config.gni")
}

# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)

if (is_component_build) {
  link_target_type = "source_set"
} else {
  link_target_type = "static_library"
}
target(link_target_type, "child") {
  # Targets external to content should always link to the public API.
  # Internal targets can link to this but only if they're child processes
  # (i.e. not content/browser or content/common) and only if they're inside the
  # content component (i.e. not content/test or content/shell).
  visibility = [
    ":*",
    "//content/gpu/*",
    "//content/ppapi_plugin/*",
    "//content/public/child:child_sources",
    "//content/renderer/*",
    "//content/utility/*",
    "//tools/ipc_fuzzer/*",
  ]
  if (is_android) {
    # See comment in content/app/BUILD.gn above content_app_deps.
    visibility += [ "//content/app:*" ]
  }

  sources = [
    "assert_matching_enums.cc",
    "blink_platform_impl.cc",
    "blink_platform_impl.h",
    "browser_exposed_child_interfaces.cc",
    "browser_exposed_child_interfaces.h",
    "browser_font_resource_trusted.cc",
    "browser_font_resource_trusted.h",
    "child_histogram_fetcher_impl.cc",
    "child_histogram_fetcher_impl.h",
    "child_process.cc",
    "child_process.h",
    "child_process_sandbox_support_impl_linux.cc",
    "child_process_sandbox_support_impl_linux.h",
    "child_process_sandbox_support_impl_mac.cc",
    "child_process_sandbox_support_impl_mac.h",
    "child_thread_impl.cc",
    "child_thread_impl.h",
    "dwrite_font_proxy/dwrite_font_proxy_init_impl_win.cc",
    "dwrite_font_proxy/dwrite_font_proxy_init_impl_win.h",
    "dwrite_font_proxy/dwrite_font_proxy_win.cc",
    "dwrite_font_proxy/dwrite_font_proxy_win.h",
    "dwrite_font_proxy/dwrite_localized_strings_win.cc",
    "dwrite_font_proxy/dwrite_localized_strings_win.h",
    "dwrite_font_proxy/font_fallback_win.cc",
    "dwrite_font_proxy/font_fallback_win.h",
    "field_trial.cc",
    "field_trial.h",
    "font_warmup_win.cc",
    "font_warmup_win.h",
    "image_decoder_utils.cc",
    "runtime_features.cc",
    "runtime_features.h",
    "scoped_child_process_reference.cc",
    "scoped_child_process_reference.h",
    "webthemeengine_impl_android.cc",
    "webthemeengine_impl_android.h",
    "webthemeengine_impl_conversions.cc",
    "webthemeengine_impl_conversions.h",
    "webthemeengine_impl_default.cc",
    "webthemeengine_impl_default.h",
    "webthemeengine_impl_mac.cc",
    "webthemeengine_impl_mac.h",
  ]

  configs += [ "//build/config:precompiled_headers" ]

  public_deps = [
    "//gpu/ipc/client:client",
    "//ipc",
    "//services/service_manager/public/mojom:mojom_blink",
  ]

  deps = [
    "//base",
    "//cc/paint",
    "//components/discardable_memory/client",
    "//components/discardable_memory/public/mojom",
    "//components/tracing:startup_tracing",
    "//components/variations",
    "//components/webcrypto",
    "//content/app/resources",
    "//content/common",
    "//content/public/common:common_sources",
    "//crypto:platform",
    "//device/gamepad/public/cpp:switches",
    "//gpu/command_buffer/client",
    "//media",
    "//media/blink",
    "//mojo/core/embedder",
    "//net",
    "//services/device/public/cpp:device_features",
    "//services/device/public/cpp/power_monitor",
    "//services/network/public/cpp",
    "//services/resource_coordinator/public/cpp/memory_instrumentation",
    "//services/service_manager/public/cpp",
    "//services/service_manager/public/mojom",
    "//services/tracing/public/cpp",
    "//services/tracing/public/cpp:traced_process",
    "//services/tracing/public/cpp/background_tracing:background_tracing",
    "//skia",
    "//storage/common",
    "//third_party/blink/public:blink_headers",
    "//third_party/blink/public:buildflags",
    "//third_party/blink/public:resources",
    "//third_party/blink/public:scaled_resources",
    "//third_party/blink/public/common",
    "//third_party/blink/public/strings",
    "//third_party/ced",
    "//third_party/zlib/google:compression_utils",
    "//ui/base",
    "//ui/events/blink",
    "//ui/events/gestures/blink",
    "//ui/gfx",
    "//ui/gfx/geometry",
    "//ui/gl",
    "//ui/native_theme",
    "//url",
    "//v8",
  ]

  if (is_android) {
    deps += [ "//third_party/android_ndk:cpu_features" ]
    sources -= [
      "webthemeengine_impl_default.cc",
      "webthemeengine_impl_default.h",
    ]
  }

  if (is_linux || is_chromeos) {
    deps += [
      "//components/services/font/public/cpp",
      "//components/services/font/public/mojom",
    ]
  }

  if (is_win) {
    libs = [ "dwrite.lib" ]
  }

  if (enable_plugins) {
    deps += [
      "//ppapi/proxy",
      "//ppapi/shared_impl",
    ]
  } else {
    sources -= [
      "browser_font_resource_trusted.cc",
      "browser_font_resource_trusted.h",
    ]
  }

  configs += [
    "//content:content_implementation",
    "//build/config/compiler:no_size_t_to_int_warning",
  ]
}

# 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 = [ ":child" ]
  }
}