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 config("storage_config") {
11 defines = [ "APPCACHE_USE_SIMPLE_CACHE" ]
15 source_set("browser") {
16 # Only targets in the content tree can depend directly on this target.
17 visibility = [ "//content/*" ]
23 # Shared deps. See also non-iOS deps below.
26 "//content:resources",
27 "//content/browser/service_worker:database_proto",
28 "//content/browser/speech/proto",
35 "//third_party/WebKit/public:blink_headers",
37 "//third_party/zlib:zip",
39 "//ui/accessibility:ax_gen",
42 "//ui/events:gesture_detection",
50 # iOS doesn't get the normal file list and only takes these whitelisted
54 "browser_main_loop.cc",
55 "browser_main_runner.cc",
56 "browser_process_sub_thread.cc",
57 "browser_thread_impl.cc",
58 "browser_url_handler_impl.cc",
60 "download/download_create_info.cc",
61 "notification_service_impl.cc",
62 "signed_certificate_timestamp_store_impl.cc",
64 "web_contents/navigation_entry_impl.cc",
67 # Normal non-iOS sources get everything.
68 sources = rebase_path(content_browser_gypi_values.private_browser_sources,
71 # TODO(GYP) these generated files are listed as sources in content_browser.
72 # This is a bit suspicious. The GN grit template will make a source set
73 # containing the generated code so it should be sufficient to just depend
74 # on the grit rule. But maybe some of these will need to be added?
76 # Need this annoying rebase_path call to match what happened with the
78 sources -= rebase_path([
79 "$root_gen_dir/webkit/grit/devtools_resources.h",
80 "$root_gen_dir/webkit/grit/devtools_resources_map.cc",
81 "$root_gen_dir/webkit/grit/devtools_resources_map.h",
82 "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
83 "$root_gen_dir/ui/resources/grit/webui_resources_map.cc",
84 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.cc",
85 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.h",
90 "//content/browser/devtools:resources",
91 "//content/common:mojo_bindings",
94 "//mojo/public/cpp/bindings",
95 "//mojo/public/interfaces/service_provider",
96 "//mojo/public/js/bindings",
99 "//third_party/leveldatabase",
100 "//third_party/libyuv",
103 "//webkit:resources",
105 "//webkit/browser:storage",
107 "//webkit/common:storage",
108 "//third_party/angle:commit_id",
113 "//content:content_implementation",
114 "//content:libjingle_stub_config", # TODO(GYP) remove when libjingle is ready.
115 "//content:webrtc_stub_config", # TODO(GYP) remove when webrtc is ready.
119 deps += [ "//ui/events" ]
124 "power_profiler/power_data_provider_ia_win.cc",
125 "power_profiler/power_data_provider_ia_win.h",
127 deps += [ "//third_party/power_gadget" ]
129 sources += [ "power_profiler/power_data_provider_dummy.cc" ]
130 sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
133 if (!is_win && !is_mac && (!is_linux || !use_udev)) {
134 sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
137 if (enable_printing != 0) {
138 deps += [ "//printing" ]
142 # ['OS!="ios" and chrome_multiple_dll!=1', {
144 # '../third_party/WebKit/public/blink.gyp:blink',
147 if (!is_mac && !is_ios) {
148 deps += [ "//sandbox" ]
150 if (!is_android && !is_ios) {
151 deps += [ "//content/browser/tracing:resources" ]
155 sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
158 #deps += [ "//jingle:glue" ]
161 #deps += [ "//third_party/libjingle:libjingle_webrtc" ]
163 if (is_linux || is_mac || is_win) {
165 "media/capture/desktop_capture_device.cc",
166 "media/capture/desktop_capture_device.h",
167 "media/capture/desktop_capture_device_uma_types.cc",
168 "media/capture/desktop_capture_device_uma_types.h",
172 "media/capture/desktop_capture_device_aura.cc",
173 "media/capture/desktop_capture_device_aura.h",
176 defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
178 #deps += [ "//third_party/webrtc/modules:desktop_capture" ]
184 "device_sensors/data_fetcher_shared_memory_default.cc",
185 "geolocation/empty_wifi_data_provider.cc",
188 # This prevents the inclusion of atlhost.h which paired
189 # with the windows 8 sdk it does the wrong thing.
193 "//third_party/iaccessible2",
194 "//third_party/isimpledom",
202 "portabledeviceguids.lib",
215 deps += [ "//sandbox/linux:libc_urandom_override" ]
219 configs += [ "//build/config/linux:udev" ]
221 # Remove udev-specific sources.
223 "device_monitor_udev.cc",
224 "device_monitor_udev.h",
227 # Already filtered out on non-Linux.
229 "gamepad/gamepad_platform_data_fetcher_linux.cc",
236 if (enable_plugins) {
237 sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
241 "//ppapi:ppapi_shared",
243 if (!use_ozone || use_pango) {
244 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
247 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_pango.cc" ]
251 if (is_linux && use_aura) {
252 configs += [ "//build/config/linux:fontconfig" ]
256 configs += [ "//build/config/linux:x11" ]
259 "power_save_blocker_x11.cc",
260 "renderer_host/web_input_event_aurax11.cc",
265 configs += [ "//build/config/linux:pangocairo" ]
269 sources += rebase_path(content_browser_gypi_values.android_browser_sources,
272 "battery_status/battery_status_manager_default.cc",
273 "browser_ipc_logging.cc",
274 "device_sensors/data_fetcher_shared_memory_default.cc",
275 "font_list_async.cc",
276 "geolocation/device_data_provider.cc",
277 "geolocation/empty_device_data_provider.cc",
278 "geolocation/network_location_provider.cc",
279 "geolocation/network_location_provider.h",
280 "geolocation/network_location_request.cc",
281 "geolocation/network_location_request.h",
282 "geolocation/wifi_data_provider_common.cc",
283 "renderer_host/native_web_keyboard_event.cc",
284 "tracing/tracing_ui.cc",
285 "tracing/tracing_ui.h",
287 # Android skips most, but not all, of the speech code.
288 "speech/audio_buffer.cc",
289 "speech/audio_buffer.h",
290 "speech/audio_encoder.cc",
291 "speech/audio_encoder.h",
292 "speech/chunked_byte_buffer.cc",
293 "speech/chunked_byte_buffer.h",
294 "speech/endpointer/endpointer.cc",
295 "speech/endpointer/endpointer.h",
296 "speech/endpointer/energy_endpointer.cc",
297 "speech/endpointer/energy_endpointer.h",
298 "speech/endpointer/energy_endpointer_params.cc",
299 "speech/endpointer/energy_endpointer_params.h",
300 "speech/google_one_shot_remote_engine.cc",
301 "speech/google_one_shot_remote_engine.h",
302 "speech/google_streaming_remote_engine.cc",
303 "speech/google_streaming_remote_engine.h",
304 "speech/speech_recognition_engine.cc",
305 "speech/speech_recognition_engine.h",
306 "speech/speech_recognizer_impl.cc",
307 "speech/speech_recognizer_impl.h",
310 #"//content:jni_headers", TODO(GYP)
311 #"//media", TODO(GYP)
313 libs += [ "jnigraphics" ]
318 "device_sensors/data_fetcher_shared_memory_default.cc",
319 "geolocation/empty_wifi_data_provider.cc",
320 "geolocation/empty_wifi_data_provider.h",
327 "battery_status/battery_status_manager_default.cc",
328 "geolocation/wifi_data_provider_linux.cc",
329 "power_save_blocker_ozone.cc",
330 "power_save_blocker_x11.cc",
332 deps += [ "//chromeos:power_manager_proto" ]
342 "renderer_host/input/synthetic_gesture_target_aura.cc",
343 "renderer_host/input/synthetic_gesture_target_aura.h",
344 "renderer_host/native_web_keyboard_event_aura.cc",
345 "renderer_host/render_widget_host_view_aura.cc",
346 "renderer_host/render_widget_host_view_aura.h",
347 "renderer_host/ui_events_helper.cc",
348 "renderer_host/ui_events_helper.h",
349 "renderer_host/web_input_event_aura.cc",
350 "renderer_host/web_input_event_aura.h",
351 "web_contents/aura/gesture_nav_simple.cc",
352 "web_contents/aura/gesture_nav_simple.h",
353 "web_contents/aura/image_window_delegate.cc",
354 "web_contents/aura/image_window_delegate.h",
355 "web_contents/aura/overscroll_navigation_overlay.cc",
356 "web_contents/aura/overscroll_navigation_overlay.h",
357 "web_contents/aura/shadow_layer_delegate.cc",
358 "web_contents/aura/shadow_layer_delegate.h",
359 "web_contents/aura/window_slider.cc",
360 "web_contents/aura/window_slider.h",
361 "web_contents/touch_editable_impl_aura.cc",
362 "web_contents/touch_editable_impl_aura.h",
363 "web_contents/web_contents_view_aura.cc",
364 "web_contents/web_contents_view_aura.h",
368 if (use_aura || is_mac) {
369 sources += rebase_path(
370 content_browser_gypi_values.compositor_browser_sources,
374 "compositor/software_output_device_x11.cc",
375 "compositor/software_output_device_x11.h",
378 deps += [ "//ui/compositor" ]
381 if (enable_web_speech) {
383 "//third_party/flac",
384 "//third_party/speex",
391 "geolocation/empty_wifi_data_provider.cc",
395 # This will already have gotten removed for all non-Linux cases.
396 sources -= [ "geolocation/wifi_data_provider_linux.cc" ]