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",
32 "//third_party/npapi",
34 "//third_party/WebKit/public:blink_headers",
36 "//third_party/zlib:zip",
38 "//ui/accessibility:ax_gen",
41 "//ui/events:gesture_detection",
51 # iOS doesn't get the normal file list and only takes these whitelisted
55 "browser_main_loop.cc",
56 "browser_main_runner.cc",
57 "browser_process_sub_thread.cc",
58 "browser_thread_impl.cc",
59 "browser_url_handler_impl.cc",
61 "download/download_create_info.cc",
62 "notification_service_impl.cc",
63 "signed_certificate_timestamp_store_impl.cc",
65 "web_contents/navigation_entry_impl.cc",
68 # Normal non-iOS sources get everything.
69 sources = rebase_path(content_browser_gypi_values.private_browser_sources,
72 # TODO(GYP) these generated files are listed as sources in content_browser.
73 # This is a bit suspicious. The GN grit template will make a source set
74 # containing the generated code so it should be sufficient to just depend
75 # on the grit rule. But maybe some of these will need to be added?
77 # Need this annoying rebase_path call to match what happened with the
79 sources -= rebase_path([
80 "$root_gen_dir/webkit/grit/devtools_resources.h",
81 "$root_gen_dir/webkit/grit/devtools_resources_map.cc",
82 "$root_gen_dir/webkit/grit/devtools_resources_map.h",
83 "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
84 "$root_gen_dir/ui/resources/grit/webui_resources_map.cc",
85 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.cc",
86 "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.h",
93 "//content/app/resources",
94 "//content/app/strings",
95 "//content/browser/devtools:resources",
96 "//content/common:mojo_bindings",
97 "//mojo/public/cpp/bindings",
98 "//mojo/public/interfaces/application",
99 "//mojo/public/js/bindings",
103 "//third_party/WebKit/public:resources",
104 "//third_party/angle:commit_id",
106 "//third_party/leveldatabase",
107 "//third_party/libyuv",
114 "//content:content_implementation",
118 deps += [ "//ui/events" ]
123 "power_profiler/power_data_provider_ia_win.cc",
124 "power_profiler/power_data_provider_ia_win.h",
126 deps += [ "//third_party/power_gadget" ]
128 sources += [ "power_profiler/power_data_provider_dummy.cc" ]
129 sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
132 if (!is_win && !is_mac && !is_android && (!is_linux || !use_udev)) {
133 sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
136 if (printing_mode != 0) {
137 deps += [ "//printing" ]
141 # ['OS!="ios" and chrome_multiple_dll!=1', {
143 # '../third_party/WebKit/public/blink.gyp:blink',
146 if (!is_mac && !is_ios) {
147 deps += [ "//sandbox" ]
149 if (!is_android && !is_ios) {
150 deps += [ "//content/browser/tracing:resources" ]
154 sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
156 deps += [ "//jingle:jingle_glue" ]
158 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
160 if (is_linux || is_mac || is_win) {
162 "media/capture/desktop_capture_device.cc",
163 "media/capture/desktop_capture_device.h",
164 "media/capture/desktop_capture_device_uma_types.cc",
165 "media/capture/desktop_capture_device_uma_types.h",
169 "media/capture/desktop_capture_device_aura.cc",
170 "media/capture/desktop_capture_device_aura.h",
173 defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
174 deps += [ "//third_party/webrtc/modules/desktop_capture" ]
180 "device_sensors/data_fetcher_shared_memory_default.cc",
181 "geolocation/empty_wifi_data_provider.cc",
184 # This prevents the inclusion of atlhost.h which paired
185 # with the windows 8 sdk it does the wrong thing.
189 "//third_party/iaccessible2",
190 "//third_party/isimpledom",
198 "portabledeviceguids.lib",
211 deps += [ "//sandbox/linux:libc_urandom_override" ]
215 configs += [ "//build/config/linux:udev" ]
217 # Remove udev-specific sources.
219 "device_monitor_udev.cc",
220 "device_monitor_udev.h",
223 # Already filtered out on non-Linux.
225 "gamepad/gamepad_platform_data_fetcher_linux.cc",
232 if (enable_plugins) {
233 sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
237 "//ppapi:ppapi_shared",
239 if (!use_ozone || use_pango) {
240 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
243 sources -= [ "renderer_host/pepper/pepper_truetype_font_list_pango.cc" ]
247 if (is_linux && use_aura) {
248 configs += [ "//build/config/linux:fontconfig" ]
252 configs += [ "//build/config/linux:x11" ]
255 # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated
256 # given the interaction between os_chromeos and the feature flags for X11 and
257 # ozone, so do it all in one spot.
258 if (is_chromeos || !use_ozone) {
259 sources -= [ "power_save_blocker_ozone.cc", ]
261 if (is_chromeos || !use_x11) {
262 sources -= [ "power_save_blocker_x11.cc", ]
265 # Dealing with battery_status_manager_*.cc and *wifi_data_provider_*.cc
266 # is also a bit complicated given android, chromeos, linux and use_dbus.
267 if (is_android || is_chromeos || (is_linux && use_dbus)) {
268 sources -= [ "battery_status/battery_status_manager_default.cc" ]
270 if (is_linux && !use_dbus) {
271 # This will already have gotten removed for all non-Linux cases.
272 sources -= [ "battery_status/battery_status_manager_linux.cc" ]
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",
330 libs += [ "jnigraphics" ]
335 "device_sensors/data_fetcher_shared_memory_default.cc",
336 "geolocation/empty_wifi_data_provider.cc",
337 "geolocation/empty_wifi_data_provider.h",
343 deps += [ "//chromeos:power_manager_proto" ]
354 "renderer_host/input/synthetic_gesture_target_aura.cc",
355 "renderer_host/input/synthetic_gesture_target_aura.h",
356 "renderer_host/native_web_keyboard_event_aura.cc",
357 "renderer_host/render_widget_host_view_aura.cc",
358 "renderer_host/render_widget_host_view_aura.h",
359 "renderer_host/ui_events_helper.cc",
360 "renderer_host/ui_events_helper.h",
361 "renderer_host/web_input_event_aura.cc",
362 "renderer_host/web_input_event_aura.h",
363 "web_contents/aura/gesture_nav_simple.cc",
364 "web_contents/aura/gesture_nav_simple.h",
365 "web_contents/aura/image_window_delegate.cc",
366 "web_contents/aura/image_window_delegate.h",
367 "web_contents/aura/overscroll_navigation_overlay.cc",
368 "web_contents/aura/overscroll_navigation_overlay.h",
369 "web_contents/aura/shadow_layer_delegate.cc",
370 "web_contents/aura/shadow_layer_delegate.h",
371 "web_contents/aura/window_slider.cc",
372 "web_contents/aura/window_slider.h",
373 "web_contents/touch_editable_impl_aura.cc",
374 "web_contents/touch_editable_impl_aura.h",
375 "web_contents/web_contents_view_aura.cc",
376 "web_contents/web_contents_view_aura.h",
380 if (use_aura || is_mac) {
381 sources += rebase_path(
382 content_browser_gypi_values.compositor_browser_sources,
386 "compositor/software_output_device_x11.cc",
387 "compositor/software_output_device_x11.h",
393 "compositor/overlay_candidate_validator_ozone.cc",
394 "compositor/overlay_candidate_validator_ozone.h",
395 "compositor/software_output_device_ozone.cc",
396 "compositor/software_output_device_ozone.h",
399 deps += [ "//ui/compositor" ]
402 if (enable_web_speech) {
404 "//third_party/flac",
405 "//third_party/speex",
409 if (is_linux && use_dbus) {
413 if (enable_browser_cdms) {
415 "media/cdm/browser_cdm_manager.cc",
416 "media/cdm/browser_cdm_manager.h",
417 "media/media_web_contents_observer.cc",
418 "media/media_web_contents_observer.h",