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.
27 "//content:resources",
28 "//content/browser/service_worker:proto",
29 "//content/browser/speech/proto",
36 "//third_party/WebKit/public:blink_headers",
38 "//third_party/zlib:zip",
40 "//ui/accessibility:ax_gen",
43 "//ui/events:gesture_detection",
51 # iOS doesn't get the normal file list and only takes these whitelisted
55 "browser_main_loop.cc",
56 "browser_main_runner.cc",
57 "browser_process_sub_thread.cc",
58 "browser_thread_impl.cc",
59 "browser_url_handler_impl.cc",
61 "download/download_create_info.cc",
62 "notification_service_impl.cc",
63 "signed_certificate_timestamp_store_impl.cc",
65 "web_contents/navigation_entry_impl.cc",
68 # Normal non-iOS sources get everything.
69 sources = rebase_path(content_browser_gypi_values.private_browser_sources,
72 # TODO(GYP) these generated files are listed as sources in content_browser.
73 # This is a bit suspicious. The GN grit template will make a source set
74 # containing the generated code so it should be sufficient to just depend
75 # on the grit rule. But maybe some of these will need to be added?
77 # Need this annoying rebase_path call to match what happened with the
79 sources -= rebase_path([
80 "$root_gen_dir/webkit/grit/devtools_resources.h",
81 "$root_gen_dir/webkit/grit/devtools_resources_map.cc",
82 "$root_gen_dir/webkit/grit/devtools_resources_map.h",
83 "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
84 "$root_gen_dir/ui/resources/grit/webui_resources_map.cc",
85 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.cc",
86 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.h",
93 "//content/app/resources",
94 "//content/app/strings",
95 "//content/browser/devtools:resources",
96 "//content/common:mojo_bindings",
97 "//mojo/public/cpp/bindings",
98 "//mojo/public/interfaces/application",
99 "//mojo/public/js/bindings",
101 "//third_party/WebKit/public:resources",
102 "//third_party/angle:commit_id",
104 "//third_party/leveldatabase",
105 "//third_party/libyuv",
108 "//webkit/browser:storage",
110 "//webkit/common:storage",
115 "//content:content_implementation",
116 "//content:libjingle_stub_config", # TODO(GYP) remove when libjingle is ready.
117 "//content:webrtc_stub_config", # TODO(GYP) remove when webrtc is ready.
121 deps += [ "//ui/events" ]
126 "power_profiler/power_data_provider_ia_win.cc",
127 "power_profiler/power_data_provider_ia_win.h",
129 deps += [ "//third_party/power_gadget" ]
131 sources += [ "power_profiler/power_data_provider_dummy.cc" ]
132 sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
135 if (!is_win && !is_mac && (!is_linux || !use_udev)) {
136 sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
139 if (printing_mode != 0) {
140 deps += [ "//printing" ]
144 # ['OS!="ios" and chrome_multiple_dll!=1', {
146 # '../third_party/WebKit/public/blink.gyp:blink',
149 if (!is_mac && !is_ios) {
150 deps += [ "//sandbox" ]
152 if (!is_android && !is_ios) {
153 deps += [ "//content/browser/tracing:resources" ]
157 sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
160 #deps += [ "//jingle:glue" ]
163 #deps += [ "//third_party/libjingle:libjingle_webrtc" ]
165 if (is_linux || is_mac || is_win) {
167 "media/capture/desktop_capture_device.cc",
168 "media/capture/desktop_capture_device.h",
169 "media/capture/desktop_capture_device_uma_types.cc",
170 "media/capture/desktop_capture_device_uma_types.h",
174 "media/capture/desktop_capture_device_aura.cc",
175 "media/capture/desktop_capture_device_aura.h",
178 defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
180 #deps += [ "//third_party/webrtc/modules:desktop_capture" ]
186 "device_sensors/data_fetcher_shared_memory_default.cc",
187 "geolocation/empty_wifi_data_provider.cc",
190 # This prevents the inclusion of atlhost.h which paired
191 # with the windows 8 sdk it does the wrong thing.
195 "//third_party/iaccessible2",
196 "//third_party/isimpledom",
204 "portabledeviceguids.lib",
217 deps += [ "//sandbox/linux:libc_urandom_override" ]
221 configs += [ "//build/config/linux:udev" ]
223 # Remove udev-specific sources.
225 "device_monitor_udev.cc",
226 "device_monitor_udev.h",
229 # Already filtered out on non-Linux.
231 "gamepad/gamepad_platform_data_fetcher_linux.cc",
238 if (enable_plugins) {
239 sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
243 "//ppapi:ppapi_shared",
245 if (!use_ozone || use_pango) {
246 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
249 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_pango.cc" ]
253 if (is_linux && use_aura) {
254 configs += [ "//build/config/linux:fontconfig" ]
258 configs += [ "//build/config/linux:x11" ]
261 "power_save_blocker_x11.cc",
262 "renderer_host/web_input_event_aurax11.cc",
267 configs += [ "//build/config/linux:pangocairo" ]
271 sources += rebase_path(content_browser_gypi_values.android_browser_sources,
274 "battery_status/battery_status_manager_default.cc",
275 "browser_ipc_logging.cc",
276 "device_sensors/data_fetcher_shared_memory_default.cc",
277 "font_list_async.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)
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_x11.cc",
331 deps += [ "//chromeos:power_manager_proto" ]
334 if (!use_ozone || is_chromeos) {
336 "power_save_blocker_ozone.cc",
347 "renderer_host/input/synthetic_gesture_target_aura.cc",
348 "renderer_host/input/synthetic_gesture_target_aura.h",
349 "renderer_host/native_web_keyboard_event_aura.cc",
350 "renderer_host/render_widget_host_view_aura.cc",
351 "renderer_host/render_widget_host_view_aura.h",
352 "renderer_host/ui_events_helper.cc",
353 "renderer_host/ui_events_helper.h",
354 "renderer_host/web_input_event_aura.cc",
355 "renderer_host/web_input_event_aura.h",
356 "web_contents/aura/gesture_nav_simple.cc",
357 "web_contents/aura/gesture_nav_simple.h",
358 "web_contents/aura/image_window_delegate.cc",
359 "web_contents/aura/image_window_delegate.h",
360 "web_contents/aura/overscroll_navigation_overlay.cc",
361 "web_contents/aura/overscroll_navigation_overlay.h",
362 "web_contents/aura/shadow_layer_delegate.cc",
363 "web_contents/aura/shadow_layer_delegate.h",
364 "web_contents/aura/window_slider.cc",
365 "web_contents/aura/window_slider.h",
366 "web_contents/touch_editable_impl_aura.cc",
367 "web_contents/touch_editable_impl_aura.h",
368 "web_contents/web_contents_view_aura.cc",
369 "web_contents/web_contents_view_aura.h",
373 if (use_aura || is_mac) {
374 sources += rebase_path(
375 content_browser_gypi_values.compositor_browser_sources,
379 "compositor/software_output_device_x11.cc",
380 "compositor/software_output_device_x11.h",
386 "compositor/overlay_candidate_validator_ozone.cc",
387 "compositor/overlay_candidate_validator_ozone.h",
388 "compositor/software_output_device_ozone.cc",
389 "compositor/software_output_device_ozone.h",
392 deps += [ "//ui/compositor" ]
395 if (enable_web_speech) {
397 "//third_party/flac",
398 "//third_party/speex",
405 "battery_status/battery_status_manager_default.cc",
406 "geolocation/empty_wifi_data_provider.cc",
410 # This will already have gotten removed for all non-Linux cases.
412 "battery_status/battery_status_manager_linux.cc",
413 "geolocation/wifi_data_provider_linux.cc",