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/features.gni")
6 import("//build/config/ui.gni")
7 import("//content/browser/browser.gni")
9 source_set("browser") {
10 # Only targets in the content tree can depend directly on this target.
11 visibility = [ "//content/*" ]
17 # Shared deps. See also non-iOS deps below.
20 "//content:resources",
21 "//content/browser/service_worker:database_proto",
22 "//content/browser/speech/proto",
29 "//third_party/WebKit/public:blink_headers",
31 "//third_party/zlib:zip",
33 "//ui/accessibility:ax_gen",
36 "//ui/events:gesture_detection",
44 # iOS doesn't get the normal file list and only takes these whitelisted
48 "browser_main_loop.cc",
49 "browser_main_runner.cc",
50 "browser_process_sub_thread.cc",
51 "browser_thread_impl.cc",
52 "browser_url_handler_impl.cc",
54 "download/download_create_info.cc",
55 "notification_service_impl.cc",
56 "signed_certificate_timestamp_store_impl.cc",
58 "web_contents/navigation_entry_impl.cc",
61 # Normal non-iOS sources get everything.
62 sources = rebase_path(content_browser_gypi_values.private_browser_sources,
65 # TODO(GYP) these generated files are listed as sources in content_browser.
66 # This is a bit suspicious. The GN grit template will make a source set
67 # containing the generated code so it should be sufficient to just depend
68 # on the grit rule. But maybe some of these will need to be added?
70 # Need this annoying rebase_path call to match what happened with the
72 sources -= rebase_path([
73 "$root_gen_dir/webkit/grit/devtools_resources.h",
74 "$root_gen_dir/webkit/grit/devtools_resources_map.cc",
75 "$root_gen_dir/webkit/grit/devtools_resources_map.h",
76 "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
77 "$root_gen_dir/ui/ui_resources/grit/webui_resources_map.cc",
78 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.cc",
79 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.h",
84 "//content/browser/devtools:resources",
85 "//content/common:mojo_bindings",
88 "//mojo/public/cpp/bindings",
89 "//mojo/public/interfaces/service_provider:service_provider",
90 "//mojo/public/js/bindings",
93 "//third_party/leveldatabase",
94 "//third_party/libyuv",
97 "//ui/webui/resources",
100 "//webkit/browser:storage",
102 "//webkit/common:storage",
104 #"//third_party/angle:commit_id",
109 "//content:content_implementation",
110 "//content:libjingle_stub_config", # TODO(GYP) remove when libjingle is ready.
111 "//content:webrtc_stub_config", # TODO(GYP) remove when webrtc is ready.
115 deps += [ "//ui/events" ]
120 "power_profiler/power_data_provider_ia_win.cc",
121 "power_profiler/power_data_provider_ia_win.h",
123 deps += [ "//third_party/power_gadget" ]
125 sources += [ "power_profiler/power_data_provider_dummy.cc" ]
126 sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
129 if (!is_win && !is_mac && (!is_linux || !use_udev)) {
130 sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
133 if (enable_printing != 0) {
134 deps += [ "//printing" ]
138 # ['OS!="ios" and chrome_multiple_dll!=1', {
140 # '../third_party/WebKit/public/blink.gyp:blink',
143 if (!is_mac && !is_ios) {
144 deps += [ "//sandbox" ]
146 if (!is_android && !is_ios) {
147 deps += [ "//content/browser/tracing:resources" ]
151 sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
154 #deps += [ "//jingle:glue" ]
157 #deps += [ "//third_party/libjingle:libjingle_webrtc" ]
159 if (is_linux || is_mac || is_win) {
161 "media/capture/desktop_capture_device.cc",
162 "media/capture/desktop_capture_device.h",
163 "media/capture/desktop_capture_device_aura.cc",
164 "media/capture/desktop_capture_device_aura.h",
165 "media/capture/desktop_capture_device_uma_types.cc",
166 "media/capture/desktop_capture_device_uma_types.h",
168 defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
170 #deps += [ "//third_party/webrtc/modules:desktop_capture" ]
176 "device_sensors/data_fetcher_shared_memory_default.cc",
177 "geolocation/empty_wifi_data_provider.cc",
180 # This prevents the inclusion of atlhost.h which paired
181 # with the windows 8 sdk it does the wrong thing.
185 "//third_party/iaccessible2",
186 "//third_party/isimpledom",
194 "portabledeviceguids.lib",
207 deps += [ "//sandbox/linux:libc_urandom_override" ]
211 configs += [ "//build/config/linux:udev" ]
213 # Remove udev-specific sources.
215 "device_monitor_udev.cc",
216 "device_monitor_udev.h",
219 # Already filtered out on non-Linux.
221 "gamepad/gamepad_platform_data_fetcher_linux.cc",
228 if (enable_plugins) {
229 sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
233 "//ppapi:ppapi_shared",
235 if (!use_ozone || use_pango) {
236 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
240 if (is_linux && use_aura) {
241 configs += [ "//build/config/linux:fontconfig" ]
245 configs += [ "//build/config/linux:x11" ]
248 "power_save_blocker_x11.cc",
249 "renderer_host/web_input_event_aurax11.cc",
254 configs += [ "//build/config/linux:pangocairo" ]
258 sources += rebase_path(content_browser_gypi_values.android_browser_sources,
261 "battery_status/battery_status_manager_default.cc",
262 "browser_ipc_logging.cc",
263 "device_sensors/data_fetcher_shared_memory_default.cc",
264 "font_list_async.cc",
265 "geolocation/device_data_provider.cc",
266 "geolocation/empty_device_data_provider.cc",
267 "geolocation/network_location_provider.cc",
268 "geolocation/network_location_provider.h",
269 "geolocation/network_location_request.cc",
270 "geolocation/network_location_request.h",
271 "geolocation/wifi_data_provider_common.cc",
272 "renderer_host/native_web_keyboard_event.cc",
273 "tracing/tracing_ui.cc",
274 "tracing/tracing_ui.h",
276 # Android skips most, but not all, of the speech code.
277 "speech/audio_buffer.cc",
278 "speech/audio_buffer.h",
279 "speech/audio_encoder.cc",
280 "speech/audio_encoder.h",
281 "speech/chunked_byte_buffer.cc",
282 "speech/chunked_byte_buffer.h",
283 "speech/endpointer/endpointer.cc",
284 "speech/endpointer/endpointer.h",
285 "speech/endpointer/energy_endpointer.cc",
286 "speech/endpointer/energy_endpointer.h",
287 "speech/endpointer/energy_endpointer_params.cc",
288 "speech/endpointer/energy_endpointer_params.h",
289 "speech/google_one_shot_remote_engine.cc",
290 "speech/google_one_shot_remote_engine.h",
291 "speech/google_streaming_remote_engine.cc",
292 "speech/google_streaming_remote_engine.h",
293 "speech/speech_recognition_engine.cc",
294 "speech/speech_recognition_engine.h",
295 "speech/speech_recognizer_impl.cc",
296 "speech/speech_recognizer_impl.h",
299 #"//content:jni_headers", TODO(GYP)
300 #"//media", TODO(GYP)
302 libs += [ "jnigraphics" ]
307 "device_sensors/data_fetcher_shared_memory_default.cc",
308 "geolocation/empty_wifi_data_provider.cc",
309 "geolocation/empty_wifi_data_provider.h",
316 "geolocation/wifi_data_provider_linux.cc",
317 "power_save_blocker_ozone.cc",
318 "power_save_blocker_x11.cc",
320 deps += [ "//chromeos:power_manager_proto" ]
330 "renderer_host/render_widget_host_view_aura.cc",
331 "renderer_host/render_widget_host_view_aura.h",
332 "web_contents/touch_editable_impl_aura.cc",
333 "web_contents/touch_editable_impl_aura.h",
334 "renderer_host/ui_events_helper.cc",
335 "renderer_host/ui_events_helper.h",
339 if (use_aura || is_mac) {
340 sources += rebase_path(
341 content_browser_gypi_values.compositor_browser_sources,
345 "compositor/software_output_device_x11.cc",
346 "compositor/software_output_device_x11.h",
349 deps += [ "//ui/compositor" ]
352 if (enable_speech_input) {
354 "//third_party/flac",
355 "//third_party/speex",
362 "geolocation/empty_wifi_data_provider.cc",
366 # This will already have gotten removed for all non-Linux cases.
367 sources -= [ "geolocation/wifi_data_provider_linux.cc" ]