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