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:resources",
113 "//third_party/angle:commit_id",
115 "//third_party/leveldatabase",
116 "//third_party/libyuv",
117 "//third_party/mojo/src/mojo/public/cpp/bindings",
118 "//third_party/mojo/src/mojo/public/interfaces/application",
119 "//third_party/mojo/src/mojo/public/js",
123 "//ui/touch_selection",
128 "//content:content_implementation",
129 "//third_party/WebKit/public:debug_devtools",
133 deps += [ "//ui/events" ]
138 "power_profiler/power_data_provider_ia_win.cc",
139 "power_profiler/power_data_provider_ia_win.h",
141 deps += [ "//third_party/power_gadget" ]
144 "file_descriptor_info_impl.cc",
145 "file_descriptor_info_impl.h",
146 "power_profiler/power_data_provider_dummy.cc",
148 sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
151 if (!is_win && !is_mac && !is_android && (!is_linux || !use_udev)) {
152 sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
155 if (enable_basic_printing || enable_print_preview) {
156 deps += [ "//printing" ]
160 # ['OS!="ios" and chrome_multiple_dll!=1', {
162 # '../third_party/WebKit/public/blink.gyp:blink',
165 if (!is_mac && !is_ios) {
166 deps += [ "//sandbox" ]
168 if (!is_android && !is_ios) {
169 deps += [ "//content/browser/tracing:resources" ]
173 sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
176 deps += [ "//jingle:jingle_glue" ]
178 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
180 if (is_linux || is_mac || is_win) {
182 "media/capture/desktop_capture_device.cc",
183 "media/capture/desktop_capture_device.h",
184 "media/capture/desktop_capture_device_uma_types.cc",
185 "media/capture/desktop_capture_device_uma_types.h",
189 "media/capture/aura_window_capture_machine.cc",
190 "media/capture/aura_window_capture_machine.h",
191 "media/capture/desktop_capture_device_aura.cc",
192 "media/capture/desktop_capture_device_aura.h",
195 defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
196 deps += [ "//third_party/webrtc/modules/desktop_capture" ]
198 if (is_linux || is_mac) {
200 "renderer_host/media/video_capture_texture_wrapper.cc",
201 "renderer_host/media/video_capture_texture_wrapper.h",
208 "device_sensors/data_fetcher_shared_memory_default.cc",
209 "geolocation/empty_wifi_data_provider.cc",
212 # This prevents the inclusion of atlhost.h which paired
213 # with the windows 8 sdk it does the wrong thing.
217 "//third_party/iaccessible2",
218 "//third_party/isimpledom",
226 "portabledeviceguids.lib",
240 deps += [ "//sandbox/linux:libc_urandom_override" ]
244 deps += [ "//device/udev_linux" ]
246 # Remove udev-specific sources.
248 "device_monitor_udev.cc",
249 "device_monitor_udev.h",
252 # Already filtered out on non-Linux.
254 "gamepad/gamepad_platform_data_fetcher_linux.cc",
261 if (enable_plugins) {
262 sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
267 "//ppapi/shared_impl",
269 if (!use_ozone || use_pango) {
270 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
273 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_pango.cc" ]
277 if (is_linux && use_aura) {
278 configs += [ "//build/config/linux:fontconfig" ]
282 configs += [ "//build/config/linux:x11" ]
283 deps += [ "//ui/gfx/x" ]
286 # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated
287 # given the interaction between os_chromeos and the feature flags for X11 and
288 # ozone, so do it all in one spot.
289 if (is_chromeos || !use_ozone) {
290 sources -= [ "power_save_blocker_ozone.cc" ]
292 if (is_chromeos || !use_x11) {
293 sources -= [ "power_save_blocker_x11.cc" ]
296 # Dealing with *wifi_data_provider_*.cc is also a bit complicated given
297 # android, chromeos, linux and use_dbus.
299 sources -= [ "geolocation/wifi_data_provider_common.cc" ]
301 if (is_chromeos || (is_linux && !use_dbus)) {
302 sources -= [ "geolocation/wifi_data_provider_linux.cc" ]
304 if (is_linux && use_dbus) {
305 sources -= [ "geolocation/empty_wifi_data_provider.cc" ]
309 configs += [ "//build/config/linux:pangocairo" ]
313 sources += rebase_path(content_browser_gypi_values.android_browser_sources,
317 "browser_ipc_logging.cc",
318 "device_sensors/data_fetcher_shared_memory_default.cc",
319 "geolocation/network_location_provider.cc",
320 "geolocation/network_location_provider.h",
321 "geolocation/network_location_request.cc",
322 "geolocation/network_location_request.h",
323 "tracing/tracing_ui.cc",
324 "tracing/tracing_ui.h",
326 # Android skips most, but not all, of the speech code.
327 "speech/audio_buffer.cc",
328 "speech/audio_buffer.h",
329 "speech/audio_encoder.cc",
330 "speech/audio_encoder.h",
331 "speech/chunked_byte_buffer.cc",
332 "speech/chunked_byte_buffer.h",
333 "speech/endpointer/endpointer.cc",
334 "speech/endpointer/endpointer.h",
335 "speech/endpointer/energy_endpointer.cc",
336 "speech/endpointer/energy_endpointer.h",
337 "speech/endpointer/energy_endpointer_params.cc",
338 "speech/endpointer/energy_endpointer_params.h",
339 "speech/google_one_shot_remote_engine.cc",
340 "speech/google_one_shot_remote_engine.h",
341 "speech/google_streaming_remote_engine.cc",
342 "speech/google_streaming_remote_engine.h",
343 "speech/speech_recognition_engine.cc",
344 "speech/speech_recognition_engine.h",
345 "speech/speech_recognizer_impl.cc",
346 "speech/speech_recognizer_impl.h",
349 "//content/public/android:jni",
351 "//mojo/android:libsystem_java",
354 libs += [ "jnigraphics" ]
359 "device_sensors/data_fetcher_shared_memory_default.cc",
360 "geolocation/empty_wifi_data_provider.cc",
361 "geolocation/empty_wifi_data_provider.h",
363 deps += [ "//ui/accelerated_widget_mac" ]
368 sources -= [ "device_sensors/data_fetcher_shared_memory_default.cc" ]
371 "//chromeos:power_manager_proto",
384 "renderer_host/input/synthetic_gesture_target_aura.cc",
385 "renderer_host/input/synthetic_gesture_target_aura.h",
386 "renderer_host/native_web_keyboard_event_aura.cc",
387 "renderer_host/render_widget_host_view_aura.cc",
388 "renderer_host/render_widget_host_view_aura.h",
389 "renderer_host/ui_events_helper.cc",
390 "renderer_host/ui_events_helper.h",
391 "renderer_host/web_input_event_aura.cc",
392 "renderer_host/web_input_event_aura.h",
393 "web_contents/aura/gesture_nav_simple.cc",
394 "web_contents/aura/gesture_nav_simple.h",
395 "web_contents/aura/overscroll_navigation_overlay.cc",
396 "web_contents/aura/overscroll_navigation_overlay.h",
397 "web_contents/aura/shadow_layer_delegate.cc",
398 "web_contents/aura/shadow_layer_delegate.h",
399 "web_contents/aura/window_slider.cc",
400 "web_contents/aura/window_slider.h",
401 "web_contents/touch_editable_impl_aura.cc",
402 "web_contents/touch_editable_impl_aura.h",
403 "web_contents/web_contents_view_aura.cc",
404 "web_contents/web_contents_view_aura.h",
408 if (use_aura || is_mac) {
410 rebase_path(content_browser_gypi_values.compositor_browser_sources,
415 "compositor/software_output_device_x11.cc",
416 "compositor/software_output_device_x11.h",
422 "compositor/overlay_candidate_validator_ozone.cc",
423 "compositor/overlay_candidate_validator_ozone.h",
424 "compositor/software_output_device_ozone.cc",
425 "compositor/software_output_device_ozone.h",
428 deps += [ "//ui/compositor" ]
431 if (enable_web_speech) {
433 "//third_party/flac",
434 "//third_party/speex",
438 if (is_linux && use_dbus) {
442 if (enable_browser_cdms) {
444 "media/cdm/browser_cdm_manager.cc",
445 "media/cdm/browser_cdm_manager.h",
446 "media/media_web_contents_observer.cc",
447 "media/media_web_contents_observer.h",
451 if (is_linux && use_openssl) {
452 deps += [ "//third_party/boringssl" ]
455 if (enable_media_mojo_renderer) {
456 deps += [ "//media/mojo/services:renderer_service" ]