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/background_sync:background_sync_proto",
26 "//content/browser/cache_storage:cache_storage_proto",
27 "//content/browser/notifications:notification_proto",
28 "//content/browser/service_worker:service_worker_proto",
29 "//content/browser/speech/proto",
30 "//content/public/common:common_sources",
38 "//third_party/npapi",
40 "//third_party/WebKit/public:blink_headers",
42 "//third_party/zlib:zip",
44 "//ui/accessibility:ax_gen",
48 "//ui/events:gesture_detection",
58 # iOS doesn't get the normal file list and only takes these whitelisted
62 "browser_main_loop.cc",
63 "browser_main_runner.cc",
64 "browser_process_sub_thread.cc",
65 "browser_thread_impl.cc",
66 "browser_url_handler_impl.cc",
68 "download/download_create_info.cc",
69 "notification_service_impl.cc",
70 "signed_certificate_timestamp_store_impl.cc",
72 "web_contents/navigation_entry_impl.cc",
75 # Normal non-iOS sources get everything.
76 sources = rebase_path(content_browser_gypi_values.private_browser_sources,
80 # TODO(GYP) these generated files are listed as sources in content_browser.
81 # This is a bit suspicious. The GN grit template will make a source set
82 # containing the generated code so it should be sufficient to just depend
83 # on the grit rule. But maybe some of these will need to be added?
85 # Need this annoying rebase_path call to match what happened with the
87 sources -= rebase_path(
89 "$root_gen_dir/blink/grit/devtools_resources.h",
90 "$root_gen_dir/blink/grit/devtools_resources_map.cc",
91 "$root_gen_dir/blink/grit/devtools_resources_map.h",
92 "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_dispatcher.cc",
93 "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_dispatcher.h",
94 "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
95 "$root_gen_dir/ui/resources/grit/webui_resources_map.cc",
103 "//content/app/resources",
104 "//content/app/strings",
105 "//content/browser/devtools:resources",
106 "//content/common:mojo_bindings",
107 "//content/public/common:mojo_bindings",
108 "//device/bluetooth",
112 "//third_party/WebKit/public:image_resources",
113 "//third_party/WebKit/public:resources",
114 "//third_party/angle:commit_id",
116 "//third_party/leveldatabase",
117 "//third_party/libyuv",
118 "//third_party/mojo/src/mojo/public/cpp/bindings",
119 "//third_party/mojo/src/mojo/public/interfaces/application",
120 "//third_party/mojo/src/mojo/public/js",
124 "//ui/touch_selection",
129 "//content:content_implementation",
130 "//third_party/WebKit/public:debug_devtools",
134 deps += [ "//ui/events" ]
139 "power_profiler/power_data_provider_ia_win.cc",
140 "power_profiler/power_data_provider_ia_win.h",
142 deps += [ "//third_party/power_gadget" ]
145 "file_descriptor_info_impl.cc",
146 "file_descriptor_info_impl.h",
147 "power_profiler/power_data_provider_dummy.cc",
149 sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
152 if (!is_win && !is_mac && !is_android && (!is_linux || !use_udev)) {
153 sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
156 if (enable_basic_printing || enable_print_preview) {
157 deps += [ "//printing" ]
161 # ['OS!="ios" and chrome_multiple_dll!=1', {
163 # '../third_party/WebKit/public/blink.gyp:blink',
166 if (!is_mac && !is_ios) {
167 deps += [ "//sandbox" ]
169 if (!is_android && !is_ios) {
170 deps += [ "//content/browser/tracing:resources" ]
174 sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
177 deps += [ "//jingle:jingle_glue" ]
179 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
181 if (is_linux || is_mac || is_win) {
183 "media/capture/desktop_capture_device.cc",
184 "media/capture/desktop_capture_device.h",
185 "media/capture/desktop_capture_device_uma_types.cc",
186 "media/capture/desktop_capture_device_uma_types.h",
190 "media/capture/aura_window_capture_machine.cc",
191 "media/capture/aura_window_capture_machine.h",
192 "media/capture/desktop_capture_device_aura.cc",
193 "media/capture/desktop_capture_device_aura.h",
196 defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
197 deps += [ "//third_party/webrtc/modules/desktop_capture" ]
199 if (is_linux || is_mac) {
201 "renderer_host/media/video_capture_texture_wrapper.cc",
202 "renderer_host/media/video_capture_texture_wrapper.h",
209 "device_sensors/data_fetcher_shared_memory_default.cc",
210 "geolocation/empty_wifi_data_provider.cc",
213 # This prevents the inclusion of atlhost.h which paired
214 # with the windows 8 sdk it does the wrong thing.
218 "//third_party/iaccessible2",
219 "//third_party/isimpledom",
227 "portabledeviceguids.lib",
241 deps += [ "//sandbox/linux:libc_urandom_override" ]
245 deps += [ "//device/udev_linux" ]
247 # Remove udev-specific sources.
249 "device_monitor_udev.cc",
250 "device_monitor_udev.h",
253 # Already filtered out on non-Linux.
255 "gamepad/gamepad_platform_data_fetcher_linux.cc",
262 if (enable_plugins) {
263 sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
268 "//ppapi/shared_impl",
270 if (!use_ozone || use_pango) {
271 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
274 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_pango.cc" ]
278 if (is_linux && use_aura) {
279 configs += [ "//build/config/linux:fontconfig" ]
283 configs += [ "//build/config/linux:x11" ]
284 deps += [ "//ui/gfx/x" ]
287 # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated
288 # given the interaction between os_chromeos and the feature flags for X11 and
289 # ozone, so do it all in one spot.
290 if (is_chromeos || !use_ozone) {
291 sources -= [ "power_save_blocker_ozone.cc" ]
293 if (is_chromeos || !use_x11) {
294 sources -= [ "power_save_blocker_x11.cc" ]
297 # Dealing with *wifi_data_provider_*.cc is also a bit complicated given
298 # android, chromeos, linux and use_dbus.
300 sources -= [ "geolocation/wifi_data_provider_common.cc" ]
302 if (is_chromeos || (is_linux && !use_dbus)) {
303 sources -= [ "geolocation/wifi_data_provider_linux.cc" ]
305 if (is_linux && use_dbus) {
306 sources -= [ "geolocation/empty_wifi_data_provider.cc" ]
310 configs += [ "//build/config/linux:pangocairo" ]
314 sources += rebase_path(content_browser_gypi_values.android_browser_sources,
318 "browser_ipc_logging.cc",
319 "device_sensors/data_fetcher_shared_memory_default.cc",
320 "geolocation/network_location_provider.cc",
321 "geolocation/network_location_provider.h",
322 "geolocation/network_location_request.cc",
323 "geolocation/network_location_request.h",
324 "tracing/tracing_ui.cc",
325 "tracing/tracing_ui.h",
327 # Android skips most, but not all, of the speech code.
328 "speech/audio_buffer.cc",
329 "speech/audio_buffer.h",
330 "speech/audio_encoder.cc",
331 "speech/audio_encoder.h",
332 "speech/chunked_byte_buffer.cc",
333 "speech/chunked_byte_buffer.h",
334 "speech/endpointer/endpointer.cc",
335 "speech/endpointer/endpointer.h",
336 "speech/endpointer/energy_endpointer.cc",
337 "speech/endpointer/energy_endpointer.h",
338 "speech/endpointer/energy_endpointer_params.cc",
339 "speech/endpointer/energy_endpointer_params.h",
340 "speech/google_one_shot_remote_engine.cc",
341 "speech/google_one_shot_remote_engine.h",
342 "speech/google_streaming_remote_engine.cc",
343 "speech/google_streaming_remote_engine.h",
344 "speech/speech_recognition_engine.cc",
345 "speech/speech_recognition_engine.h",
346 "speech/speech_recognizer_impl.cc",
347 "speech/speech_recognizer_impl.h",
350 "//content/public/android:jni",
352 "//mojo/android:libsystem_java",
355 libs += [ "jnigraphics" ]
360 "device_sensors/data_fetcher_shared_memory_default.cc",
361 "geolocation/empty_wifi_data_provider.cc",
362 "geolocation/empty_wifi_data_provider.h",
364 deps += [ "//ui/accelerated_widget_mac" ]
369 sources -= [ "device_sensors/data_fetcher_shared_memory_default.cc" ]
372 "//chromeos:power_manager_proto",
385 "renderer_host/input/synthetic_gesture_target_aura.cc",
386 "renderer_host/input/synthetic_gesture_target_aura.h",
387 "renderer_host/native_web_keyboard_event_aura.cc",
388 "renderer_host/render_widget_host_view_aura.cc",
389 "renderer_host/render_widget_host_view_aura.h",
390 "renderer_host/ui_events_helper.cc",
391 "renderer_host/ui_events_helper.h",
392 "renderer_host/web_input_event_aura.cc",
393 "renderer_host/web_input_event_aura.h",
394 "web_contents/aura/gesture_nav_simple.cc",
395 "web_contents/aura/gesture_nav_simple.h",
396 "web_contents/aura/overscroll_navigation_overlay.cc",
397 "web_contents/aura/overscroll_navigation_overlay.h",
398 "web_contents/aura/shadow_layer_delegate.cc",
399 "web_contents/aura/shadow_layer_delegate.h",
400 "web_contents/aura/window_slider.cc",
401 "web_contents/aura/window_slider.h",
402 "web_contents/touch_editable_impl_aura.cc",
403 "web_contents/touch_editable_impl_aura.h",
404 "web_contents/web_contents_view_aura.cc",
405 "web_contents/web_contents_view_aura.h",
409 if (use_aura || is_mac) {
411 rebase_path(content_browser_gypi_values.compositor_browser_sources,
416 "compositor/software_output_device_x11.cc",
417 "compositor/software_output_device_x11.h",
423 "compositor/overlay_candidate_validator_ozone.cc",
424 "compositor/overlay_candidate_validator_ozone.h",
425 "compositor/software_output_device_ozone.cc",
426 "compositor/software_output_device_ozone.h",
429 deps += [ "//ui/compositor" ]
432 if (enable_web_speech) {
434 "//third_party/flac",
435 "//third_party/speex",
439 if (is_linux && use_dbus) {
443 if (enable_browser_cdms) {
445 "media/cdm/browser_cdm_manager.cc",
446 "media/cdm/browser_cdm_manager.h",
447 "media/media_web_contents_observer.cc",
448 "media/media_web_contents_observer.h",
452 if (is_linux && use_openssl) {
453 deps += [ "//third_party/boringssl" ]
456 if (enable_media_mojo_renderer) {
457 deps += [ "//media/mojo/services:renderer_service" ]