| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/crypto.gni") |
| import("//build/config/features.gni") |
| import("//build/config/ui.gni") |
| |
| # //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which |
| # produces a conflict for the "grit" template so we have to only include one. |
| if (is_android) { |
| import("//build/config/android/rules.gni") |
| } else { |
| import("//tools/grit/grit_rule.gni") |
| } |
| if (is_desktop_linux) { |
| import("//build/config/linux/pkg_config.gni") |
| } |
| |
| about_credits_file = "$target_gen_dir/about_credits.html" |
| additional_modules_list_file = |
| "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt" |
| |
| gypi_values = exec_script("//build/gypi_to_gn.py", |
| [ rebase_path("../chrome_browser.gypi") ], |
| "scope", |
| [ "../chrome_browser.gypi" ]) |
| |
| if (is_desktop_linux) { |
| # Gnome-keyring is normally dynamically loaded. The gnome_keyring config |
| # will set this up. |
| pkg_config("gnome_keyring") { |
| packages = [ "gnome-keyring-1" ] |
| defines = [ |
| "USE_GNOME_KEYRING", |
| "DLOPEN_GNOME_KEYRING", |
| ] |
| ignore_libs = true |
| } |
| |
| # If you want to link gnome-keyring directly (use only for unit tests) |
| # ADDITIONALLY add this config on top of ":gnome_keyring". pkg-config is a |
| # bit slow, so prefer not to run it again. In practice, gnome-keyring's libs |
| # are just itself and common gnome ones we link already, so we can get away |
| # with additionally just coding the library name here. |
| config("gnome_keyring_direct") { |
| libs = [ "gnome-keyring" ] |
| } |
| } |
| |
| static_library("browser") { |
| configs += [ |
| "//build/config/compiler:wexit_time_destructors", |
| "//third_party/WebKit/public:debug_devtools", |
| ] |
| defines = [] |
| sources = [] |
| libs = [] |
| ldflags = [] |
| |
| # iOS/non-iOS shared deps. New dependencies should generally be added in the |
| # non-iOS deps below. |
| public_deps = [ |
| "//components/autofill/core/browser", |
| "//content/public/browser", |
| "//sql", |
| "//sync", |
| ] |
| deps = [ |
| "//base/allocator", |
| "//chrome:extra_resources", |
| "//chrome:resources", |
| "//chrome:strings", |
| "//chrome/app:generated_resources_map", |
| "//chrome/app/resources:platform_locale_settings", |
| "//chrome/app/theme:theme_resources", |
| "//chrome/browser/autocomplete:in_memory_url_index_cache_proto", |
| "//chrome/browser/net:cert_logger_proto", |
| "//chrome/browser/net:probe_message_proto", |
| "//chrome/browser/ui", |
| "//chrome/common", |
| "//chrome/common/net", |
| "//components/autofill/core/browser", |
| "//components/bookmarks/browser", |
| "//components/bookmarks/managed", |
| "//components/captive_portal", |
| "//components/cloud_devices/common", |
| "//components/component_updater", |
| "//components/content_settings/core/browser", |
| "//components/content_settings/core/common", |
| "//components/crx_file", |
| "//components/data_reduction_proxy/core/browser", |
| "//components/device_event_log", |
| "//components/domain_reliability", |
| "//components/enhanced_bookmarks", |
| "//components/favicon/core", |
| "//components/favicon_base", |
| "//components/gcm_driver", |
| "//components/google/core/browser", |
| "//components/handoff", |
| "//components/history/core/browser", |
| "//components/history/core/common", |
| "//components/infobars/core", |
| "//components/invalidation", |
| "//components/metrics:gpu", |
| "//components/metrics:net", |
| "//components/metrics:profiler", |
| "//components/metrics/proto:proto", |
| "//components/navigation_metrics", |
| "//components/network_time", |
| "//components/omnibox", |
| "//components/os_crypt", |
| "//components/packed_ct_ev_whitelist", |
| "//components/password_manager/core/browser", |
| "//components/password_manager/core/common", |
| "//components/policy:policy_component", |
| "//components/precache/core", |
| "//components/query_parser", |
| "//components/rappor", |
| "//components/renderer_context_menu", |
| "//components/search", |
| "//components/search_engines", |
| "//components/search_provider_logos", |
| "//components/signin/core/browser", |
| "//components/startup_metric_utils", |
| "//components/strings", |
| "//components/suggestions", |
| "//components/sync_driver", |
| "//components/translate/core/browser", |
| "//components/translate/core/common", |
| "//components/ui/zoom:ui_zoom", |
| "//components/update_client", |
| "//components/url_fixer", |
| "//components/user_prefs", |
| "//components/variations", |
| "//components/variations/net", |
| "//components/webdata/common", |
| "//components/webdata_services", |
| "//components/web_resource", |
| "//content/public/browser", |
| "//content/public/common", |
| "//courgette:courgette_lib", |
| "//crypto", |
| "//google_apis", |
| "//gpu/config", |
| "//jingle:notifier", |
| "//skia", |
| "//sql", |
| "//sync", |
| "//third_party/cacheinvalidation", |
| "//third_party/icu", |
| "//third_party/libxml", |
| "//third_party/libjingle", |
| "//third_party/widevine/cdm:version_h", |
| "//third_party/zlib", |
| "//third_party/zlib:minizip", |
| "//third_party/zlib:zip", |
| "//ui/base", |
| "//ui/events:events_base", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| "//ui/message_center", |
| "//ui/shell_dialogs", |
| "//ui/strings", |
| "//ui/resources", |
| ] |
| |
| sources += |
| rebase_path(gypi_values.chrome_browser_undo_sources, ".", "//chrome") |
| |
| if (!is_ios) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_non_ios_sources, ".", "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_autocomplete_sources, |
| ".", |
| "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_bookmark_sources, |
| ".", |
| "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_browser_process_sources, |
| ".", |
| "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_content_settings_sources, |
| ".", |
| "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_favicon_sources, ".", "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_google_sources, ".", "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_history_sources, ".", "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_metrics_sources, ".", "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_net_sources, ".", "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_password_manager_sources, |
| ".", |
| "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_permissions_sources, |
| ".", |
| "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_predictor_sources, |
| ".", |
| "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_pref_sources, ".", "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_profiles_sources, |
| ".", |
| "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_search_engines_sources, |
| ".", |
| "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_services_sources, |
| ".", |
| "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_session_sources, ".", "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_signin_sources, ".", "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_ssl_sources, ".", "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_sync_sources, ".", "//chrome") |
| sources += rebase_path(gypi_values.chrome_browser_web_resource_sources, |
| ".", |
| "//chrome") |
| |
| deps += [ |
| "//apps", |
| "//cc", |
| "//chrome/app:generated_resources_map", |
| "//chrome/app/theme:theme_resources", |
| "//chrome/browser/devtools", |
| "//chrome/browser/resources:component_extension_resources", |
| "//chrome/installer/util", |
| "//components/app_modal", |
| "//components/autofill/content/browser", |
| "//components/data_reduction_proxy/content/browser", |
| "//components/dom_distiller/content", |
| "//components/favicon/content", |
| "//components/history/content/browser", |
| "//components/keyed_service/content", |
| "//components/navigation_interception", |
| "//components/password_manager/content/browser", |
| "//components/precache/content", |
| "//components/sessions:sessions_content", |
| "//components/storage_monitor", |
| "//components/translate/content/browser", |
| "//components/url_matcher", |
| "//components/visitedlink/browser", |
| "//components/visitedlink/common", |
| "//components/web_cache/browser", |
| "//components/web_modal", |
| "//content/app/resources", |
| "//media", |
| "//mojo/common", |
| "//mojo/environment:chromium", |
| "//net:extras", |
| "//net:net_with_v8", |
| "//storage/browser", |
| "//storage/common", |
| "//third_party/WebKit/public:resources", |
| "//third_party/expat", |
| "//third_party/leveldatabase", |
| "//third_party/libaddressinput", |
| "//third_party/libyuv", |
| "//third_party/mojo/src/mojo/edk/system", |
| "//third_party/mojo/src/mojo/public/cpp/bindings", |
| "//third_party/mojo/src/mojo/public/js", |
| "//third_party/npapi", |
| "//third_party/re2", |
| "//third_party/smhasher:cityhash", |
| "//third_party/webrtc/modules/desktop_capture", |
| "//ui/base/ime", |
| "//ui/gl", |
| "//ui/resources", |
| "//ui/surface", |
| "//ui/web_dialogs", |
| "//v8", |
| ] |
| } else { # iOS |
| sources += |
| rebase_path(gypi_values.chrome_browser_ios_sources, ".", "//chrome") |
| sources += |
| rebase_path(gypi_values.chrome_browser_google_sources, ".", "//chrome") |
| deps += [ "//net" ] |
| libs += [ |
| "CoreTelephony.framework", |
| "CoreText.framework", |
| "MobileCoreServices.framework", |
| "QuartzCore.framework", |
| ] |
| ldflags += [ |
| "-weak_framework", |
| "CoreImage", |
| ] |
| } |
| |
| if (is_win || is_mac) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_win_mac_sources, ".", "//chrome") |
| } |
| if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) { |
| sources += [ |
| "net/disk_cache_dir_policy_handler.cc", |
| "net/disk_cache_dir_policy_handler.h", |
| ] |
| } |
| if (!is_android && !is_ios && enable_configuration_policy) { |
| sources += [ |
| "download/download_dir_policy_handler.cc", |
| "download/download_dir_policy_handler.h", |
| ] |
| } |
| if (is_mac) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_mac_sources, ".", "//chrome") |
| deps += [ |
| #"app_shim" TODO(GYP) |
| #"browser_app_shim" TODO(GYP) |
| ] |
| } |
| if (enable_extensions) { |
| public_deps += [ "//chrome/browser/extensions" ] |
| deps += [ |
| "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto", |
| "//chrome/common/extensions/api", |
| "//chrome/common/extensions/api:api_registration", |
| "//components/proximity_auth/cryptauth", |
| "//extensions/components/javascript_dialog_extensions_client", |
| "//media/cast:net", |
| ] |
| sources += rebase_path(gypi_values.chrome_browser_extensions_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_background) { |
| sources += rebase_path(gypi_values.chrome_browser_background_sources, |
| ".", |
| "//chrome") |
| if (!use_aura || is_win || is_chromeos) { |
| sources -= [ "background/background_mode_manager_aura.cc" ] |
| } |
| } |
| if (enable_task_manager) { |
| sources += rebase_path(gypi_values.chrome_browser_task_manager_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_spellcheck) { |
| sources += rebase_path(gypi_values.chrome_browser_spellchecker_sources, |
| ".", |
| "//chrome") |
| deps += [ "//third_party/hunspell" ] |
| } |
| if (enable_nacl) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_nacl_sources, ".", "//chrome") |
| deps += [ "//components/nacl:nacl_browser" ] |
| } |
| |
| if (enable_configuration_policy) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_policy_shared_with_ios_sources, |
| ".", |
| "//chrome") |
| deps += [ |
| "//components/policy", |
| "//components/policy/proto", |
| ] |
| if (!is_ios) { |
| sources += rebase_path(gypi_values.chrome_browser_policy_non_ios_sources, |
| ".", |
| "//chrome") |
| } |
| if (!is_chromeos) { |
| sources += rebase_path( |
| gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources, |
| ".", |
| "//chrome") |
| } |
| if (is_win || is_mac || is_desktop_linux) { |
| sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources, |
| ".", |
| "//chrome") |
| } |
| if (is_android || is_ios) { |
| sources += rebase_path(gypi_values.chrome_browser_policy_mobile_sources, |
| ".", |
| "//chrome") |
| } else { |
| deps += [ |
| "//chrome/browser/policy:path_parser", |
| "//net:net_browser_services", |
| ] |
| } |
| } else { |
| # Configuration policy disabled. |
| sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources, |
| ".", |
| "//chrome") |
| } |
| |
| if (enable_plugins) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_plugins_sources, ".", "//chrome") |
| deps += [ |
| "//components/pdf/browser", |
| "//ppapi/proxy:ipc", |
| "//third_party/adobe/flash:flapper_version_h", |
| ] |
| } |
| if (safe_browsing_mode != 0) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_safe_browsing_basic_sources, |
| ".", |
| "//chrome") |
| deps += [ |
| "//chrome/browser/safe_browsing:chunk_proto", |
| "//chrome/browser/safe_browsing:metadata_proto", |
| "//chrome/browser/safe_browsing:report_proto", |
| ] |
| if (safe_browsing_mode == 1) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_safe_browsing_full_sources, |
| ".", |
| "//chrome") |
| defines += [ "FULL_SAFE_BROWSING" ] |
| deps += [ "//chrome/common/safe_browsing:proto" ] |
| } else if (safe_browsing_mode == 2) { |
| defines += [ "MOBILE_SAFE_BROWSING" ] |
| } |
| } |
| |
| if (is_linux) { |
| deps += [ |
| "//device/media_transfer_protocol", |
| "//device/udev_linux", |
| ] |
| } |
| if (is_linux && !is_chromeos) { |
| deps += [ "//third_party/speech-dispatcher" ] |
| } |
| |
| if (is_chromeos) { |
| sources += rebase_path(gypi_values.chrome_browser_chromeos_sources, |
| ".", |
| "//chrome") |
| deps += [ "//chrome/browser/chromeos" ] |
| } else { |
| # Non-ChromeOS. |
| sources += rebase_path(gypi_values.chrome_browser_non_chromeos_sources, |
| ".", |
| "//chrome") |
| } |
| |
| if (is_ios) { |
| sources -= [ |
| "metrics/signin_status_metrics_provider_base.cc", |
| "metrics/signin_status_metrics_provider_base.h", |
| ] |
| } |
| |
| if (is_chromeos || is_ios) { |
| sources -= [ |
| "metrics/signin_status_metrics_provider.cc", |
| "metrics/signin_status_metrics_provider.h", |
| ] |
| } |
| |
| if (use_cups) { |
| configs += [ "//printing:cups" ] |
| } |
| if (is_desktop_linux) { |
| sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources, |
| ".", |
| "//chrome") |
| configs += [ ":gnome_keyring" ] |
| } |
| if (is_desktop_linux) { |
| sources += rebase_path(gypi_values.chrome_browser_libsecret_sources, |
| ".", |
| "//chrome") |
| defines += [ "USE_LIBSECRET" ] |
| } |
| if (use_aura) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_aura_sources, ".", "//chrome") |
| deps += [ |
| "//ui/aura", |
| "//ui/compositor", |
| "//ui/keyboard", |
| ] |
| } |
| if (ui_compositor_image_transport) { |
| deps += [ "//ui/gl" ] |
| } |
| |
| if (use_ash) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_ash_sources, ".", "//chrome") |
| } |
| |
| if (use_x11) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_x11_sources, ".", "//chrome") |
| } else { |
| sources -= [ "password_manager/password_store_x.cc" ] |
| } |
| if (is_posix && !is_mac && !is_ios) { |
| sources += [ |
| "//chrome/app/chrome_crash_reporter_client.cc", |
| "//chrome/app/chrome_crash_reporter_client.h", |
| ] |
| deps += [ |
| "//components/crash/app", |
| "//components/crash/browser", |
| ] |
| } |
| if (use_nss_certs) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_nss_sources, ".", "//chrome") |
| if (is_chromeos) { |
| sources -= [ "net/nss_context_linux.cc" ] |
| } |
| } |
| if (enable_notifications) { |
| sources += rebase_path(gypi_values.chrome_browser_notifications_sources, |
| ".", |
| "//chrome") |
| if (!is_android) { |
| sources += rebase_path( |
| gypi_values.chrome_browser_notifications_non_android_sources, |
| ".", |
| "//chrome") |
| } |
| } |
| if (enable_themes) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_themes_sources, ".", "//chrome") |
| } |
| |
| if (enable_basic_printing || enable_print_preview) { |
| # Some form of printing support. |
| sources += rebase_path(gypi_values.chrome_browser_printing_basic_sources, |
| ".", |
| "//chrome") |
| deps += [ "//printing" ] |
| if (is_win) { |
| sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_print_preview) { |
| # Full printing on top of the above. |
| sources += rebase_path(gypi_values.chrome_browser_printing_full_sources, |
| ".", |
| "//chrome") |
| } else { |
| # Partial-only printing support. |
| sources += |
| rebase_path(gypi_values.chrome_browser_printing_basic_only_sources, |
| ".", |
| "//chrome") |
| } |
| } |
| if (enable_captive_portal_detection) { |
| sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_session_service) { |
| sources += rebase_path(gypi_values.chrome_browser_session_service_sources, |
| ".", |
| "//chrome") |
| } |
| |
| if (!is_android && !is_ios && !is_chromeos) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_desktop_sources, ".", "//chrome") |
| } |
| |
| if (is_android || is_ios) { |
| # Mobile. |
| sources += |
| rebase_path(gypi_values.chrome_browser_mobile_sources, ".", "//chrome") |
| } else { |
| # Non-mobile. |
| sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources, |
| ".", |
| "//chrome") |
| deps += [ |
| "//components/feedback", |
| "//device/core", |
| "//device/usb", |
| ] |
| } |
| |
| if (is_android) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_android_sources, ".", "//chrome") |
| deps += [ |
| ":jni_headers", |
| "//components/cdm/browser", |
| "//components/enhanced_bookmarks", |
| "//components/resources:components_resources", |
| "//components/web_contents_delegate_android", |
| "//third_party/android_opengl/etc1", |
| "//third_party/libaddressinput:util", |
| ] |
| deps -= [ |
| "//third_party/libaddressinput", |
| "//components/storage_monitor", |
| "//components/web_modal", |
| ] |
| defines += [ "ENABLE_DATA_REDUCTION_PROXY_DEBUGGING" ] |
| |
| if (use_seccomp_bpf) { |
| defines += [ "USE_SECCOMP_BPF" ] |
| } |
| } |
| |
| if (is_mac) { |
| deps += [ |
| "//third_party/google_toolbox_for_mac", |
| "//third_party/mozilla", |
| ] |
| libs += [ |
| "Accelerate.framework", |
| "AddressBook.framework", |
| "AudioUnit.framework", |
| "DiskArbitration.framework", |
| "IOKit.framework", |
| "ImageCaptureCore.framework", |
| "OpenGL.framework", |
| "QuartzCore.framework", |
| "SecurityInterface.framework", |
| ] |
| } |
| |
| if (enable_rlz) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_rlz_sources, ".", "//chrome") |
| deps += [ "//rlz:rlz_lib" ] |
| } |
| |
| # TODO(GYP) |
| # Temporary fix to break the browser target into smaller chunks so it |
| # will link with goma builds. |
| #["OS=="win" and chromium_win_pch==0", { |
| # "msvs_shard": 4, |
| #}], |
| |
| if (is_win) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_win_sources, ".", "//chrome") |
| if (!is_chrome_branded) { |
| sources -= [ |
| "google/did_run_updater_win.cc", |
| "google/did_run_updater_win.h", |
| ] |
| } |
| public_deps += [ |
| "//ui/views", |
| "//ui/views/controls/webview", |
| ] |
| deps += [ |
| ":chrome_process_finder", |
| "//chrome:version_header", |
| "//chrome/installer/util:strings", |
| "//chrome_elf", |
| "//chrome_elf:constants", |
| "//chrome_elf:dll_hash", |
| "//components/browser_watcher", |
| "//components/browser_watcher:browser_watcher_client", |
| "//google_update", |
| "//third_party/iaccessible2", |
| "//third_party/isimpledom", |
| "//third_party/wtl", |
| "//ui/metro_viewer", |
| "//win8:metro_viewer", |
| ] |
| libs += [ "credui.lib" ] |
| } else { |
| # Non-Windows. |
| sources += |
| rebase_path(gypi_values.chrome_browser_non_win_sources, ".", "//chrome") |
| if (toolkit_views) { |
| deps += [ |
| "//ui/views", |
| "//ui/views/controls/webview", |
| ] |
| } |
| } |
| |
| if (is_linux) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_linux_sources, ".", "//chrome") |
| if (use_aura) { |
| configs += [ |
| "//build/config/linux:dbus", |
| "//build/config/linux:fontconfig", |
| ] |
| deps += [ "//dbus" ] |
| } |
| if (use_x11) { |
| configs += [ "//build/config/linux:x11" ] |
| deps += [ "//ui/gfx/x" ] |
| } |
| } |
| |
| if (is_desktop_linux) { |
| sources += rebase_path(gypi_values.chrome_browser_linux_desktop_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_plugin_installation) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_plugin_installation_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_app_list) { |
| deps += [ "//ui/app_list" ] |
| } |
| if (enable_supervised_users) { |
| sources += rebase_path(gypi_values.chrome_browser_supervised_user_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_supervised_users && enable_themes) { |
| sources += rebase_path( |
| gypi_values.chrome_browser_supervised_user_and_themes_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_webrtc) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_webrtc_sources, ".", "//chrome") |
| } |
| if (enable_service_discovery) { |
| sources += rebase_path(gypi_values.chrome_browser_service_discovery_sources, |
| ".", |
| "//chrome") |
| } |
| if (enable_mdns) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_mdns_sources, ".", "//chrome") |
| } |
| if (!enable_autofill_dialog || is_android || is_ios) { |
| sources -= [ |
| "autofill/validation_rules_storage_factory.cc", |
| "autofill/validation_rules_storage_factory.h", |
| ] |
| } |
| if (enable_wifi_bootstrapping) { |
| sources += |
| rebase_path(gypi_values.chrome_browser_wifi_bootstrapping_sources, |
| ".", |
| "//chrome") |
| if (is_win || is_mac) { |
| # TODO(brettw) as of this writing wifi bootstrapping is set on Windows |
| # and Mac, so this test is meaningless. Can we merge these lists? |
| sources += rebase_path( |
| gypi_values.chrome_browser_wifi_bootstrapping_win_mac_sources, |
| ".", |
| "//chrome") |
| } |
| } |
| } |
| |
| if (is_android) { |
| # GYP version: chrome/chrome_browser.gypi:chrome_browser_jni_headers |
| generate_jni("jni_headers") { |
| sources = |
| rebase_path(gypi_values.chrome_browser_jni_sources, ".", "//chrome") |
| jni_package = "chrome" |
| } |
| } |
| |
| if (is_win) { |
| source_set("chrome_process_finder") { |
| sources = [ |
| "chrome_process_finder_win.cc", |
| "chrome_process_finder_win.h", |
| ] |
| deps = [ |
| "//base", |
| "//chrome/browser/metro_utils", |
| "//chrome/common:constants", |
| ] |
| if (enable_configuration_policy) { |
| deps += [ "//chrome/browser/policy:path_parser" ] |
| } |
| } |
| } |
| |
| # GYP version: chrome/chrome_resources.gyp:chrome_resources |
| # (generate_browser_resources action) |
| grit("resources") { |
| source = "browser_resources.grd" |
| output_dir = "$root_gen_dir/chrome" |
| outputs = [ |
| "grit/browser_resources.h", |
| "browser_resources.pak", |
| ] |
| |
| omnibox_mojom_file = |
| "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js" |
| |
| grit_flags = [ |
| "-E", |
| "about_credits_file=" + rebase_path(about_credits_file, root_build_dir), |
| "-E", |
| "additional_modules_list_file=" + |
| rebase_path(additional_modules_list_file, root_build_dir), |
| "-E", |
| "omnibox_mojom_file=" + rebase_path(omnibox_mojom_file, root_build_dir), |
| ] |
| |
| deps = [ |
| ":about_credits", |
| ":chrome_internal_resources_gen", |
| ] |
| inputs = [ |
| omnibox_mojom_file, |
| ] |
| } |
| |
| # GYP version: chrome/chrome_resource.gyp:about_credits |
| action("about_credits") { |
| script = "//tools/licenses.py" |
| |
| inputs = [ |
| # This is not a complete list. TODO(phajdan.jr, dbeam): licenses.py needs to |
| # generate a .d file with all the licenses/credits that about:credits uses. |
| # Then about:credits will automatically rebuild when one of them changes. |
| # See: depfile in gn's documentation (gn help depfile). |
| "resources/about_credits.tmpl", |
| "resources/about_credits_entry.tmpl", |
| ] |
| |
| outputs = [ |
| about_credits_file, |
| ] |
| |
| args = [ |
| "credits", |
| rebase_path(about_credits_file, root_build_dir), |
| ] |
| } |
| |
| # GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen |
| if (is_chrome_branded) { |
| action("chrome_internal_resources_gen") { |
| script = "internal/transform_additional_modules_list.py" |
| sources = [ |
| "internal/resources/additional_modules_list.input", |
| ] |
| outputs = [ |
| additional_modules_list_file, |
| ] |
| args = rebase_path(sources, root_build_dir) + |
| rebase_path(outputs, root_build_dir) |
| } |
| } else { |
| group("chrome_internal_resources_gen") { |
| # Empty placeholder. |
| } |
| } |
| |
| # In GYP this is part of test_support_common. |
| source_set("test_support") { |
| testonly = true |
| |
| # Always include this via the main test support target. |
| visibility = [ "//chrome/test:test_support" ] |
| |
| sources = [ |
| "browsing_data/mock_browsing_data_appcache_helper.cc", |
| "browsing_data/mock_browsing_data_appcache_helper.h", |
| "browsing_data/mock_browsing_data_channel_id_helper.cc", |
| "browsing_data/mock_browsing_data_channel_id_helper.h", |
| "browsing_data/mock_browsing_data_cookie_helper.cc", |
| "browsing_data/mock_browsing_data_cookie_helper.h", |
| "browsing_data/mock_browsing_data_database_helper.cc", |
| "browsing_data/mock_browsing_data_database_helper.h", |
| "browsing_data/mock_browsing_data_file_system_helper.cc", |
| "browsing_data/mock_browsing_data_file_system_helper.h", |
| "browsing_data/mock_browsing_data_flash_lso_helper.cc", |
| "browsing_data/mock_browsing_data_flash_lso_helper.h", |
| "browsing_data/mock_browsing_data_indexed_db_helper.cc", |
| "browsing_data/mock_browsing_data_indexed_db_helper.h", |
| "browsing_data/mock_browsing_data_local_storage_helper.cc", |
| "browsing_data/mock_browsing_data_local_storage_helper.h", |
| "browsing_data/mock_browsing_data_quota_helper.cc", |
| "browsing_data/mock_browsing_data_quota_helper.h", |
| "browsing_data/mock_browsing_data_service_worker_helper.cc", |
| "browsing_data/mock_browsing_data_service_worker_helper.h", |
| "download/download_test_file_activity_observer.cc", |
| "download/download_test_file_activity_observer.h", |
| "download/test_download_shelf.cc", |
| "download/test_download_shelf.h", |
| "invalidation/fake_invalidation_service.cc", |
| "invalidation/fake_invalidation_service.h", |
| "media/fake_desktop_media_list.cc", |
| "media/fake_desktop_media_list.h", |
| "net/dns_probe_test_util.cc", |
| "net/dns_probe_test_util.h", |
| "net/url_request_mock_util.cc", |
| "net/url_request_mock_util.h", |
| "notifications/notification_test_util.cc", |
| "notifications/notification_test_util.h", |
| "password_manager/mock_password_store_service.cc", |
| "password_manager/mock_password_store_service.h", |
| "password_manager/null_password_store_service.cc", |
| "password_manager/null_password_store_service.h", |
| "password_manager/test_password_store_service.cc", |
| "password_manager/test_password_store_service.h", |
| "prefs/pref_service_mock_factory.cc", |
| "prefs/pref_service_mock_factory.h", |
| "profile_resetter/profile_resetter_test_base.cc", |
| "profile_resetter/profile_resetter_test_base.h", |
| "search_engines/template_url_service_factory_test_util.cc", |
| "search_engines/template_url_service_factory_test_util.h", |
| "search_engines/template_url_service_test_util.cc", |
| "search_engines/template_url_service_test_util.h", |
| "sessions/session_restore_test_helper.cc", |
| "sessions/session_restore_test_helper.h", |
| "sessions/session_service_test_helper.cc", |
| "sessions/session_service_test_helper.h", |
| "signin/fake_account_reconcilor.cc", |
| "signin/fake_account_reconcilor.h", |
| "signin/fake_account_tracker_service.cc", |
| "signin/fake_account_tracker_service.h", |
| "signin/fake_profile_oauth2_token_service.cc", |
| "signin/fake_profile_oauth2_token_service.h", |
| "signin/fake_profile_oauth2_token_service_builder.cc", |
| "signin/fake_profile_oauth2_token_service_builder.h", |
| "signin/fake_signin_manager.cc", |
| "signin/fake_signin_manager.h", |
| "ssl/ssl_client_auth_requestor_mock.cc", |
| "ssl/ssl_client_auth_requestor_mock.h", |
| "sync/profile_sync_components_factory_mock.cc", |
| "sync/profile_sync_components_factory_mock.h", |
| "sync/profile_sync_service_mock.cc", |
| "sync/profile_sync_service_mock.h", |
| "ui/webui/signin/login_ui_test_utils.cc", |
| "ui/webui/signin/login_ui_test_utils.h", |
| ] |
| |
| public_deps = [ |
| ":browser", |
| "//chrome/browser/ui:test_support", |
| ] |
| deps = [ |
| "//base:prefs_test_support", |
| "//chrome/browser", |
| "//chrome/common", |
| "//chrome/common/safe_browsing:proto", |
| "//components/invalidation", |
| "//components/invalidation:test_support", |
| "//components/password_manager/core/browser:test_support", |
| "//components/search_engines:test_support", |
| "//content/test:test_support", |
| "//chrome/app/theme:theme_resources", |
| "//net:test_support", |
| "//skia", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/gfx", |
| ] |
| |
| if (!is_ios) { |
| deps += [ |
| "//components/sessions:test_support", |
| "//google_apis:test_support", |
| ] |
| } |
| |
| if (enable_extensions) { |
| sources += [ |
| "extensions/extension_action_test_util.cc", |
| "extensions/extension_action_test_util.h", |
| ] |
| deps += [ "//extensions:test_support" ] |
| } |
| |
| if (is_chromeos) { |
| sources += [ |
| "chromeos/app_mode/fake_cws.cc", |
| "chromeos/app_mode/fake_cws.h", |
| "chromeos/file_manager/fake_disk_mount_manager.cc", |
| "chromeos/file_manager/fake_disk_mount_manager.h", |
| "chromeos/input_method/mock_candidate_window_controller.cc", |
| "chromeos/input_method/mock_candidate_window_controller.h", |
| "chromeos/input_method/mock_input_method_engine.cc", |
| "chromeos/input_method/mock_input_method_engine.h", |
| "chromeos/input_method/mock_input_method_manager.cc", |
| "chromeos/input_method/mock_input_method_manager.h", |
| "chromeos/login/screens/mock_device_disabled_screen_actor.cc", |
| "chromeos/login/screens/mock_device_disabled_screen_actor.h", |
| "chromeos/login/session/user_session_manager_test_api.cc", |
| "chromeos/login/session/user_session_manager_test_api.h", |
| "chromeos/login/test/js_checker.cc", |
| "chromeos/login/test/js_checker.h", |
| "chromeos/login/test/oobe_screen_waiter.cc", |
| "chromeos/login/test/oobe_screen_waiter.h", |
| "chromeos/login/ui/mock_login_display.cc", |
| "chromeos/login/ui/mock_login_display.h", |
| "chromeos/login/ui/mock_login_display_host.cc", |
| "chromeos/login/ui/mock_login_display_host.h", |
| "chromeos/login/users/avatar/mock_user_image_manager.cc", |
| "chromeos/login/users/avatar/mock_user_image_manager.h", |
| "chromeos/login/users/fake_chrome_user_manager.cc", |
| "chromeos/login/users/fake_chrome_user_manager.h", |
| "chromeos/login/users/fake_supervised_user_manager.cc", |
| "chromeos/login/users/fake_supervised_user_manager.h", |
| "chromeos/login/users/mock_user_manager.cc", |
| "chromeos/login/users/mock_user_manager.h", |
| "chromeos/net/network_portal_detector_test_utils.cc", |
| "chromeos/net/network_portal_detector_test_utils.h", |
| "chromeos/policy/cloud_external_data_manager_base_test_util.cc", |
| "chromeos/policy/cloud_external_data_manager_base_test_util.h", |
| "chromeos/policy/device_policy_builder.cc", |
| "chromeos/policy/device_policy_builder.h", |
| "chromeos/policy/fake_consumer_management_service.cc", |
| "chromeos/policy/fake_consumer_management_service.h", |
| "chromeos/policy/fake_device_cloud_policy_initializer.cc", |
| "chromeos/policy/fake_device_cloud_policy_initializer.h", |
| "chromeos/policy/fake_device_cloud_policy_manager.cc", |
| "chromeos/policy/fake_device_cloud_policy_manager.h", |
| "chromeos/policy/stub_enterprise_install_attributes.cc", |
| "chromeos/policy/stub_enterprise_install_attributes.h", |
| "chromeos/settings/device_settings_test_helper.cc", |
| "chromeos/settings/device_settings_test_helper.h", |
| "chromeos/system/fake_input_device_settings.cc", |
| "chromeos/system/fake_input_device_settings.h", |
| ] |
| configs += [ "//build/config/linux:dbus" ] |
| deps += [ "//chromeos:test_support" ] |
| } |
| |
| if (enable_configuration_policy) { |
| sources += [ |
| "policy/test/local_policy_test_server.cc", |
| "policy/test/local_policy_test_server.h", |
| ] |
| public_deps += [ |
| "//components/policy:policy_component_test_support", |
| "//components/policy:test_support", |
| ] |
| } |
| |
| if (safe_browsing_mode == 1) { |
| sources += [ |
| "extensions/fake_safe_browsing_database_manager.cc", |
| "extensions/fake_safe_browsing_database_manager.h", |
| ] |
| } |
| |
| if (enable_extensions) { |
| sources += [ |
| "drive/dummy_drive_service.cc", |
| "drive/dummy_drive_service.h", |
| "drive/fake_drive_service.cc", |
| "drive/fake_drive_service.h", |
| "drive/test_util.cc", |
| "drive/test_util.h", |
| "extensions/api/messaging/native_messaging_test_util.cc", |
| "extensions/api/messaging/native_messaging_test_util.h", |
| "extensions/extension_notification_observer.cc", |
| "extensions/extension_notification_observer.h", |
| "extensions/mock_extension_special_storage_policy.cc", |
| "extensions/mock_extension_special_storage_policy.h", |
| "extensions/test_blacklist.cc", |
| "extensions/test_blacklist.h", |
| "extensions/test_blacklist_state_fetcher.cc", |
| "extensions/test_blacklist_state_fetcher.h", |
| "extensions/test_extension_dir.cc", |
| "extensions/test_extension_dir.h", |
| "extensions/test_extension_environment.cc", |
| "extensions/test_extension_environment.h", |
| "extensions/test_extension_prefs.cc", |
| "extensions/test_extension_prefs.h", |
| "extensions/test_extension_service.cc", |
| "extensions/test_extension_service.h", |
| "extensions/test_extension_system.cc", |
| "extensions/test_extension_system.h", |
| "media_galleries/media_galleries_test_util.cc", |
| "media_galleries/media_galleries_test_util.h", |
| ] |
| deps += [ "//components/storage_monitor:test_support" ] |
| } |
| |
| if (enable_mdns) { |
| sources += [ |
| "local_discovery/test_service_discovery_client.cc", |
| "local_discovery/test_service_discovery_client.h", |
| ] |
| } |
| |
| if (enable_app_list) { |
| sources += [ |
| "ui/app_list/test/chrome_app_list_test_support.cc", |
| "ui/app_list/test/chrome_app_list_test_support.h", |
| "ui/app_list/test/test_app_list_controller_delegate.cc", |
| "ui/app_list/test/test_app_list_controller_delegate.h", |
| ] |
| } |
| |
| if (enable_wifi_bootstrapping) { |
| sources += [ |
| "local_discovery/wifi/mock_wifi_manager.cc", |
| "local_discovery/wifi/mock_wifi_manager.h", |
| ] |
| } |
| } |