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",
44 "//ui/events:gesture_detection",
54 # iOS doesn't get the normal file list and only takes these whitelisted
58 "browser_main_loop.cc",
59 "browser_main_runner.cc",
60 "browser_process_sub_thread.cc",
61 "browser_thread_impl.cc",
62 "browser_url_handler_impl.cc",
64 "download/download_create_info.cc",
65 "notification_service_impl.cc",
66 "signed_certificate_timestamp_store_impl.cc",
68 "web_contents/navigation_entry_impl.cc",
71 # Normal non-iOS sources get everything.
72 sources = rebase_path(content_browser_gypi_values.private_browser_sources,
76 # TODO(GYP) these generated files are listed as sources in content_browser.
77 # This is a bit suspicious. The GN grit template will make a source set
78 # containing the generated code so it should be sufficient to just depend
79 # on the grit rule. But maybe some of these will need to be added?
81 # Need this annoying rebase_path call to match what happened with the
83 sources -= rebase_path(
85 "$root_gen_dir/blink/grit/devtools_resources.h",
86 "$root_gen_dir/blink/grit/devtools_resources_map.cc",
87 "$root_gen_dir/blink/grit/devtools_resources_map.h",
88 "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
89 "$root_gen_dir/ui/resources/grit/webui_resources_map.cc",
90 "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_dispatcher.cc",
91 "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_dispatcher.h",
99 "//content/app/resources",
100 "//content/app/strings",
101 "//content/browser/devtools:resources",
102 "//content/common:mojo_bindings",
103 "//content/public/common:mojo_bindings",
104 "//device/bluetooth",
108 "//third_party/WebKit/public:resources",
109 "//third_party/angle:commit_id",
111 "//third_party/leveldatabase",
112 "//third_party/libyuv",
113 "//third_party/mojo/src/mojo/public/cpp/bindings",
114 "//third_party/mojo/src/mojo/public/interfaces/application",
115 "//third_party/mojo/src/mojo/public/js",
118 "//ui/touch_selection",
122 configs += [ "//content:content_implementation" ]
125 deps += [ "//ui/events" ]
130 "power_profiler/power_data_provider_ia_win.cc",
131 "power_profiler/power_data_provider_ia_win.h",
133 deps += [ "//third_party/power_gadget" ]
136 "power_profiler/power_data_provider_dummy.cc",
137 "file_descriptor_info_impl.cc",
138 "file_descriptor_info_impl.h",
140 sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
143 if (!is_win && !is_mac && !is_android && (!is_linux || !use_udev)) {
144 sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
147 if (enable_basic_printing || enable_print_preview) {
148 deps += [ "//printing" ]
152 # ['OS!="ios" and chrome_multiple_dll!=1', {
154 # '../third_party/WebKit/public/blink.gyp:blink',
157 if (!is_mac && !is_ios) {
158 deps += [ "//sandbox" ]
160 if (!is_android && !is_ios) {
161 deps += [ "//content/browser/tracing:resources" ]
165 sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
168 deps += [ "//jingle:jingle_glue" ]
170 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
172 if (is_linux || is_mac || is_win) {
174 "media/capture/desktop_capture_device.cc",
175 "media/capture/desktop_capture_device.h",
176 "media/capture/desktop_capture_device_uma_types.cc",
177 "media/capture/desktop_capture_device_uma_types.h",
181 "media/capture/desktop_capture_device_aura.cc",
182 "media/capture/desktop_capture_device_aura.h",
185 defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
186 deps += [ "//third_party/webrtc/modules/desktop_capture" ]
192 "device_sensors/data_fetcher_shared_memory_default.cc",
193 "geolocation/empty_wifi_data_provider.cc",
196 # This prevents the inclusion of atlhost.h which paired
197 # with the windows 8 sdk it does the wrong thing.
201 "//third_party/iaccessible2",
202 "//third_party/isimpledom",
210 "portabledeviceguids.lib",
224 deps += [ "//sandbox/linux:libc_urandom_override" ]
228 deps += [ "//device/udev_linux" ]
230 # Remove udev-specific sources.
232 "device_monitor_udev.cc",
233 "device_monitor_udev.h",
236 # Already filtered out on non-Linux.
238 "gamepad/gamepad_platform_data_fetcher_linux.cc",
245 if (enable_plugins) {
246 sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
251 "//ppapi:ppapi_shared",
253 if (!use_ozone || use_pango) {
254 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
257 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_pango.cc" ]
261 if (is_linux && use_aura) {
262 configs += [ "//build/config/linux:fontconfig" ]
266 configs += [ "//build/config/linux:x11" ]
267 deps += [ "//ui/gfx/x" ]
270 # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated
271 # given the interaction between os_chromeos and the feature flags for X11 and
272 # ozone, so do it all in one spot.
273 if (is_chromeos || !use_ozone) {
274 sources -= [ "power_save_blocker_ozone.cc" ]
276 if (is_chromeos || !use_x11) {
277 sources -= [ "power_save_blocker_x11.cc" ]
280 # Dealing with *wifi_data_provider_*.cc is also a bit complicated given
281 # android, chromeos, linux and use_dbus.
283 sources -= [ "geolocation/wifi_data_provider_common.cc" ]
285 if (is_chromeos || (is_linux && !use_dbus)) {
286 sources -= [ "geolocation/wifi_data_provider_linux.cc" ]
288 if (is_linux && use_dbus) {
289 sources -= [ "geolocation/empty_wifi_data_provider.cc" ]
293 configs += [ "//build/config/linux:pangocairo" ]
297 sources += rebase_path(content_browser_gypi_values.android_browser_sources,
301 "browser_ipc_logging.cc",
302 "device_sensors/data_fetcher_shared_memory_default.cc",
303 "font_list_async.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",
368 "renderer_host/input/synthetic_gesture_target_aura.cc",
369 "renderer_host/input/synthetic_gesture_target_aura.h",
370 "renderer_host/native_web_keyboard_event_aura.cc",
371 "renderer_host/render_widget_host_view_aura.cc",
372 "renderer_host/render_widget_host_view_aura.h",
373 "renderer_host/ui_events_helper.cc",
374 "renderer_host/ui_events_helper.h",
375 "renderer_host/web_input_event_aura.cc",
376 "renderer_host/web_input_event_aura.h",
377 "web_contents/aura/gesture_nav_simple.cc",
378 "web_contents/aura/gesture_nav_simple.h",
379 "web_contents/aura/image_window_delegate.cc",
380 "web_contents/aura/image_window_delegate.h",
381 "web_contents/aura/overscroll_navigation_overlay.cc",
382 "web_contents/aura/overscroll_navigation_overlay.h",
383 "web_contents/aura/shadow_layer_delegate.cc",
384 "web_contents/aura/shadow_layer_delegate.h",
385 "web_contents/aura/window_slider.cc",
386 "web_contents/aura/window_slider.h",
387 "web_contents/touch_editable_impl_aura.cc",
388 "web_contents/touch_editable_impl_aura.h",
389 "web_contents/web_contents_view_aura.cc",
390 "web_contents/web_contents_view_aura.h",
394 if (use_aura || is_mac) {
396 rebase_path(content_browser_gypi_values.compositor_browser_sources,
401 "compositor/software_output_device_x11.cc",
402 "compositor/software_output_device_x11.h",
408 "compositor/overlay_candidate_validator_ozone.cc",
409 "compositor/overlay_candidate_validator_ozone.h",
410 "compositor/software_output_device_ozone.cc",
411 "compositor/software_output_device_ozone.h",
414 deps += [ "//ui/compositor" ]
417 if (enable_web_speech) {
419 "//third_party/flac",
420 "//third_party/speex",
424 if (is_linux && use_dbus) {
428 if (enable_browser_cdms) {
430 "media/cdm/browser_cdm_manager.cc",
431 "media/cdm/browser_cdm_manager.h",
432 "media/media_web_contents_observer.cc",
433 "media/media_web_contents_observer.h",
437 if (is_linux && use_openssl) {
438 deps += [ "//third_party/boringssl" ]
441 if (enable_media_mojo_renderer) {
442 deps += [ "//media/mojo/services:renderer_service" ]