Process Alt-Svc headers.
[chromium-blink-merge.git] / content / child / BUILD.gn
blob9698873cd331c569878c38350271b66960d5a49c
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
7 import("//build/config/ui.gni")
8 import("//content/child/child.gni")
10 source_set("child") {
11   # Only the public target should depend on this. All other targets (even
12   # internal content ones) should depend on the public one.
13   visibility = [ "//content/public/child:child_sources" ]
15   sources = rebase_path(content_child_gypi_values.private_child_sources,
16                         ".",
17                         "//content")
19   configs += [ "//build/config:precompiled_headers" ]
21   public_deps = [
22     "//third_party/mojo/src/mojo/edk/system",
23   ]
25   deps = [
26     "//base",
27     "//components/mime_util",
28     "//components/tracing",
29     "//components/tracing:startup_tracing",
30     "//components/webcrypto",
31     "//content/common:mojo_bindings",
32     "//mojo/application/public/interfaces",
33     "//mojo/common",
34     "//mojo/environment:chromium",
35     "//skia",
36     "//third_party/icu",
37     "//ui/base",
38     "//ui/events/gestures/blink",
39     "//ui/gfx",
40     "//ui/gfx/geometry",
41     "//ui/native_theme",
42     "//url",
43   ]
45   if (!use_default_render_theme) {
46     sources -= [
47       "webthemeengine_impl_default.cc",
48       "webthemeengine_impl_default.h",
49     ]
50   }
52   if (is_android) {
53     deps += [ "//third_party/android_tools:cpu_features" ]
54   }
56   if (enable_plugins) {
57     deps += [ "//ppapi/proxy" ]
58   } else {
59     sources -= [
60       "browser_font_resource_trusted.cc",
61       "npapi/plugin_host.cc",
62       "npapi/plugin_host.h",
63       "npapi/plugin_instance.cc",
64       "npapi/plugin_instance.h",
65       "npapi/plugin_lib.cc",
66       "npapi/plugin_lib.h",
67       "npapi/plugin_stream.cc",
68       "npapi/plugin_stream.h",
69       "npapi/plugin_stream_posix.cc",
70       "npapi/plugin_stream_url.cc",
71       "npapi/plugin_stream_url.h",
72       "npapi/plugin_string_stream.cc",
73       "npapi/plugin_string_stream.h",
74       "npapi/plugin_url_fetcher.cc",
75       "npapi/plugin_url_fetcher.h",
76       "npapi/webplugin.h",
77       "npapi/webplugin_delegate.h",
78       "npapi/webplugin_delegate_impl.cc",
79       "npapi/webplugin_delegate_impl.h",
80       "npapi/webplugin_resource_client.h",
81     ]
83     if (is_mac) {
84       sources -= [
85         "npapi/plugin_instance_mac.mm",
86         "npapi/plugin_web_event_converter_mac.h",
87         "npapi/plugin_web_event_converter_mac.mm",
88         "npapi/webplugin_accelerated_surface_mac.h",
89         "npapi/webplugin_delegate_impl_mac.mm",
90       ]
91     } else if (is_win) {
92       sources -= [
93         "npapi/plugin_stream_win.cc",
94         "npapi/webplugin_delegate_impl_win.cc",
95         "npapi/webplugin_ime_win.cc",
96         "npapi/webplugin_ime_win.h",
97       ]
98     } else if (is_android) {
99       sources -= [ "npapi/webplugin_delegate_impl_android.cc" ]
100     }
101     if (use_aura) {
102       sources -= [ "npapi/webplugin_delegate_impl_aura.cc" ]
103     }
104   }
106   configs += [
107     "//content:content_implementation",
108     "//build/config/compiler:no_size_t_to_int_warning",
109   ]
111   if (is_ios) {
112     # iOS only needs a small portion of content; exclude all the
113     # implementation, and re-include what is used.
114     sources = []
115   } else {
116     deps += [
117       "//components/scheduler:scheduler",
118       "//content/app/resources",
119       "//content/app/strings",
120       "//crypto:platform",
121       "//storage/common",
122       "//third_party/WebKit/public:blink",
123       "//third_party/WebKit/public:image_resources",
124       "//third_party/WebKit/public:resources",
125       "//third_party/npapi",
126     ]
127   }
129   if (use_aura && is_mac) {
130     # This file is already excluded on non-Mac.
131     sources -= [ "npapi/webplugin_delegate_impl_mac.mm" ]
132   }
134   if (is_win || !use_aura) {
135     sources -= [ "npapi/webplugin_delegate_impl_aura.cc" ]
136   }