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