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