[NaCl SDK]: use standard __BEGIN_DECLS macros in sys/select.h
[chromium-blink-merge.git] / content / child / BUILD.gn
blob3fd360b72e2275d3b11639fba30aa988dd1ecd6c
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 targets in the content tree can depend directly on this target.
12   visibility = [ "//content/*" ]
14   sources = rebase_path(content_child_gypi_values.private_child_sources,
15                         ".", "//content")
17   deps = [
18     "//base",
19     "//components/tracing",
20     "//mojo/environment:chromium",
21     "//mojo/public/interfaces/application",
22     "//skia",
23     "//third_party/icu",
24     "//ui/base",
25     "//ui/gfx",
26     "//ui/gfx/geometry",
27     "//url",
28   ]
30   if (!use_default_render_theme) {
31     sources -= [
32       "webthemeengine_impl_default.cc",
33       "webthemeengine_impl_default.h",
34     ]
35   }
37   if (is_android) {
38     deps += [
39       "//third_party/android_tools:cpu_features",
40     ]
41   }
43   if (!enable_plugins) {
44     sources -= [
45       "browser_font_resource_trusted.cc",
46       "npapi/plugin_host.cc",
47       "npapi/plugin_host.h",
48       "npapi/plugin_instance.cc",
49       "npapi/plugin_instance.h",
50       "npapi/plugin_lib.cc",
51       "npapi/plugin_lib.h",
52       "npapi/plugin_stream.cc",
53       "npapi/plugin_stream.h",
54       "npapi/plugin_stream_posix.cc",
55       "npapi/plugin_stream_url.cc",
56       "npapi/plugin_stream_url.h",
57       "npapi/plugin_string_stream.cc",
58       "npapi/plugin_string_stream.h",
59       "npapi/plugin_url_fetcher.cc",
60       "npapi/plugin_url_fetcher.h",
61       "npapi/webplugin.h",
62       "npapi/webplugin_delegate.h",
63       "npapi/webplugin_delegate_impl.cc",
64       "npapi/webplugin_delegate_impl.h",
65       "npapi/webplugin_resource_client.h",
66     ]
68     if (is_mac) {
69       sources -= [
70         "npapi/plugin_instance_mac.mm",
71         "npapi/plugin_web_event_converter_mac.h",
72         "npapi/plugin_web_event_converter_mac.mm",
73         "npapi/webplugin_accelerated_surface_mac.h",
74         "npapi/webplugin_delegate_impl_mac.mm",
75       ]
76     } else if (is_win) {
77       sources -= [
78         "npapi/plugin_stream_win.cc",
79         "npapi/webplugin_delegate_impl_win.cc",
80         "npapi/webplugin_ime_win.cc",
81         "npapi/webplugin_ime_win.h",
82       ]
83     } else if (is_android) {
84       sources -= [
85         "npapi/webplugin_delegate_impl_android.cc",
86       ]
87     }
88     if (use_aura) {
89       sources -= [
90         "npapi/webplugin_delegate_impl_aura.cc",
91       ]
92     }
93   }
95   configs += [
96     "//content:content_implementation",
97   ]
99   if (is_ios) {
100     # iOS only needs a small portion of content; exclude all the
101     # implementation, and re-include what is used.
102     sources = []
103   } else {
104     deps += [
105       "//content/app/resources",
106       "//content/app/strings",
107       "//crypto:platform",
108       "//storage/common",
109       "//third_party/WebKit/public:blink",
110       "//third_party/WebKit/public:resources",
111       "//third_party/npapi",
112     ]
113   }
115   if (use_aura && is_mac) {
116     # This file is already excluded on non-Mac.
117     sources -= [ "npapi/webplugin_delegate_impl_mac.mm" ]
118   }
120   if (is_win || !use_aura) {
121     sources -= [ "npapi/webplugin_delegate_impl_aura.cc" ]
122   }
124   if (!use_openssl) {
125     sources += rebase_path(content_child_gypi_values.webcrypto_nss_sources,
126                            ".", "//content")
127   } else {
128     sources += rebase_path(content_child_gypi_values.webcrypto_openssl_sources,
129                            ".", "//content")
130   }