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")
8 import("//media/media_options.gni")
10 source_set("browser") {
11 # Only the public target should depend on this. All other targets (even
12 # internal content ones) should depend on the public one.
13 visibility = [ "//content/public/browser:browser_sources" ]
19 # Shared deps. See also non-iOS deps below.
23 "//content:resources",
24 "//content/browser/service_worker:proto",
25 "//content/browser/speech/proto",
26 "//content/public/common:common_sources",
33 "//third_party/npapi",
35 "//third_party/WebKit/public:blink_headers",
37 "//third_party/zlib:zip",
39 "//ui/accessibility:ax_gen",
42 "//ui/events:gesture_detection",
52 # iOS doesn't get the normal file list and only takes these whitelisted
56 "browser_main_loop.cc",
57 "browser_main_runner.cc",
58 "browser_process_sub_thread.cc",
59 "browser_thread_impl.cc",
60 "browser_url_handler_impl.cc",
62 "download/download_create_info.cc",
63 "notification_service_impl.cc",
64 "signed_certificate_timestamp_store_impl.cc",
66 "web_contents/navigation_entry_impl.cc",
69 # Normal non-iOS sources get everything.
70 sources = rebase_path(content_browser_gypi_values.private_browser_sources,
73 # TODO(GYP) these generated files are listed as sources in content_browser.
74 # This is a bit suspicious. The GN grit template will make a source set
75 # containing the generated code so it should be sufficient to just depend
76 # on the grit rule. But maybe some of these will need to be added?
78 # Need this annoying rebase_path call to match what happened with the
80 sources -= rebase_path([
81 "$root_gen_dir/webkit/grit/devtools_resources.h",
82 "$root_gen_dir/webkit/grit/devtools_resources_map.cc",
83 "$root_gen_dir/webkit/grit/devtools_resources_map.h",
84 "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
85 "$root_gen_dir/ui/resources/grit/webui_resources_map.cc",
86 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.cc",
87 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.h",
88 "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_handler_impl.cc",
89 "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_handler_impl.h",
96 "//content/app/resources",
97 "//content/app/strings",
98 "//content/browser/devtools:resources",
99 "//content/common:mojo_bindings",
100 "//content/public/common:mojo_bindings",
101 "//mojo/public/cpp/bindings",
102 "//mojo/public/interfaces/application",
107 "//third_party/WebKit/public:resources",
108 "//third_party/angle:commit_id",
110 "//third_party/leveldatabase",
111 "//third_party/libyuv",
118 "//content:content_implementation",
122 deps += [ "//ui/events" ]
127 "power_profiler/power_data_provider_ia_win.cc",
128 "power_profiler/power_data_provider_ia_win.h",
130 deps += [ "//third_party/power_gadget" ]
133 "power_profiler/power_data_provider_dummy.cc",
134 "file_descriptor_info_impl.cc",
135 "file_descriptor_info_impl.h",
137 sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
140 if (!is_win && !is_mac && !is_android && (!is_linux || !use_udev)) {
141 sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
144 if (enable_basic_printing || enable_print_preview) {
145 deps += [ "//printing" ]
149 # ['OS!="ios" and chrome_multiple_dll!=1', {
151 # '../third_party/WebKit/public/blink.gyp:blink',
154 if (!is_mac && !is_ios) {
155 deps += [ "//sandbox" ]
157 if (!is_android && !is_ios) {
158 deps += [ "//content/browser/tracing:resources" ]
162 sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
164 deps += [ "//jingle:jingle_glue" ]
166 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
168 if (is_linux || is_mac || is_win) {
170 "media/capture/desktop_capture_device.cc",
171 "media/capture/desktop_capture_device.h",
172 "media/capture/desktop_capture_device_uma_types.cc",
173 "media/capture/desktop_capture_device_uma_types.h",
177 "media/capture/desktop_capture_device_aura.cc",
178 "media/capture/desktop_capture_device_aura.h",
181 defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
182 deps += [ "//third_party/webrtc/modules/desktop_capture" ]
188 "device_sensors/data_fetcher_shared_memory_default.cc",
189 "geolocation/empty_wifi_data_provider.cc",
192 # This prevents the inclusion of atlhost.h which paired
193 # with the windows 8 sdk it does the wrong thing.
197 "//third_party/iaccessible2",
198 "//third_party/isimpledom",
206 "portabledeviceguids.lib",
219 deps += [ "//sandbox/linux:libc_urandom_override" ]
223 configs += [ "//build/config/linux:udev" ]
225 # Remove udev-specific sources.
227 "device_monitor_udev.cc",
228 "device_monitor_udev.h",
231 # Already filtered out on non-Linux.
233 "gamepad/gamepad_platform_data_fetcher_linux.cc",
240 if (enable_plugins) {
241 sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
245 "//ppapi:ppapi_shared",
247 if (!use_ozone || use_pango) {
248 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
251 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_pango.cc" ]
255 if (is_linux && use_aura) {
256 configs += [ "//build/config/linux:fontconfig" ]
260 configs += [ "//build/config/linux:x11" ]
263 # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated
264 # given the interaction between os_chromeos and the feature flags for X11 and
265 # ozone, so do it all in one spot.
266 if (is_chromeos || !use_ozone) {
267 sources -= [ "power_save_blocker_ozone.cc", ]
269 if (is_chromeos || !use_x11) {
270 sources -= [ "power_save_blocker_x11.cc", ]
273 # Dealing with *wifi_data_provider_*.cc is also a bit complicated given
274 # android, chromeos, linux and use_dbus.
276 sources -= [ "geolocation/wifi_data_provider_common.cc" ]
278 if (is_chromeos || (is_linux && !use_dbus)) {
279 sources -= [ "geolocation/wifi_data_provider_linux.cc" ]
281 if (is_linux && use_dbus) {
282 sources -= [ "geolocation/empty_wifi_data_provider.cc" ]
286 configs += [ "//build/config/linux:pangocairo" ]
290 sources += rebase_path(content_browser_gypi_values.android_browser_sources,
293 "browser_ipc_logging.cc",
294 "device_sensors/data_fetcher_shared_memory_default.cc",
295 "font_list_async.cc",
296 "geolocation/network_location_provider.cc",
297 "geolocation/network_location_provider.h",
298 "geolocation/network_location_request.cc",
299 "geolocation/network_location_request.h",
300 "renderer_host/native_web_keyboard_event.cc",
301 "tracing/tracing_ui.cc",
302 "tracing/tracing_ui.h",
304 # Android skips most, but not all, of the speech code.
305 "speech/audio_buffer.cc",
306 "speech/audio_buffer.h",
307 "speech/audio_encoder.cc",
308 "speech/audio_encoder.h",
309 "speech/chunked_byte_buffer.cc",
310 "speech/chunked_byte_buffer.h",
311 "speech/endpointer/endpointer.cc",
312 "speech/endpointer/endpointer.h",
313 "speech/endpointer/energy_endpointer.cc",
314 "speech/endpointer/energy_endpointer.h",
315 "speech/endpointer/energy_endpointer_params.cc",
316 "speech/endpointer/energy_endpointer_params.h",
317 "speech/google_one_shot_remote_engine.cc",
318 "speech/google_one_shot_remote_engine.h",
319 "speech/google_streaming_remote_engine.cc",
320 "speech/google_streaming_remote_engine.h",
321 "speech/speech_recognition_engine.cc",
322 "speech/speech_recognition_engine.h",
323 "speech/speech_recognizer_impl.cc",
324 "speech/speech_recognizer_impl.h",
327 "//content/public/android:jni",
329 "//mojo/android:libsystem_java",
331 libs += [ "jnigraphics" ]
336 "device_sensors/data_fetcher_shared_memory_default.cc",
337 "geolocation/empty_wifi_data_provider.cc",
338 "geolocation/empty_wifi_data_provider.h",
346 "//chromeos:power_manager_proto",
358 "renderer_host/input/synthetic_gesture_target_aura.cc",
359 "renderer_host/input/synthetic_gesture_target_aura.h",
360 "renderer_host/native_web_keyboard_event_aura.cc",
361 "renderer_host/render_widget_host_view_aura.cc",
362 "renderer_host/render_widget_host_view_aura.h",
363 "renderer_host/ui_events_helper.cc",
364 "renderer_host/ui_events_helper.h",
365 "renderer_host/web_input_event_aura.cc",
366 "renderer_host/web_input_event_aura.h",
367 "web_contents/aura/gesture_nav_simple.cc",
368 "web_contents/aura/gesture_nav_simple.h",
369 "web_contents/aura/image_window_delegate.cc",
370 "web_contents/aura/image_window_delegate.h",
371 "web_contents/aura/overscroll_navigation_overlay.cc",
372 "web_contents/aura/overscroll_navigation_overlay.h",
373 "web_contents/aura/shadow_layer_delegate.cc",
374 "web_contents/aura/shadow_layer_delegate.h",
375 "web_contents/aura/window_slider.cc",
376 "web_contents/aura/window_slider.h",
377 "web_contents/touch_editable_impl_aura.cc",
378 "web_contents/touch_editable_impl_aura.h",
379 "web_contents/web_contents_view_aura.cc",
380 "web_contents/web_contents_view_aura.h",
384 if (use_aura || is_mac || is_android) {
385 sources += rebase_path(
386 content_browser_gypi_values.compositor_browser_surface_sources,
389 if (use_aura || is_mac) {
390 sources += rebase_path(
391 content_browser_gypi_values.compositor_browser_sources,
395 "compositor/software_output_device_x11.cc",
396 "compositor/software_output_device_x11.h",
402 "compositor/overlay_candidate_validator_ozone.cc",
403 "compositor/overlay_candidate_validator_ozone.h",
404 "compositor/software_output_device_ozone.cc",
405 "compositor/software_output_device_ozone.h",
408 deps += [ "//ui/compositor" ]
411 if (enable_web_speech) {
413 "//third_party/flac",
414 "//third_party/speex",
418 if (is_linux && use_dbus) {
422 if (enable_browser_cdms) {
424 "media/cdm/browser_cdm_manager.cc",
425 "media/cdm/browser_cdm_manager.h",
426 "media/media_web_contents_observer.cc",
427 "media/media_web_contents_observer.h",