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/browser/browser.gni")
9 import("//media/media_options.gni")
11 source_set("browser") {
12 # Only the public target should depend on this. All other targets (even
13 # internal content ones) should depend on the public one.
14 visibility = [ "//content/public/browser:browser_sources" ]
20 # Shared deps. See also non-iOS deps below.
24 "//content:resources",
25 "//content/browser/service_worker:service_worker_proto",
26 "//content/browser/speech/proto",
27 "//content/public/common:common_sources",
35 "//third_party/npapi",
37 "//third_party/WebKit/public:blink_headers",
39 "//third_party/zlib:zip",
41 "//ui/accessibility:ax_gen",
45 "//ui/events:gesture_detection",
55 # iOS doesn't get the normal file list and only takes these whitelisted
59 "browser_main_loop.cc",
60 "browser_main_runner.cc",
61 "browser_process_sub_thread.cc",
62 "browser_thread_impl.cc",
63 "browser_url_handler_impl.cc",
65 "download/download_create_info.cc",
66 "notification_service_impl.cc",
67 "signed_certificate_timestamp_store_impl.cc",
69 "web_contents/navigation_entry_impl.cc",
72 # Normal non-iOS sources get everything.
73 sources = rebase_path(content_browser_gypi_values.private_browser_sources,
77 # TODO(GYP) these generated files are listed as sources in content_browser.
78 # This is a bit suspicious. The GN grit template will make a source set
79 # containing the generated code so it should be sufficient to just depend
80 # on the grit rule. But maybe some of these will need to be added?
82 # Need this annoying rebase_path call to match what happened with the
84 sources -= rebase_path(
86 "$root_gen_dir/blink/grit/devtools_resources.h",
87 "$root_gen_dir/blink/grit/devtools_resources_map.cc",
88 "$root_gen_dir/blink/grit/devtools_resources_map.h",
89 "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_dispatcher.cc",
90 "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_dispatcher.h",
91 "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
92 "$root_gen_dir/ui/resources/grit/webui_resources_map.cc",
100 "//content/app/resources",
101 "//content/app/strings",
102 "//content/browser/devtools:resources",
103 "//content/common:mojo_bindings",
104 "//content/public/common:mojo_bindings",
105 "//device/bluetooth",
109 "//third_party/WebKit/public:resources",
110 "//third_party/angle:commit_id",
112 "//third_party/leveldatabase",
113 "//third_party/libyuv",
114 "//third_party/mojo/src/mojo/public/cpp/bindings",
115 "//third_party/mojo/src/mojo/public/interfaces/application",
116 "//third_party/mojo/src/mojo/public/js",
119 "//ui/touch_selection",
123 configs += [ "//content:content_implementation" ]
126 deps += [ "//ui/events" ]
131 "power_profiler/power_data_provider_ia_win.cc",
132 "power_profiler/power_data_provider_ia_win.h",
134 deps += [ "//third_party/power_gadget" ]
137 "file_descriptor_info_impl.cc",
138 "file_descriptor_info_impl.h",
139 "power_profiler/power_data_provider_dummy.cc",
141 sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
144 if (!is_win && !is_mac && !is_android && (!is_linux || !use_udev)) {
145 sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
148 if (enable_basic_printing || enable_print_preview) {
149 deps += [ "//printing" ]
153 # ['OS!="ios" and chrome_multiple_dll!=1', {
155 # '../third_party/WebKit/public/blink.gyp:blink',
158 if (!is_mac && !is_ios) {
159 deps += [ "//sandbox" ]
161 if (!is_android && !is_ios) {
162 deps += [ "//content/browser/tracing:resources" ]
166 sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
169 deps += [ "//jingle:jingle_glue" ]
171 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
173 if (is_linux || is_mac || is_win) {
175 "media/capture/desktop_capture_device.cc",
176 "media/capture/desktop_capture_device.h",
177 "media/capture/desktop_capture_device_uma_types.cc",
178 "media/capture/desktop_capture_device_uma_types.h",
182 "media/capture/desktop_capture_device_aura.cc",
183 "media/capture/desktop_capture_device_aura.h",
186 defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
187 deps += [ "//third_party/webrtc/modules/desktop_capture" ]
193 "device_sensors/data_fetcher_shared_memory_default.cc",
194 "geolocation/empty_wifi_data_provider.cc",
197 # This prevents the inclusion of atlhost.h which paired
198 # with the windows 8 sdk it does the wrong thing.
202 "//third_party/iaccessible2",
203 "//third_party/isimpledom",
211 "portabledeviceguids.lib",
225 deps += [ "//sandbox/linux:libc_urandom_override" ]
229 deps += [ "//device/udev_linux" ]
231 # Remove udev-specific sources.
233 "device_monitor_udev.cc",
234 "device_monitor_udev.h",
237 # Already filtered out on non-Linux.
239 "gamepad/gamepad_platform_data_fetcher_linux.cc",
246 if (enable_plugins) {
247 sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
252 "//ppapi/shared_impl",
254 if (!use_ozone || use_pango) {
255 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
258 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_pango.cc" ]
262 if (is_linux && use_aura) {
263 configs += [ "//build/config/linux:fontconfig" ]
267 configs += [ "//build/config/linux:x11" ]
268 deps += [ "//ui/gfx/x" ]
271 # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated
272 # given the interaction between os_chromeos and the feature flags for X11 and
273 # ozone, so do it all in one spot.
274 if (is_chromeos || !use_ozone) {
275 sources -= [ "power_save_blocker_ozone.cc" ]
277 if (is_chromeos || !use_x11) {
278 sources -= [ "power_save_blocker_x11.cc" ]
281 # Dealing with *wifi_data_provider_*.cc is also a bit complicated given
282 # android, chromeos, linux and use_dbus.
284 sources -= [ "geolocation/wifi_data_provider_common.cc" ]
286 if (is_chromeos || (is_linux && !use_dbus)) {
287 sources -= [ "geolocation/wifi_data_provider_linux.cc" ]
289 if (is_linux && use_dbus) {
290 sources -= [ "geolocation/empty_wifi_data_provider.cc" ]
294 configs += [ "//build/config/linux:pangocairo" ]
298 sources += rebase_path(content_browser_gypi_values.android_browser_sources,
302 "browser_ipc_logging.cc",
303 "device_sensors/data_fetcher_shared_memory_default.cc",
304 "geolocation/network_location_provider.cc",
305 "geolocation/network_location_provider.h",
306 "geolocation/network_location_request.cc",
307 "geolocation/network_location_request.h",
308 "tracing/tracing_ui.cc",
309 "tracing/tracing_ui.h",
311 # Android skips most, but not all, of the speech code.
312 "speech/audio_buffer.cc",
313 "speech/audio_buffer.h",
314 "speech/audio_encoder.cc",
315 "speech/audio_encoder.h",
316 "speech/chunked_byte_buffer.cc",
317 "speech/chunked_byte_buffer.h",
318 "speech/endpointer/endpointer.cc",
319 "speech/endpointer/endpointer.h",
320 "speech/endpointer/energy_endpointer.cc",
321 "speech/endpointer/energy_endpointer.h",
322 "speech/endpointer/energy_endpointer_params.cc",
323 "speech/endpointer/energy_endpointer_params.h",
324 "speech/google_one_shot_remote_engine.cc",
325 "speech/google_one_shot_remote_engine.h",
326 "speech/google_streaming_remote_engine.cc",
327 "speech/google_streaming_remote_engine.h",
328 "speech/speech_recognition_engine.cc",
329 "speech/speech_recognition_engine.h",
330 "speech/speech_recognizer_impl.cc",
331 "speech/speech_recognizer_impl.h",
334 "//content/public/android:jni",
336 "//mojo/android:libsystem_java",
339 libs += [ "jnigraphics" ]
344 "device_sensors/data_fetcher_shared_memory_default.cc",
345 "geolocation/empty_wifi_data_provider.cc",
346 "geolocation/empty_wifi_data_provider.h",
348 deps += [ "//ui/accelerated_widget_mac" ]
353 sources -= [ "device_sensors/data_fetcher_shared_memory_default.cc" ]
356 "//chromeos:power_manager_proto",
369 "renderer_host/input/synthetic_gesture_target_aura.cc",
370 "renderer_host/input/synthetic_gesture_target_aura.h",
371 "renderer_host/native_web_keyboard_event_aura.cc",
372 "renderer_host/render_widget_host_view_aura.cc",
373 "renderer_host/render_widget_host_view_aura.h",
374 "renderer_host/ui_events_helper.cc",
375 "renderer_host/ui_events_helper.h",
376 "renderer_host/web_input_event_aura.cc",
377 "renderer_host/web_input_event_aura.h",
378 "web_contents/aura/gesture_nav_simple.cc",
379 "web_contents/aura/gesture_nav_simple.h",
380 "web_contents/aura/overscroll_navigation_overlay.cc",
381 "web_contents/aura/overscroll_navigation_overlay.h",
382 "web_contents/aura/shadow_layer_delegate.cc",
383 "web_contents/aura/shadow_layer_delegate.h",
384 "web_contents/aura/window_slider.cc",
385 "web_contents/aura/window_slider.h",
386 "web_contents/touch_editable_impl_aura.cc",
387 "web_contents/touch_editable_impl_aura.h",
388 "web_contents/web_contents_view_aura.cc",
389 "web_contents/web_contents_view_aura.h",
393 if (use_aura || is_mac) {
395 rebase_path(content_browser_gypi_values.compositor_browser_sources,
400 "compositor/software_output_device_x11.cc",
401 "compositor/software_output_device_x11.h",
407 "compositor/overlay_candidate_validator_ozone.cc",
408 "compositor/overlay_candidate_validator_ozone.h",
409 "compositor/software_output_device_ozone.cc",
410 "compositor/software_output_device_ozone.h",
413 deps += [ "//ui/compositor" ]
416 if (enable_web_speech) {
418 "//third_party/flac",
419 "//third_party/speex",
423 if (is_linux && use_dbus) {
427 if (enable_browser_cdms) {
429 "media/cdm/browser_cdm_manager.cc",
430 "media/cdm/browser_cdm_manager.h",
431 "media/media_web_contents_observer.cc",
432 "media/media_web_contents_observer.h",
436 if (is_linux && use_openssl) {
437 deps += [ "//third_party/boringssl" ]
440 if (enable_media_mojo_renderer) {
441 deps += [ "//media/mojo/services:renderer_service" ]