cef/BUILD.gn

2244 lines
71 KiB
Plaintext
Raw Normal View History

2016-06-23 19:42:00 +02:00
# Copyright 2016 The Chromium Embedded Framework Authors. Portions 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.
#
# This file provides the GN configuration for the CEF project. This is not a
# stand-alone configuration -- it must be built from inside the Chromium source
# tree. See https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
# for complete CEF build instructions. See below for links to additional GN
# documentation.
#
# GN Setup:
#
2016-08-08 13:31:57 +02:00
# Optionally configure GN by setting the `GN_DEFINES` and/or `GN_ARGUMENTS`
2016-06-23 19:42:00 +02:00
# environment variables.
#
# Example A: Create an official build on Windows:
2016-06-23 19:42:00 +02:00
#
# > set GN_DEFINES=is_official_build=true
2016-06-23 19:42:00 +02:00
#
# Example B: Generate VS2017 project files in addition to the default Ninja
2016-06-23 19:42:00 +02:00
# build files on Windows:
#
# > set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
2016-06-23 19:42:00 +02:00
#
# After completing the "GN Automated Build" or "GN Manual Build" section
# open "out\<build_dir>\cef.sln" for editing and debugging. Building must
# still be performed using the Ninja command-line.
#
# GN Automated Build:
#
# Run the `automate-git.py` script as described on the BranchesAndBuilding
# Wiki page. GN, unlike GYP, supports parallel build configurations. The
# following command-line flags have special meaning with GN builds:
#
# --x64-build Perform an x64 build if specified (requires out/*_GN_x64
# directories), otherwise perform an x86 build (requires
# out/*_GN_x86 directories).
#
# Directories are created subject to your platform and `GN_DEFINES` settings.
# See Step 1B in the "GN Manual Build" section below for details.
#
# GN Manual Build:
#
# 1. Run the `cef_create_projects.[bin|sh]` script. Upon successful completion
# proceed to Step 2.
#
# The `cef_create_projects.[bin|sh]` script will automatically do all of the
# following:
#
# A. Apply patch files to the Chromium source tree. This includes
# `patch/patches/gn_config.patch` which is required for GN integration.
#
# B. Create multiple build output directories appropriate to your platform
# and `GN_DEFINES` settings. For example:
#
# x86 debug build -> out/Debug_GN_x86
# x86 release build -> out/Release_GN_x86
# x64 debug build -> out/Debug_GN_x64
# x64 release build -> out/Release_GN_x64
#
# Build output directories will be created subject to the following rules
# (defined in `tools/gn_args.py` GetAllPlatformConfigs):
#
# - Debug and Release directories will be created on all platforms by
# default. Debug directories will not be created when `is_asan=true`.
# - x64 directories will always be created on all platforms.
# - x86 directories will always be created on Windows.
# - x86 directories will be created on Linux when `use_sysroot=true`.
#
# C. Write the `args.gn` file for each build output directory using the
# `tools/gn_args.py` script to determine the GN arguments. Some arguments
# are required and some are optional. See script output for details in
# case of conflicts or recommendations.
#
# D. Run `gn gen` for each build output directory to generate project files.
# Ninja files will be generated by default. Additional command-line
# arguments (including other project formats) can be specified via the
# `GN_ARGUMENTS` environment variable. Run `gn gen --help` for a list of
# supported arguments.
#
# 2. Run Ninja from the command-line to build. If the build configuration has
# changed it will automatically re-run `gn gen` with the same arguments.
#
# > ninja -C out/<build_dir> cefclient cefsimple ceftests
2016-06-23 19:42:00 +02:00
#
# GN Manual Packaging:
#
# Run the `make_distrib.[bat|sh]` script as described on the
# BranchesAndBuilding Wiki page.
#
# Additional GN documentation:
# http://www.chromium.org/developers/gn-build-configuration
# https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/language.md
#
import("//build/config/allocator.gni")
2016-06-23 19:42:00 +02:00
import("//build/config/features.gni")
import("//build/config/locales.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//cef/cef_repack_locales.gni")
import("//chrome/common/features.gni")
import("//extensions/buildflags/buildflags.gni")
2016-06-23 19:42:00 +02:00
import("//media/media_options.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//printing/buildflags/buildflags.gni")
import("//third_party/icu/config.gni")
import("//third_party/widevine/cdm/widevine.gni")
2016-06-23 19:42:00 +02:00
import("//tools/grit/repack.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
import("//ui/gl/features.gni")
import("//v8/gni/v8.gni")
if (is_clang) {
import("//build/config/clang/clang.gni")
}
2016-06-23 19:42:00 +02:00
if (is_linux) {
import("//build/config/linux/pkg_config.gni")
import("//third_party/fontconfig/fontconfig.gni")
2016-06-23 19:42:00 +02:00
}
if (is_mac) {
import("//build/config/mac/rules.gni")
import("//build/mac/tweak_info_plist.gni")
import("//build/util/version.gni")
import("//media/cdm/library_cdm/cdm_paths.gni")
2016-06-23 19:42:00 +02:00
}
if (is_win) {
import("//build/config/win/console_app.gni")
import("//build/config/win/manifest.gni")
}
2016-06-23 19:42:00 +02:00
#
# Verify required global arguments configured via `gn args`.
# Set by GetRequiredArgs() in //cef/tools/gn_args.py.
2016-06-23 19:42:00 +02:00
#
# Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1.
assert(enable_basic_printing)
assert(!enable_print_preview)
# Enable support for Widevine CDM.
assert(enable_widevine)
if (is_clang) {
# Don't use the chrome style plugin.
assert(!clang_use_chrome_plugins)
}
if (is_linux) {
# Use system fontconfig. This avoids a startup hang on Ubuntu 16.04.4 (see
# issue #2424).
assert(!use_bundled_fontconfig)
}
if (is_mac) {
# Always generate dSYM files. The make_distrib script will fail if
# enable_dsyms=true is not explicitly set when is_official_build=false.
assert(enable_dsyms)
}
2016-06-23 19:42:00 +02:00
#
# Local variables.
#
if (is_mac) {
# The tweak_info_plist.py script requires a version number with 4 parts. CEF
# uses a version number with 3 parts so just set the last part to 0.
cef_plist_version = exec_script(
"//cef/tools/cef_version.py", [ "plist" ], "trim string", [])
# Need to be creative to match dylib version formatting requirements.
cef_dylib_version = exec_script(
"//cef/tools/cef_version.py", [ "dylib" ], "trim string", [])
2016-06-23 19:42:00 +02:00
}
# Read file lists from gypi files. The gypi_to_gn.py script does not support
# variable references so all required variables must be explicitly specified in
# the below configurations.
gypi_paths = exec_script("//cef/tools/gypi_to_gn.py",
2016-06-23 19:42:00 +02:00
[ rebase_path("cef_paths.gypi") ],
"scope",
[ "cef_paths.gypi" ])
gypi_paths2 = exec_script("//cef/tools/gypi_to_gn.py",
2016-06-23 19:42:00 +02:00
[ rebase_path("cef_paths2.gypi") ],
"scope",
[ "cef_paths2.gypi" ])
#
# Targets that will be built when depending on "//cef".
#
group("cef") {
testonly = true
deps = [
":cefsimple",
":ceftests",
2016-06-23 19:42:00 +02:00
]
if (!is_linux || use_x11) {
deps += [ ":cefclient" ]
}
2016-06-23 19:42:00 +02:00
}
#
# libcef static target.
#
if (is_win) {
# Target for building code that accesses chrome_elf internals. Included from
# the //chrome_elf:crash target. Defined as a static_library instead of a
# source_set because (a) the source files don't export any symbols and (b)
# *_switches.cc duplication otherwise causes linker errors.
static_library("chrome_elf_set") {
sources = [
"libcef/common/crash_reporter_client.cc",
"libcef/common/crash_reporter_client.h",
# Required for crash_keys::GetChromeCrashKeys.
# Otherwise we need to copy this array into CEF, which would be difficult
# to maintain.
"//chrome/common/crash_keys.cc",
"//chrome/common/chrome_switches.cc",
"//components/flags_ui/flags_ui_switches.cc",
"//content/public/common/content_switches.cc",
]
configs += [
"libcef/features:config",
"//build/config:precompiled_headers",
]
if (is_component_build) {
# Avoid linker errors with content_switches.cc in component build by not
# defining CONTENT_EXPORT.
defines = ["COMPILE_CONTENT_STATICALLY"]
}
deps = [
"//components/crash/core/common", # crash_keys
# Required by chrome_switches.cc
"//chrome/common:buildflags",
"//ppapi/buildflags:buildflags",
"//printing/buildflags:buildflags",
"//ui/base:buildflags",
]
}
}
2016-06-23 19:42:00 +02:00
static_library("libcef_static") {
sources = gypi_paths2.includes_common +
gypi_paths.autogen_cpp_includes + [
"libcef/browser/audio_mirror_destination.cc",
"libcef/browser/audio_mirror_destination.h",
"libcef/browser/audio_push_sink.cc",
"libcef/browser/audio_push_sink.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/browser_context.cc",
"libcef/browser/browser_context.h",
"libcef/browser/browser_context_keyed_service_factories.cc",
"libcef/browser/browser_context_keyed_service_factories.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/browser_host_impl.cc",
"libcef/browser/browser_host_impl.h",
"libcef/browser/browser_info.cc",
"libcef/browser/browser_info.h",
"libcef/browser/browser_info_manager.cc",
"libcef/browser/browser_info_manager.h",
"libcef/browser/browser_main.cc",
"libcef/browser/browser_main.h",
"libcef/browser/browser_message_filter.cc",
"libcef/browser/browser_message_filter.h",
"libcef/browser/browser_message_loop.cc",
"libcef/browser/browser_message_loop.h",
"libcef/browser/browser_platform_delegate.cc",
"libcef/browser/browser_platform_delegate.h",
"libcef/browser/browser_platform_delegate_create.cc",
"libcef/browser/browser_urlrequest_impl.cc",
"libcef/browser/browser_urlrequest_impl.h",
"libcef/browser/browser_util.cc",
"libcef/browser/browser_util.h",
"libcef/browser/chrome_browser_process_stub.cc",
"libcef/browser/chrome_browser_process_stub.h",
"libcef/browser/chrome_crash_reporter_client_stub.cc",
"libcef/browser/chrome_profile_manager_stub.cc",
"libcef/browser/chrome_profile_manager_stub.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/chrome_profile_stub.cc",
"libcef/browser/chrome_profile_stub.h",
"libcef/browser/content_browser_client.cc",
"libcef/browser/content_browser_client.h",
"libcef/browser/context.cc",
"libcef/browser/context.h",
"libcef/browser/context_menu_params_impl.cc",
"libcef/browser/context_menu_params_impl.h",
"libcef/browser/devtools/devtools_file_manager.cc",
"libcef/browser/devtools/devtools_file_manager.h",
"libcef/browser/devtools/devtools_frontend.cc",
"libcef/browser/devtools/devtools_frontend.h",
"libcef/browser/devtools/devtools_manager_delegate.cc",
"libcef/browser/devtools/devtools_manager_delegate.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/download_item_impl.cc",
"libcef/browser/download_item_impl.h",
"libcef/browser/download_manager_delegate.cc",
"libcef/browser/download_manager_delegate.h",
"libcef/browser/extension_impl.cc",
"libcef/browser/extension_impl.h",
"libcef/browser/extensions/api/storage/sync_value_store_cache.cc",
"libcef/browser/extensions/api/storage/sync_value_store_cache.h",
"libcef/browser/extensions/api/tabs/tabs_api.cc",
"libcef/browser/extensions/api/tabs/tabs_api.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/extensions/browser_extensions_util.cc",
"libcef/browser/extensions/browser_extensions_util.h",
"libcef/browser/extensions/browser_platform_delegate_background.cc",
"libcef/browser/extensions/browser_platform_delegate_background.h",
"libcef/browser/extensions/chrome_api_registration.cc",
"libcef/browser/extensions/chrome_api_registration.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/extensions/component_extension_resource_manager.cc",
"libcef/browser/extensions/component_extension_resource_manager.h",
"libcef/browser/extensions/extensions_api_client.cc",
"libcef/browser/extensions/extensions_api_client.h",
"libcef/browser/extensions/extensions_browser_api_provider.cc",
"libcef/browser/extensions/extensions_browser_api_provider.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/extensions/extensions_browser_client.cc",
"libcef/browser/extensions/extensions_browser_client.h",
"libcef/browser/extensions/extension_background_host.cc",
"libcef/browser/extensions/extension_background_host.h",
"libcef/browser/extensions/extension_function_details.cc",
"libcef/browser/extensions/extension_function_details.h",
"libcef/browser/extensions/extension_host_delegate.cc",
"libcef/browser/extensions/extension_host_delegate.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/extensions/extension_system.cc",
"libcef/browser/extensions/extension_system.h",
"libcef/browser/extensions/extension_system_factory.cc",
"libcef/browser/extensions/extension_system_factory.h",
"libcef/browser/extensions/extension_view_host.cc",
"libcef/browser/extensions/extension_view_host.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/extensions/extension_web_contents_observer.cc",
"libcef/browser/extensions/extension_web_contents_observer.h",
"libcef/browser/extensions/mime_handler_view_guest_delegate.cc",
"libcef/browser/extensions/mime_handler_view_guest_delegate.h",
"libcef/browser/extensions/pdf_extension_util.cc",
"libcef/browser/extensions/pdf_extension_util.h",
"libcef/browser/extensions/pdf_web_contents_helper_client.cc",
"libcef/browser/extensions/pdf_web_contents_helper_client.h",
"libcef/browser/extensions/value_store/cef_value_store.cc",
"libcef/browser/extensions/value_store/cef_value_store.h",
"libcef/browser/extensions/value_store/cef_value_store_factory.cc",
"libcef/browser/extensions/value_store/cef_value_store_factory.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/file_dialog_runner.h",
"libcef/browser/file_dialog_manager.cc",
"libcef/browser/file_dialog_manager.h",
"libcef/browser/frame_host_impl.cc",
"libcef/browser/frame_host_impl.h",
"libcef/browser/image_impl.cc",
"libcef/browser/image_impl.h",
"libcef/browser/javascript_dialog_runner.h",
"libcef/browser/javascript_dialog_manager.cc",
"libcef/browser/javascript_dialog_manager.h",
"libcef/browser/media_capture_devices_dispatcher.cc",
"libcef/browser/media_capture_devices_dispatcher.h",
"libcef/browser/menu_manager.cc",
"libcef/browser/menu_manager.h",
"libcef/browser/menu_model_impl.cc",
"libcef/browser/menu_model_impl.h",
"libcef/browser/menu_runner.h",
"libcef/browser/native/browser_platform_delegate_native.cc",
"libcef/browser/native/browser_platform_delegate_native.h",
"libcef/browser/navigate_params.cc",
"libcef/browser/navigate_params.h",
"libcef/browser/navigation_entry_impl.cc",
"libcef/browser/navigation_entry_impl.h",
"libcef/browser/net/chrome_scheme_handler.cc",
"libcef/browser/net/chrome_scheme_handler.h",
"libcef/browser/net/cookie_manager_old_impl.cc",
"libcef/browser/net/cookie_manager_old_impl.h",
"libcef/browser/net/crlset_file_util_impl.cc",
2016-06-23 19:42:00 +02:00
"libcef/browser/net/devtools_scheme_handler.cc",
"libcef/browser/net/devtools_scheme_handler.h",
"libcef/browser/net/internal_scheme_handler.cc",
"libcef/browser/net/internal_scheme_handler.h",
"libcef/browser/net/net_util.cc",
"libcef/browser/net/net_util.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/net/network_delegate.cc",
"libcef/browser/net/network_delegate.h",
"libcef/browser/net/resource_request_job.cc",
"libcef/browser/net/resource_request_job.h",
"libcef/browser/net/scheme_handler.cc",
"libcef/browser/net/scheme_handler.h",
"libcef/browser/net/source_stream.cc",
"libcef/browser/net/source_stream.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/net/url_request_context.cc",
"libcef/browser/net/url_request_context.h",
"libcef/browser/net/url_request_context_getter.cc",
2016-06-23 19:42:00 +02:00
"libcef/browser/net/url_request_context_getter.h",
"libcef/browser/net/url_request_interceptor.cc",
"libcef/browser/net/url_request_interceptor.h",
"libcef/browser/net/url_request_manager.cc",
"libcef/browser/net/url_request_manager.h",
"libcef/browser/net/url_request_user_data.cc",
"libcef/browser/net/url_request_user_data.h",
Implement NetworkService request interception/handling (see issue #2622). Implementation notes: - Chromium change: CookieMonster::SetCookieableSchemes needs to be called immediately after the CookieMonster is created in NetworkContext:: ApplyContextParamsToBuilder. Add a Profile::GetCookieableSchemes method and NetworkContextParams.cookieable_schemes member (set from ProfileNetworkContextService::CreateNetworkContextParams) to support that. - Chromium change: Add a ContentBrowserClient::HandleExternalProtocol variant that exposes additional NetworkService request information. - GetResourceResponseFilter is not yet implemented. API changes: - Resource-related callbacks have been moved from CefRequestHandler to a new CefResourceRequestHandler interface which is returned via the GetResourceRequestHandler method. If the CefRequestHandler declines to handle a resource it can optionally be handled by the CefRequestContextHandler, if any, associated with the loading context. - The OnProtocolExecution callback has been moved from CefRequestHandler to CefResourceRequestHandler and will be called if a custom scheme request is unhandled. - Cookie send/save permission callbacks have been moved from CefRequestHandler and CefResourceHandler to CefResourceRequestHandler. - New methods added to CefResourceHandler that better match NetworkService execution sequence expectations. The old methods are now deprecated. - New methods added to CefRequest and CefResponse. Known behavior changes with the NetworkService implementation: - Modifying the |new_url| parameter in OnResourceRedirect will no longer result in the method being called an additional time (likely a bug in the old implementation). - Modifying the request URL in OnResourceResponse would previously cause a redirect. This behavior is now deprecated because the NetworkService does not support this functionality when using default network loaders. Temporary support has been added in combination with CefResourceHandler usage only. - Other changes to the request object in OnResourceResponse will now cause the request to be restarted. This means that OnBeforeResourceLoad, etc, will be called an additional time with the new request information. - CefResponse::GetMimeType will now be empty for non-200 responses. - Requests using custom schemes can now be handled via CefResourceRequestHandler with the same callback behavior as builtin schemes. - Redirects of custom scheme requests will now be followed as expected. - Default handling of builtin schemes can now be disabled by setting |disable_default_handling| to true in GetResourceRequestHandler. - Unhandled requests (custom scheme or builtin scheme with default handling disabled) will fail with an CefResponse::GetError value of ERR_UNKNOWN_URL_SCHEME. - The CefSchemeHandlerFactory::Create callback will now include cookie headers. To test: - Run `cefclient --enable-network-service`. All resources should load successfully (this tests the transparent proxy capability). - All tests pass with NetworkService disabled. - The following tests pass with NetworkService enabled: - CookieTest.* - FrameTest.* (excluding .*Nav) - NavigationTest.* (excluding .Redirect*) - RequestHandlerTest.* - RequestContextTest.Basic* - RequestContextTest.Popup* - RequestTest.* - ResourceManagerTest.* - ResourceRequestHandlerTest.* (excluding .Filter*) - SchemeHandlerTest.* - StreamResourceHandlerTest.*
2019-04-24 04:50:25 +02:00
"libcef/browser/net_service/cookie_helper.cc",
"libcef/browser/net_service/cookie_helper.h",
"libcef/browser/net_service/cookie_manager_impl.cc",
"libcef/browser/net_service/cookie_manager_impl.h",
Implement NetworkService request interception/handling (see issue #2622). Implementation notes: - Chromium change: CookieMonster::SetCookieableSchemes needs to be called immediately after the CookieMonster is created in NetworkContext:: ApplyContextParamsToBuilder. Add a Profile::GetCookieableSchemes method and NetworkContextParams.cookieable_schemes member (set from ProfileNetworkContextService::CreateNetworkContextParams) to support that. - Chromium change: Add a ContentBrowserClient::HandleExternalProtocol variant that exposes additional NetworkService request information. - GetResourceResponseFilter is not yet implemented. API changes: - Resource-related callbacks have been moved from CefRequestHandler to a new CefResourceRequestHandler interface which is returned via the GetResourceRequestHandler method. If the CefRequestHandler declines to handle a resource it can optionally be handled by the CefRequestContextHandler, if any, associated with the loading context. - The OnProtocolExecution callback has been moved from CefRequestHandler to CefResourceRequestHandler and will be called if a custom scheme request is unhandled. - Cookie send/save permission callbacks have been moved from CefRequestHandler and CefResourceHandler to CefResourceRequestHandler. - New methods added to CefResourceHandler that better match NetworkService execution sequence expectations. The old methods are now deprecated. - New methods added to CefRequest and CefResponse. Known behavior changes with the NetworkService implementation: - Modifying the |new_url| parameter in OnResourceRedirect will no longer result in the method being called an additional time (likely a bug in the old implementation). - Modifying the request URL in OnResourceResponse would previously cause a redirect. This behavior is now deprecated because the NetworkService does not support this functionality when using default network loaders. Temporary support has been added in combination with CefResourceHandler usage only. - Other changes to the request object in OnResourceResponse will now cause the request to be restarted. This means that OnBeforeResourceLoad, etc, will be called an additional time with the new request information. - CefResponse::GetMimeType will now be empty for non-200 responses. - Requests using custom schemes can now be handled via CefResourceRequestHandler with the same callback behavior as builtin schemes. - Redirects of custom scheme requests will now be followed as expected. - Default handling of builtin schemes can now be disabled by setting |disable_default_handling| to true in GetResourceRequestHandler. - Unhandled requests (custom scheme or builtin scheme with default handling disabled) will fail with an CefResponse::GetError value of ERR_UNKNOWN_URL_SCHEME. - The CefSchemeHandlerFactory::Create callback will now include cookie headers. To test: - Run `cefclient --enable-network-service`. All resources should load successfully (this tests the transparent proxy capability). - All tests pass with NetworkService disabled. - The following tests pass with NetworkService enabled: - CookieTest.* - FrameTest.* (excluding .*Nav) - NavigationTest.* (excluding .Redirect*) - RequestHandlerTest.* - RequestContextTest.Basic* - RequestContextTest.Popup* - RequestTest.* - ResourceManagerTest.* - ResourceRequestHandlerTest.* (excluding .Filter*) - SchemeHandlerTest.* - StreamResourceHandlerTest.*
2019-04-24 04:50:25 +02:00
"libcef/browser/net_service/proxy_url_loader_factory.cc",
"libcef/browser/net_service/proxy_url_loader_factory.h",
"libcef/browser/net_service/resource_handler_wrapper.cc",
"libcef/browser/net_service/resource_handler_wrapper.h",
"libcef/browser/net_service/resource_request_handler_wrapper.cc",
"libcef/browser/net_service/resource_request_handler_wrapper.h",
"libcef/browser/net_service/stream_reader_url_loader.cc",
"libcef/browser/net_service/stream_reader_url_loader.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/origin_whitelist_impl.cc",
"libcef/browser/origin_whitelist_impl.h",
"libcef/browser/osr/browser_platform_delegate_osr.cc",
"libcef/browser/osr/browser_platform_delegate_osr.h",
"libcef/browser/osr/motion_event_osr.cc",
"libcef/browser/osr/motion_event_osr.h",
"libcef/browser/osr/osr_accessibility_util.cc",
"libcef/browser/osr/osr_accessibility_util.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/osr/osr_util.cc",
"libcef/browser/osr/osr_util.h",
"libcef/browser/osr/render_widget_host_view_osr.cc",
"libcef/browser/osr/render_widget_host_view_osr.h",
"libcef/browser/osr/software_output_device_osr.cc",
"libcef/browser/osr/software_output_device_osr.h",
"libcef/browser/osr/synthetic_gesture_target_osr.cc",
"libcef/browser/osr/synthetic_gesture_target_osr.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/osr/web_contents_view_osr.cc",
"libcef/browser/osr/web_contents_view_osr.h",
"libcef/browser/path_util_impl.cc",
"libcef/browser/plugins/plugin_service_filter.cc",
"libcef/browser/plugins/plugin_service_filter.h",
"libcef/browser/prefs/browser_prefs.cc",
"libcef/browser/prefs/browser_prefs.h",
"libcef/browser/prefs/pref_store.cc",
"libcef/browser/prefs/pref_store.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/prefs/renderer_prefs.cc",
"libcef/browser/prefs/renderer_prefs.h",
"libcef/browser/print_settings_impl.cc",
"libcef/browser/print_settings_impl.h",
"libcef/browser/printing/printing_message_filter.cc",
"libcef/browser/printing/printing_message_filter.h",
"libcef/browser/printing/print_view_manager.cc",
"libcef/browser/printing/print_view_manager.h",
"libcef/browser/printing/print_view_manager_base.cc",
"libcef/browser/printing/print_view_manager_base.h",
"libcef/browser/process_util_impl.cc",
"libcef/browser/resource_context.cc",
"libcef/browser/resource_context.h",
"libcef/browser/resource_dispatcher_host_delegate.cc",
"libcef/browser/resource_dispatcher_host_delegate.h",
"libcef/browser/request_context_impl.cc",
"libcef/browser/request_context_impl.h",
"libcef/browser/scheme_impl.cc",
"libcef/browser/server_impl.cc",
"libcef/browser/server_impl.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/speech_recognition_manager_delegate.cc",
"libcef/browser/speech_recognition_manager_delegate.h",
"libcef/browser/ssl_host_state_delegate.cc",
"libcef/browser/ssl_host_state_delegate.h",
"libcef/browser/ssl_info_impl.cc",
"libcef/browser/ssl_info_impl.h",
"libcef/browser/ssl_status_impl.cc",
"libcef/browser/ssl_status_impl.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/stream_impl.cc",
"libcef/browser/stream_impl.h",
"libcef/browser/trace_impl.cc",
"libcef/browser/trace_subscriber.cc",
"libcef/browser/trace_subscriber.h",
"libcef/browser/thread_util.h",
"libcef/browser/web_plugin_impl.cc",
"libcef/browser/web_plugin_impl.h",
"libcef/browser/x509_certificate_impl.cc",
"libcef/browser/x509_certificate_impl.h",
"libcef/browser/x509_cert_principal_impl.cc",
"libcef/browser/x509_cert_principal_impl.h",
2016-06-23 19:42:00 +02:00
"libcef/browser/xml_reader_impl.cc",
"libcef/browser/xml_reader_impl.h",
"libcef/browser/zip_reader_impl.cc",
"libcef/browser/zip_reader_impl.h",
"libcef/common/base_impl.cc",
"libcef/common/cef_message_generator.cc",
"libcef/common/cef_message_generator.h",
"libcef/common/cef_messages.cc",
"libcef/common/cef_messages.h",
"libcef/common/cef_switches.cc",
"libcef/common/cef_switches.h",
"libcef/common/command_line_impl.cc",
"libcef/common/command_line_impl.h",
"libcef/common/content_client.cc",
"libcef/common/content_client.h",
"libcef/common/crash_reporter_client.cc",
"libcef/common/crash_reporter_client.h",
"libcef/common/crash_reporting.cc",
"libcef/common/crash_reporting.h",
2016-06-23 19:42:00 +02:00
"libcef/common/drag_data_impl.cc",
"libcef/common/drag_data_impl.h",
"libcef/common/extensions/chrome_generated_schemas.cc",
"libcef/common/extensions/chrome_generated_schemas.h",
"libcef/common/extensions/extensions_api_provider.cc",
"libcef/common/extensions/extensions_api_provider.h",
2016-06-23 19:42:00 +02:00
"libcef/common/extensions/extensions_client.cc",
"libcef/common/extensions/extensions_client.h",
"libcef/common/extensions/extensions_util.cc",
"libcef/common/extensions/extensions_util.h",
"libcef/common/file_util_impl.cc",
2016-06-23 19:42:00 +02:00
"libcef/common/json_impl.cc",
"libcef/common/main_delegate.cc",
"libcef/common/main_delegate.h",
"libcef/common/net/http_header_utils.cc",
"libcef/common/net/http_header_utils.h",
"libcef/common/net/net_resource_provider.cc",
"libcef/common/net/net_resource_provider.h",
"libcef/common/net/scheme_registration.cc",
"libcef/common/net/scheme_registration.h",
"libcef/common/net/upload_data.cc",
"libcef/common/net/upload_data.h",
"libcef/common/net/upload_element.cc",
"libcef/common/net/upload_element.h",
Implement NetworkService request interception/handling (see issue #2622). Implementation notes: - Chromium change: CookieMonster::SetCookieableSchemes needs to be called immediately after the CookieMonster is created in NetworkContext:: ApplyContextParamsToBuilder. Add a Profile::GetCookieableSchemes method and NetworkContextParams.cookieable_schemes member (set from ProfileNetworkContextService::CreateNetworkContextParams) to support that. - Chromium change: Add a ContentBrowserClient::HandleExternalProtocol variant that exposes additional NetworkService request information. - GetResourceResponseFilter is not yet implemented. API changes: - Resource-related callbacks have been moved from CefRequestHandler to a new CefResourceRequestHandler interface which is returned via the GetResourceRequestHandler method. If the CefRequestHandler declines to handle a resource it can optionally be handled by the CefRequestContextHandler, if any, associated with the loading context. - The OnProtocolExecution callback has been moved from CefRequestHandler to CefResourceRequestHandler and will be called if a custom scheme request is unhandled. - Cookie send/save permission callbacks have been moved from CefRequestHandler and CefResourceHandler to CefResourceRequestHandler. - New methods added to CefResourceHandler that better match NetworkService execution sequence expectations. The old methods are now deprecated. - New methods added to CefRequest and CefResponse. Known behavior changes with the NetworkService implementation: - Modifying the |new_url| parameter in OnResourceRedirect will no longer result in the method being called an additional time (likely a bug in the old implementation). - Modifying the request URL in OnResourceResponse would previously cause a redirect. This behavior is now deprecated because the NetworkService does not support this functionality when using default network loaders. Temporary support has been added in combination with CefResourceHandler usage only. - Other changes to the request object in OnResourceResponse will now cause the request to be restarted. This means that OnBeforeResourceLoad, etc, will be called an additional time with the new request information. - CefResponse::GetMimeType will now be empty for non-200 responses. - Requests using custom schemes can now be handled via CefResourceRequestHandler with the same callback behavior as builtin schemes. - Redirects of custom scheme requests will now be followed as expected. - Default handling of builtin schemes can now be disabled by setting |disable_default_handling| to true in GetResourceRequestHandler. - Unhandled requests (custom scheme or builtin scheme with default handling disabled) will fail with an CefResponse::GetError value of ERR_UNKNOWN_URL_SCHEME. - The CefSchemeHandlerFactory::Create callback will now include cookie headers. To test: - Run `cefclient --enable-network-service`. All resources should load successfully (this tests the transparent proxy capability). - All tests pass with NetworkService disabled. - The following tests pass with NetworkService enabled: - CookieTest.* - FrameTest.* (excluding .*Nav) - NavigationTest.* (excluding .Redirect*) - RequestHandlerTest.* - RequestContextTest.Basic* - RequestContextTest.Popup* - RequestTest.* - ResourceManagerTest.* - ResourceRequestHandlerTest.* (excluding .Filter*) - SchemeHandlerTest.* - StreamResourceHandlerTest.*
2019-04-24 04:50:25 +02:00
"libcef/common/net_service/net_service_util.cc",
"libcef/common/net_service/net_service_util.h",
"libcef/common/net_service/util.cc",
"libcef/common/net_service/util.h",
2016-06-23 19:42:00 +02:00
"libcef/common/parser_impl.cc",
"libcef/common/process_message_impl.cc",
"libcef/common/process_message_impl.h",
"libcef/common/request_impl.cc",
"libcef/common/request_impl.h",
"libcef/common/resource_bundle_impl.cc",
"libcef/common/resource_bundle_impl.h",
"libcef/common/response_impl.cc",
"libcef/common/response_impl.h",
"libcef/common/response_manager.cc",
"libcef/common/response_manager.h",
"libcef/common/scheme_registrar_impl.cc",
"libcef/common/scheme_registrar_impl.h",
"libcef/common/string_list_impl.cc",
"libcef/common/string_map_impl.cc",
"libcef/common/string_multimap_impl.cc",
"libcef/common/string_types_impl.cc",
"libcef/common/task_impl.cc",
"libcef/common/task_runner_impl.cc",
"libcef/common/task_runner_impl.h",
"libcef/common/test/translator_test_impl.cc",
2016-11-12 00:22:53 +01:00
"libcef/common/thread_impl.cc",
"libcef/common/thread_impl.h",
2016-06-23 19:42:00 +02:00
"libcef/common/time_impl.cc",
"libcef/common/time_util.h",
"libcef/common/tracker.cc",
"libcef/common/tracker.h",
"libcef/common/urlrequest_impl.cc",
"libcef/common/value_base.cc",
"libcef/common/value_base.h",
"libcef/common/values_impl.cc",
"libcef/common/values_impl.h",
"libcef/common/waitable_event_impl.cc",
"libcef/common/waitable_event_impl.h",
"libcef/common/widevine_loader.cc",
"libcef/common/widevine_loader.h",
2016-06-23 19:42:00 +02:00
"libcef/renderer/browser_impl.cc",
"libcef/renderer/browser_impl.h",
"libcef/renderer/content_renderer_client.cc",
"libcef/renderer/content_renderer_client.h",
"libcef/renderer/dom_document_impl.cc",
"libcef/renderer/dom_document_impl.h",
"libcef/renderer/dom_node_impl.cc",
"libcef/renderer/dom_node_impl.h",
"libcef/renderer/extensions/extensions_dispatcher_delegate.cc",
"libcef/renderer/extensions/extensions_dispatcher_delegate.h",
"libcef/renderer/extensions/extensions_renderer_client.cc",
"libcef/renderer/extensions/extensions_renderer_client.h",
"libcef/renderer/extensions/print_render_frame_helper_delegate.cc",
"libcef/renderer/extensions/print_render_frame_helper_delegate.h",
2016-06-23 19:42:00 +02:00
"libcef/renderer/frame_impl.cc",
"libcef/renderer/frame_impl.h",
"libcef/renderer/render_frame_observer.cc",
"libcef/renderer/render_frame_observer.h",
"libcef/renderer/render_frame_util.cc",
"libcef/renderer/render_frame_util.h",
2016-06-23 19:42:00 +02:00
"libcef/renderer/render_message_filter.cc",
"libcef/renderer/render_message_filter.h",
"libcef/renderer/render_thread_observer.cc",
"libcef/renderer/render_thread_observer.h",
"libcef/renderer/render_urlrequest_impl.cc",
"libcef/renderer/render_urlrequest_impl.h",
"libcef/renderer/thread_util.h",
"libcef/renderer/v8_impl.cc",
"libcef/renderer/v8_impl.h",
"libcef/utility/content_utility_client.cc",
"libcef/utility/content_utility_client.h",
# Part of //chrome/renderer. Not included by that target because CEF builds
# with enable_print_preview=0.
2016-06-23 19:42:00 +02:00
"//chrome/renderer/pepper/chrome_pdf_print_client.cc",
"//chrome/renderer/pepper/chrome_pdf_print_client.h",
]
configs += [
"libcef/features:config",
2016-06-23 19:42:00 +02:00
"//build/config:precompiled_headers",
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
]
public_configs = [
"libcef/features:config",
2016-06-23 19:42:00 +02:00
]
include_dirs = [
# Crashpad code uses paths relative to this directory.
"//third_party/crashpad/crashpad",
2016-06-23 19:42:00 +02:00
]
public_deps = [
# Bring in feature flag defines.
"//cef/libcef/features",
]
2016-06-23 19:42:00 +02:00
deps = [
":cef_make_headers",
":cef_service_manifests",
2016-06-23 19:42:00 +02:00
# Generate API bindings for extensions.
# TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
# libcef/common/extensions/api/README.txt for details.
#"libcef/common/extensions/api",
#"libcef/common/extensions/api:api_registration",
"libcef/common/extensions/api:extensions_features",
2016-06-23 19:42:00 +02:00
# Normal build dependencies. Should be sorted alphabetically.
"//base",
"//base:base_static",
"//base/third_party/dynamic_annotations",
"//cc",
"//chrome/browser",
"//chrome/child",
"//chrome/common",
"//chrome/renderer",
"//chrome/services/printing:lib",
"//chrome/utility",
2016-06-23 19:42:00 +02:00
"//components/cdm/renderer",
"//components/certificate_transparency",
2016-06-23 19:42:00 +02:00
"//components/content_settings/core/browser",
"//components/content_settings/core/common",
"//components/crx_file",
"//components/data_use_measurement/core",
"//components/google/core/browser",
"//components/keyed_service/content:content",
"//components/keyed_service/core:core",
"//components/navigation_interception",
"//components/network_session_configurator/browser",
2016-06-23 19:42:00 +02:00
"//components/pdf/browser",
"//components/pdf/renderer",
"//components/plugins/renderer",
"//components/pref_registry",
"//components/printing/browser",
"//components/printing/common",
"//components/printing/renderer",
"//components/proxy_config",
"//components/safe_browsing/db:test_database_manager",
"//components/services/pdf_compositor/public/cpp:factory",
"//components/services/pdf_compositor/public/interfaces",
"//components/tracing",
2016-06-23 19:42:00 +02:00
"//components/update_client",
"//components/url_formatter",
"//components/user_prefs",
"//components/version_info",
"//components/visitedlink/browser",
"//components/visitedlink/common",
"//components/visitedlink/renderer",
"//components/viz/service",
2016-06-23 19:42:00 +02:00
"//components/web_cache/renderer",
"//content/public/app:both",
"//content/public/browser",
"//content/public/child",
2016-06-23 19:42:00 +02:00
"//content/public/common",
"//content/public/gpu",
"//content/public/renderer",
"//content/public/utility",
"//crypto",
"//device/base",
2016-06-23 19:42:00 +02:00
"//extensions/browser",
"//extensions/browser:core_api_provider",
"//extensions/buildflags",
2016-06-23 19:42:00 +02:00
"//extensions/common/api",
"//extensions/common:core_api_provider",
2016-06-23 19:42:00 +02:00
"//extensions/renderer",
"//gpu",
"//ipc",
"//media",
"//media/blink",
"//net",
"//net:net_with_v8",
"//pdf",
"//ppapi/buildflags",
"//printing/buildflags",
"//services/network:network_service",
"//services/network/public/cpp",
"//services/service_manager/embedder",
"//services/service_manager/public/cpp",
2016-06-23 19:42:00 +02:00
"//skia",
"//storage/browser",
"//third_party/blink/public:blink",
"//third_party/brotli:dec",
"//third_party/cld_3/src/src:cld_3",
2016-06-23 19:42:00 +02:00
"//third_party/hunspell",
"//third_party/leveldatabase",
"//third_party/libxml",
"//third_party/widevine/cdm:headers",
"//third_party/widevine/cdm",
2016-06-23 19:42:00 +02:00
"//third_party/icu",
"//third_party/zlib:minizip",
"//ui/base",
"//ui/base/ime",
"//ui/events:events_base",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gfx/ipc",
"//ui/gfx/ipc/geometry",
"//ui/gfx/ipc/skia",
"//ui/gl",
"//url",
"//v8",
]
if (is_win) {
sources += gypi_paths2.includes_win + [
"libcef/browser/browser_main_win.cc",
"libcef/browser/native/browser_platform_delegate_native_win.cc",
"libcef/browser/native/browser_platform_delegate_native_win.h",
"libcef/browser/native/file_dialog_runner_win.cc",
"libcef/browser/native/file_dialog_runner_win.h",
"libcef/browser/native/javascript_dialog_runner_win.cc",
"libcef/browser/native/javascript_dialog_runner_win.h",
"libcef/browser/native/menu_2.cc",
"libcef/browser/native/menu_2.h",
"libcef/browser/native/menu_runner_win.cc",
"libcef/browser/native/menu_runner_win.h",
"libcef/browser/native/menu_wrapper.h",
"libcef/browser/native/native_menu_win.cc",
"libcef/browser/native/native_menu_win.h",
"libcef/browser/osr/browser_platform_delegate_osr_win.cc",
"libcef/browser/osr/browser_platform_delegate_osr_win.h",
"libcef/browser/osr/render_widget_host_view_osr_win.cc",
# Part of //chrome/utility.
"//chrome/utility/printing_handler.cc",
"//chrome/utility/printing_handler.h",
2016-06-23 19:42:00 +02:00
]
deps += [
"//chrome/install_static:secondary_module",
"//chrome_elf",
]
if (is_component_build) {
deps += [ "//content:sandbox_helper_win" ]
}
libs = [
"comctl32.lib",
# For D3D11_DECODER_PROFILE_H264_VLD_NOFGT.
"dxguid.lib",
]
data_deps = [
"//chrome/elevation_service",
]
2016-06-23 19:42:00 +02:00
}
if (is_linux) {
sources += gypi_paths2.includes_linux + [
"libcef/browser/native/browser_platform_delegate_native_linux.cc",
"libcef/browser/native/browser_platform_delegate_native_linux.h",
"libcef/browser/native/menu_runner_linux.cc",
"libcef/browser/native/menu_runner_linux.h",
"libcef/browser/osr/browser_platform_delegate_osr_linux.cc",
"libcef/browser/osr/browser_platform_delegate_osr_linux.h",
"libcef/browser/osr/render_widget_host_view_osr_linux.cc",
"libcef/browser/printing/print_dialog_linux.cc",
"libcef/browser/printing/print_dialog_linux.h",
]
if (use_x11) {
sources += [
"libcef/browser/native/window_x11.cc",
"libcef/browser/native/window_x11.h",
]
}
2016-06-23 19:42:00 +02:00
deps += [
"//build/config/freetype",
"//third_party/fontconfig",
2016-06-23 19:42:00 +02:00
]
if (is_linux && !use_x11) {
deps += [
"//third_party/angle:libEGL",
]
}
2016-06-23 19:42:00 +02:00
}
if (is_mac) {
sources += gypi_paths2.includes_mac + [
"libcef/browser/native/browser_platform_delegate_native_mac.h",
"libcef/browser/native/browser_platform_delegate_native_mac.mm",
"libcef/browser/native/file_dialog_runner_mac.h",
"libcef/browser/native/file_dialog_runner_mac.mm",
"libcef/browser/native/javascript_dialog_runner_mac.h",
"libcef/browser/native/javascript_dialog_runner_mac.mm",
"libcef/browser/native/menu_runner_mac.h",
"libcef/browser/native/menu_runner_mac.mm",
"libcef/browser/osr/browser_platform_delegate_osr_mac.h",
"libcef/browser/osr/browser_platform_delegate_osr_mac.mm",
"libcef/browser/osr/render_widget_host_view_osr_mac.mm",
"libcef/common/util_mac.h",
"libcef/common/util_mac.mm",
]
}
if (is_win || is_mac) {
deps += [ "//third_party/crashpad/crashpad/handler" ]
}
2016-06-23 19:42:00 +02:00
if (use_x11) {
deps += [ "//ui/events/devices/x11" ]
}
if (is_posix && !is_mac) {
sources += [
"libcef/common/cef_crash_report_utils.cc",
"libcef/common/cef_crash_report_utils.h",
]
2016-06-23 19:42:00 +02:00
deps += [
"//components/crash/content/app",
"//components/crash/content/browser",
]
}
if (v8_use_external_startup_data && use_v8_context_snapshot) {
deps += [ "//tools/v8_context_snapshot" ]
}
2016-06-23 19:42:00 +02:00
if (use_aura) {
sources += [
"libcef/browser/native/window_delegate_view.cc",
"libcef/browser/native/window_delegate_view.h",
"libcef/browser/views/basic_label_button_impl.cc",
"libcef/browser/views/basic_label_button_impl.h",
"libcef/browser/views/basic_label_button_view.cc",
"libcef/browser/views/basic_label_button_view.h",
"libcef/browser/views/basic_panel_impl.cc",
"libcef/browser/views/basic_panel_impl.h",
"libcef/browser/views/basic_panel_view.cc",
"libcef/browser/views/basic_panel_view.h",
"libcef/browser/views/box_layout_impl.cc",
"libcef/browser/views/box_layout_impl.h",
"libcef/browser/views/browser_platform_delegate_views.cc",
"libcef/browser/views/browser_platform_delegate_views.h",
"libcef/browser/views/browser_view_impl.cc",
"libcef/browser/views/browser_view_impl.h",
"libcef/browser/views/browser_view_view.cc",
"libcef/browser/views/browser_view_view.h",
"libcef/browser/views/button_impl.h",
"libcef/browser/views/button_view.h",
"libcef/browser/views/display_impl.cc",
"libcef/browser/views/display_impl.h",
"libcef/browser/views/fill_layout_impl.cc",
"libcef/browser/views/fill_layout_impl.h",
"libcef/browser/views/label_button_impl.h",
"libcef/browser/views/label_button_view.h",
"libcef/browser/views/layout_impl.h",
"libcef/browser/views/layout_adapter.cc",
"libcef/browser/views/layout_adapter.h",
"libcef/browser/views/layout_util.cc",
"libcef/browser/views/layout_util.h",
"libcef/browser/views/menu_button_impl.cc",
"libcef/browser/views/menu_button_impl.h",
"libcef/browser/views/menu_button_view.cc",
"libcef/browser/views/menu_button_view.h",
"libcef/browser/views/menu_runner_views.cc",
"libcef/browser/views/menu_runner_views.h",
"libcef/browser/views/panel_impl.h",
"libcef/browser/views/panel_view.h",
"libcef/browser/views/scroll_view_impl.cc",
"libcef/browser/views/scroll_view_impl.h",
"libcef/browser/views/scroll_view_view.cc",
"libcef/browser/views/scroll_view_view.h",
"libcef/browser/views/textfield_impl.cc",
"libcef/browser/views/textfield_impl.h",
"libcef/browser/views/textfield_view.cc",
"libcef/browser/views/textfield_view.h",
"libcef/browser/views/view_adapter.cc",
"libcef/browser/views/view_adapter.h",
"libcef/browser/views/view_impl.h",
"libcef/browser/views/view_util.cc",
"libcef/browser/views/view_util.h",
"libcef/browser/views/view_view.h",
"libcef/browser/views/window_impl.cc",
"libcef/browser/views/window_impl.h",
"libcef/browser/views/window_view.cc",
"libcef/browser/views/window_view.h",
# Part of //ui/views:test_support which is testingonly.
2016-06-23 19:42:00 +02:00
"//ui/views/test/desktop_test_views_delegate.h",
"//ui/views/test/desktop_test_views_delegate_aura.cc",
"//ui/views/test/test_views_delegate.h",
"//ui/views/test/test_views_delegate_aura.cc",
2016-06-23 19:42:00 +02:00
# Support for UI input events.
# Part of //ui/base:test_support which is testingonly.
2016-06-23 19:42:00 +02:00
"//ui/base/test/ui_controls.h",
"//ui/base/test/ui_controls_aura.cc",
"//ui/aura/test/ui_controls_factory_aura.h",
]
if (is_linux && !use_x11) {
sources += [
"//ui/aura/test/mus/window_tree_client_test_api.h",
"//ui/aura/test/mus/window_tree_client_test_api.cc",
"//ui/aura/test/ui_controls_factory_ozone.cc",
"//ui/events/test/events_test_utils.cc"
]
}
2016-06-23 19:42:00 +02:00
deps += [
"//ui/aura",
"//ui/events",
"//ui/strings",
"//ui/wm",
"//ui/wm/public",
2016-06-23 19:42:00 +02:00
]
if (toolkit_views) {
deps += [
"//ui/views",
"//ui/views/controls/webview",
]
}
if (is_win) {
sources += [
# Support for UI input events.
# Part of //base/test:test_config which is testingonly.
"//base/test/test_switches.cc",
"//base/test/test_switches.h",
"//base/test/test_timeouts.cc",
"//base/test/test_timeouts.h",
# Part of //ui/aura:test_support which is testingonly.
2016-06-23 19:42:00 +02:00
"//ui/aura/test/ui_controls_factory_aurawin.cc",
# Part of //ui/base:test_support which is testingonly.
2016-06-23 19:42:00 +02:00
"//ui/base/test/ui_controls_internal_win.cc",
"//ui/base/test/ui_controls_internal_win.h",
]
}
if (is_linux) {
sources += [
# Support for UI input events.
# Part of //ui/aura:test_support which is testingonly.
2016-06-23 19:42:00 +02:00
"//ui/aura/test/aura_test_utils.cc",
"//ui/aura/test/aura_test_utils.h",
# Part of //ui/events:test_support which is testingonly.
2016-06-23 19:42:00 +02:00
"//ui/events/test/platform_event_waiter.cc",
"//ui/events/test/platform_event_waiter.h",
]
if (use_x11) {
sources += [
# Support for UI input events.
# Part of //ui/aura:test_support which is testingonly.
"//ui/aura/test/ui_controls_factory_aurax11.cc",
"//ui/aura/test/x11_event_sender.cc",
"//ui/aura/test/x11_event_sender.h",
# Part of //ui/views:test_support which is testingonly.
"//ui/views/test/ui_controls_factory_desktop_aurax11.cc",
"//ui/views/test/ui_controls_factory_desktop_aurax11.h",
]
}
2016-06-23 19:42:00 +02:00
}
} else {
sources += [
# Provides stub implementations for the views static methods.
"libcef_dll/views_stub.cc",
]
}
}
#
# libcef_dll_wrapper static targets.
#
# Configuration that will be applied to all targets that depend on
# libcef_dll_wrapper.
2016-06-23 19:42:00 +02:00
config("libcef_dll_wrapper_config") {
include_dirs = [
# CEF sources use include paths relative to the CEF root directory.
2016-06-23 19:42:00 +02:00
".",
# CEF generates some header files that also need to be discoverable.
# They will be copied to the include/ directory in the binary distribution.
"$root_out_dir/includes",
2016-06-23 19:42:00 +02:00
]
}
# libcef_dll_wrapper target.
static_library("libcef_dll_wrapper") {
sources = gypi_paths2.includes_common +
gypi_paths.autogen_cpp_includes +
gypi_paths2.includes_capi +
gypi_paths.autogen_capi_includes +
gypi_paths2.includes_wrapper +
gypi_paths2.libcef_dll_wrapper_sources_base +
gypi_paths2.libcef_dll_wrapper_sources_common +
gypi_paths.autogen_client_side
if (is_mac) {
sources += gypi_paths2.libcef_dll_wrapper_sources_mac
}
defines = [ "WRAPPING_CEF_SHARED" ]
configs += [ ":libcef_dll_wrapper_config" ]
2016-06-23 19:42:00 +02:00
public_configs = [ ":libcef_dll_wrapper_config" ]
}
#
# cef_sandbox target.
#
if (is_win) {
static_library("cef_sandbox") {
sources = [ "libcef_dll/sandbox/sandbox_win.cc" ]
# CEF sources use include paths relative to the CEF root directory.
2016-06-23 19:42:00 +02:00
include_dirs = [ "." ]
deps = [ "//sandbox" ]
}
}
if (is_mac) {
static_library("cef_sandbox") {
sources = [ "libcef_dll/sandbox/sandbox_mac.mm" ]
# CEF sources use include paths relative to the CEF root directory.
include_dirs = [ "." ]
deps = [ "//sandbox/mac:seatbelt" ]
}
}
#
# Service manifests.
#
source_set("cef_content_browser_overlay_manifest") {
sources = [
"libcef/common/service_manifests/cef_content_browser_overlay_manifest.cc",
"libcef/common/service_manifests/cef_content_browser_overlay_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//components/services/heap_profiling/public/mojom",
"//extensions/buildflags",
"//extensions/common:mojo",
"//extensions/common/api:mojom",
"//services/service_manager/public/cpp",
"//third_party/blink/public/common",
]
}
source_set("cef_content_gpu_overlay_manifest") {
sources = [
"libcef/common/service_manifests/cef_content_gpu_overlay_manifest.cc",
"libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//components/services/heap_profiling/public/mojom",
"//services/service_manager/public/cpp",
]
}
source_set("cef_content_renderer_overlay_manifest") {
sources = [
"libcef/common/service_manifests/cef_content_renderer_overlay_manifest.cc",
"libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//components/services/heap_profiling/public/mojom",
"//components/subresource_filter/content/mojom",
"//extensions/buildflags",
"//extensions/common:mojo",
"//services/service_manager/public/cpp",
"//third_party/blink/public/common",
]
if (is_mac) {
deps += [ "//components/spellcheck/common:interfaces" ]
}
}
source_set("cef_content_utility_overlay_manifest") {
sources = [
"libcef/common/service_manifests/cef_content_utility_overlay_manifest.cc",
"libcef/common/service_manifests/cef_content_utility_overlay_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//components/services/heap_profiling/public/mojom",
"//services/service_manager/public/cpp",
]
}
source_set("cef_packaged_service_manifests") {
sources = [
"libcef/common/service_manifests/cef_packaged_service_manifests.cc",
"libcef/common/service_manifests/cef_packaged_service_manifests.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//chrome/common:mojo_bindings",
"//chrome/services/printing/public/cpp:manifest",
"//components/services/pdf_compositor/public/cpp:manifest",
"//components/spellcheck/common:interfaces",
"//components/startup_metric_utils/common:interfaces",
"//extensions/buildflags",
"//printing/buildflags",
"//services/proxy_resolver/public/cpp:manifest",
"//services/service_manager/public/cpp",
]
}
source_set("cef_renderer_manifest") {
sources = [
"libcef/common/service_manifests/cef_renderer_manifest.cc",
"libcef/common/service_manifests/cef_renderer_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//chrome/common:mojo_bindings",
"//components/spellcheck/common:interfaces",
"//services/service_manager/public/cpp",
]
}
source_set("cef_service_manifests") {
public_deps = [
":cef_content_browser_overlay_manifest",
":cef_content_gpu_overlay_manifest",
":cef_content_renderer_overlay_manifest",
":cef_content_utility_overlay_manifest",
":cef_packaged_service_manifests",
":cef_renderer_manifest",
]
}
2016-06-23 19:42:00 +02:00
#
# Resource grit/pack targets.
#
# Helper for generating scaled resource packs.
template("cef_pak_scaled") {
percent = invoker.percent
repack("pak_${target_name}") {
# Each input pak file should also have a deps line for completeness.
# Add associated .h files in the make_pack_header("resources") target.
2016-06-23 19:42:00 +02:00
sources = [
"$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
2016-06-23 19:42:00 +02:00
"$root_gen_dir/components/components_resources_${percent}_percent.pak",
"$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
"$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_${percent}_percent.pak",
2016-06-23 19:42:00 +02:00
"$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
]
# Use public_deps so that generated grit headers are discoverable from
# the libcef_static target. Grit deps that generate .cc files must be
# listed both here and in the libcef_static target.
public_deps = [
"//chrome/renderer:resources",
2016-06-23 19:42:00 +02:00
"//components/resources:components_scaled_resources",
"//content/app/resources",
"//extensions:extensions_browser_resources",
"//third_party/blink/public:scaled_resources",
2016-06-23 19:42:00 +02:00
"//ui/resources:ui_resources_grd",
]
deps = [
# This repack target generates the blink_scaled_resources_*_percent.pak
# file but doesn't expose the public_deps required by make_pack_header.
"//third_party/blink/public:scaled_resources_${percent}_percent",
]
2016-06-23 19:42:00 +02:00
if (toolkit_views) {
sources += [
"$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak"
]
public_deps += [
"//ui/views/resources:resources_grd"
]
}
output = "$root_out_dir/cef_${percent}_percent.pak"
}
}
# Generate cef_100_percent.pak.
cef_pak_scaled("100_percent") {
percent = "100"
}
# Generate cef_200_percent.pak.
cef_pak_scaled("200_percent") {
percent = "200"
}
# Generate devtools_resources.pak.
repack("pak_devtools") {
# Each input pak file should also have a deps line for completeness.
# Add associated .h files in the make_pack_header("resources") target.
2016-06-23 19:42:00 +02:00
sources = [
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
2016-06-23 19:42:00 +02:00
]
# Use public_deps so that generated grit headers are discoverable from
# the libcef_static target. Grit deps that generate .cc files must be
# listed both here and in the libcef_static target.
public_deps = [
2016-06-23 19:42:00 +02:00
"//content/browser/devtools:resources",
]
output = "$root_out_dir/devtools_resources.pak"
}
# Generate cef_extensions.pak.
repack("pak_extensions") {
# Each input pak file should also have a deps line for completeness.
# Add associated .h files in the make_pack_header("resources") target.
2016-06-23 19:42:00 +02:00
sources = [
"$root_gen_dir/chrome/component_extension_resources.pak",
"$root_gen_dir/extensions/extensions_renderer_resources.pak",
"$root_gen_dir/extensions/extensions_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
2016-06-23 19:42:00 +02:00
"$root_gen_dir/ui/resources/webui_resources.pak",
]
# Use public_deps so that generated grit headers are discoverable from
# the libcef_static target. Grit deps that generate .cc files must be
# listed both here and in the libcef_static target.
public_deps = [
"//chrome/browser/resources:component_extension_resources",
"//extensions:extensions_renderer_resources",
"//extensions:extensions_resources_grd",
"//mojo/public/js:resources",
2016-06-23 19:42:00 +02:00
"//ui/resources:webui_resources_grd",
]
output = "$root_out_dir/cef_extensions.pak"
}
grit("cef_strings") {
visibility = [ ":*" ]
source = "libcef/resources/cef_strings.grd"
outputs = [
"grit/cef_strings.h",
]
all_locales = locales + [ "fake-bidi" ]
foreach(locale, all_locales) {
outputs += [ "cef_strings_${locale}.pak" ]
}
}
# Generate locales/<locale>.pak.
# See cef_repack_locales.gni for the list of input pak files and deps.
cef_repack_locales("repack_locales_pack") {
visibility = [ ":*" ]
input_locales = locales
if (is_mac) {
output_locales = locales_as_mac_outputs
} else {
output_locales = locales
}
}
grit("cef_resources") {
visibility = [ ":*" ]
source = "libcef/resources/cef_resources.grd"
outputs = [
"grit/cef_resources.h",
"cef_resources.pak",
]
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
]
2016-06-23 19:42:00 +02:00
}
# Generate cef.pak.
repack("pak") {
# Each input pak file should also have a deps line for completeness.
# Add associated .h files in the make_pack_header("resources") target.
2016-06-23 19:42:00 +02:00
sources = [
"$root_gen_dir/chrome/browser_resources.pak",
"$root_gen_dir/chrome/net_internals_resources.pak",
"$root_gen_dir/chrome/common_resources.pak",
2016-06-23 19:42:00 +02:00
"$root_gen_dir/components/components_resources.pak",
"$root_gen_dir/cef/cef_resources.pak",
"$root_gen_dir/content/browser/tracing/tracing_resources.pak",
2016-06-23 19:42:00 +02:00
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/net/net_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
2016-06-23 19:42:00 +02:00
]
# Use public_deps so that generated grit headers are discoverable from
# the libcef_static target. Grit deps that generate .cc files must be
# listed both here and in the libcef_static target.
public_deps = [
"//chrome/browser:resources",
"//chrome/browser/resources:net_internals_resources",
"//chrome/common:resources",
2016-06-23 19:42:00 +02:00
"//components/resources:components_resources",
":cef_resources",
"//content/browser/tracing:resources",
2016-06-23 19:42:00 +02:00
"//content:resources",
"//net:net_resources",
"//third_party/blink/public:resources",
2016-06-23 19:42:00 +02:00
]
output = "$root_out_dir/cef.pak"
}
# Helper for generating pack header files.
template("make_pack_header") {
assert(defined(invoker.header))
assert(defined(invoker.inputs))
action("make_pack_header_${target_name}") {
script = "tools/make_pack_header.py"
inputs = invoker.inputs
outputs = [ invoker.header ]
args = rebase_path(outputs, root_build_dir) +
rebase_path(inputs, root_build_dir)
deps = [
# List all targets that generate pack files here. The grit targets that
# generate |inputs| will be picked up via public_deps.
":pak",
":pak_100_percent",
":pak_200_percent",
":pak_devtools",
":pak_extensions",
":repack_locales_pack",
]
}
}
# Generate cef_pack_resources.h.
make_pack_header("resources") {
header = "$root_out_dir/includes/include/cef_pack_resources.h"
inputs = [
"$root_gen_dir/cef/grit/cef_resources.h",
"$root_gen_dir/chrome/grit/browser_resources.h",
"$root_gen_dir/chrome/grit/common_resources.h",
"$root_gen_dir/chrome/grit/component_extension_resources.h",
"$root_gen_dir/chrome/grit/net_internals_resources.h",
"$root_gen_dir/chrome/grit/renderer_resources.h",
"$root_gen_dir/components/grit/components_resources.h",
"$root_gen_dir/content/browser/devtools/grit/devtools_resources.h",
"$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
"$root_gen_dir/content/grit/content_resources.h",
"$root_gen_dir/extensions/grit/extensions_browser_resources.h",
"$root_gen_dir/extensions/grit/extensions_renderer_resources.h",
"$root_gen_dir/extensions/grit/extensions_resources.h",
"$root_gen_dir/net/grit/net_resources.h",
"$root_gen_dir/third_party/blink/public/resources/grit/blink_resources.h",
"$root_gen_dir/ui/resources/grit/ui_resources.h",
"$root_gen_dir/ui/resources/grit/webui_resources.h",
"$root_gen_dir/ui/views/resources/grit/views_resources.h",
]
}
# Generate cef_pack_strings.h.
make_pack_header("strings") {
header = "$root_out_dir/includes/include/cef_pack_strings.h"
inputs = [
"$root_gen_dir/cef/grit/cef_strings.h",
"$root_gen_dir/chrome/grit/chromium_strings.h",
"$root_gen_dir/chrome/grit/generated_resources.h",
"$root_gen_dir/chrome/grit/locale_settings.h",
"$root_gen_dir/chrome/grit/platform_locale_settings.h",
"$root_gen_dir/components/strings/grit/components_strings.h",
"$root_gen_dir/content/app/strings/grit/content_strings.h",
"$root_gen_dir/extensions/strings/grit/extensions_strings.h",
"$root_gen_dir/ui/strings/grit/ui_strings.h",
]
}
# Generate pack files and associated CEF header files.
group("cef_make_headers") {
deps = [
":make_pack_header_resources",
":make_pack_header_strings",
]
}
2016-06-23 19:42:00 +02:00
#
# libcef dll/framework target.
#
if (is_mac) {
cef_framework_name = "Chromium Embedded Framework"
tweak_info_plist("cef_framework_plist") {
info_plist = "libcef/resources/framework-Info.plist"
args = [
"--breakpad=0",
2016-06-23 19:42:00 +02:00
"--keystone=0",
"--scm=1",
"--version",
cef_plist_version,
2016-06-23 19:42:00 +02:00
"--branding",
cef_framework_name,
]
}
bundle_data("cef_framework_locales") {
sources = []
foreach(locale, locales_as_mac_outputs) {
sources += [ "$root_gen_dir/repack/locales/$locale.pak" ]
}
public_deps = [
":repack_locales_pack",
]
outputs = [
"{{bundle_resources_dir}}/{{source_name_part}}.lproj/locale.pak",
]
}
bundle_data("cef_framework_resources") {
sources = [
"$root_out_dir/cef.pak",
"$root_out_dir/cef_100_percent.pak",
"$root_out_dir/cef_200_percent.pak",
"$root_out_dir/cef_extensions.pak",
"$root_out_dir/devtools_resources.pak",
]
public_deps = [
":pak",
":pak_100_percent",
":pak_200_percent",
":pak_devtools",
":pak_extensions",
]
if (icu_use_data_file) {
sources += [ "$root_out_dir/icudtl.dat" ]
public_deps += [ "//third_party/icu:icudata", ]
}
2016-06-23 19:42:00 +02:00
if (v8_use_external_startup_data) {
sources += [
"$root_out_dir/natives_blob.bin",
"$root_out_dir/snapshot_blob.bin",
]
public_deps += [ "//v8" ]
if (use_v8_context_snapshot) {
sources += [ "$root_out_dir/v8_context_snapshot.bin" ]
public_deps += [ "//tools/v8_context_snapshot" ]
}
2016-06-23 19:42:00 +02:00
}
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
}
if (use_egl) {
# Add the ANGLE .dylibs in the MODULE_DIR of the Framework app bundle.
bundle_data("cef_framework_angle_binaries") {
sources = [
"$root_out_dir/egl_intermediates/libEGL.dylib",
"$root_out_dir/egl_intermediates/libGLESv2.dylib",
]
outputs = [
"{{bundle_contents_dir}}/Libraries/{{source_file_part}}",
]
public_deps = [
"//ui/gl:angle_library_copy",
]
}
# Add the SwiftShader .dylibs in the MODULE_DIR of the Framework app bundle.
bundle_data("cef_framework_swiftshader_binaries") {
sources = [
"$root_out_dir/egl_intermediates/libswiftshader_libEGL.dylib",
"$root_out_dir/egl_intermediates/libswiftshader_libGLESv2.dylib",
]
outputs = [
"{{bundle_contents_dir}}/Libraries/{{source_file_part}}",
]
public_deps = [
"//ui/gl:swiftshader_library_copy",
]
}
}
group("cef_framework_angle_library") {
if (use_egl) {
deps = [
":cef_framework_angle_binaries",
]
}
}
group("cef_framework_swiftshader_library") {
if (use_egl) {
deps = [
":cef_framework_swiftshader_binaries",
]
}
}
2016-06-23 19:42:00 +02:00
mac_framework_bundle("cef_framework") {
output_name = cef_framework_name
framework_version = "A"
framework_contents = [
"Libraries",
"Resources",
]
2016-06-23 19:42:00 +02:00
sources = gypi_paths2.includes_common +
gypi_paths2.includes_mac +
gypi_paths.autogen_cpp_includes +
gypi_paths2.includes_capi +
gypi_paths.autogen_capi_includes +
gypi_paths2.libcef_sources_common +
gypi_paths.autogen_library_side
# TODO(rsesek): Handle these missing pieces:
# - crash_inspector
# - crash_report_sender.app
deps = [
":cef_framework_angle_library",
2016-06-23 19:42:00 +02:00
":cef_framework_locales",
":cef_framework_resources",
":cef_framework_swiftshader_library",
2016-06-23 19:42:00 +02:00
":libcef_static",
]
# We don't link the framework so just use the path from the main executable.
ldflags = [
"-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name",
"-compatibility_version",
cef_dylib_version,
"-current_version",
cef_dylib_version,
]
if (is_component_build) {
# Set up the rpath for the framework so that it can find dylibs in the
# root output directory. The framework is at
# $app_name.app/Contents/Frameworks/$output_name.framework/Versions/A/$output_name
# so use loader_path to go back to the root output directory.
ldflags += [
"-rpath",
"@loader_path/../../../../../..",
]
}
2016-06-23 19:42:00 +02:00
info_plist_target = ":cef_framework_plist"
}
} else {
shared_library("libcef") {
sources = gypi_paths2.includes_common +
gypi_paths.autogen_cpp_includes +
gypi_paths2.includes_capi +
gypi_paths.autogen_capi_includes +
gypi_paths2.libcef_sources_common +
gypi_paths.autogen_library_side
deps = [
":libcef_static",
]
if (is_win) {
sources += gypi_paths2.includes_win + [
"libcef_dll/libcef_dll.rc",
]
# This is a large module that can't do incremental linking in some cases.
configs -= [ "//build/config/win:default_incremental_linking" ]
configs +=
[ "//build/config/win:default_large_module_incremental_linking" ]
deps += [
# Bring in ui_unscaled_resources.rc which contains custom cursors.
# TODO(cef): Remove this once custom cursors can be loaded via
# ResourceBundle. See crbug.com/147663.
"//ui/resources:ui_unscaled_resources_grd",
]
}
if (is_linux && !is_debug && use_allocator=="none") {
2016-06-23 19:42:00 +02:00
# Only export necessary symbols from libcef.so.
# Don't do this in Debug builds because it causes the resulting
# application to crash.
# Also need to do this for ASAN builds to work around
# https://crbug.com/832808.
2016-06-23 19:42:00 +02:00
ldflags = [ "-Wl,--version-script=" +
rebase_path("//cef/libcef_dll/libcef.lst") ]
}
}
}
#
# Executable/app targets.
#
if (is_mac) {
# Helper for generating the CEF app bundle.
template("cef_app") {
assert(defined(invoker.helper_info_plist))
assert(defined(invoker.helper_sources))
assert(defined(invoker.info_plist))
assert(defined(invoker.sources))
app_name = target_name
app_helper_name = "$app_name Helper"
app_testonly = defined(invoker.testonly) && invoker.testonly
tweak_info_plist("${app_name}_helper_plist") {
testonly = app_testonly
info_plist = invoker.helper_info_plist
args = [
"--breakpad=0",
"--keystone=0",
"--scm=0",
"--version",
cef_plist_version,
2016-06-23 19:42:00 +02:00
]
}
mac_app_bundle("${app_name}_helper_app") {
testonly = app_testonly
output_name = app_helper_name
sources = invoker.helper_sources
deps = [
":cef_make_headers",
":cef_sandbox",
2016-06-23 19:42:00 +02:00
":libcef_dll_wrapper",
]
if (defined(invoker.helper_deps)) {
deps += invoker.helper_deps
}
ldflags = [
# The helper is in $app_name.app/Contents/Frameworks/$app_name Helper.app/Contents/MacOS/
# so set rpath up to the base.
2016-06-23 19:42:00 +02:00
"-rpath",
"@executable_path/../../../../../..",
2016-06-23 19:42:00 +02:00
]
info_plist_target = ":${app_name}_helper_plist"
if (defined(invoker.helper_defines)) {
defines = invoker.helper_defines
}
2016-06-23 19:42:00 +02:00
}
bundle_data("${app_name}_framework_bundle_data") {
testonly = app_testonly
sources = [
"$root_out_dir/$cef_framework_name.framework",
"$root_out_dir/$app_helper_name.app",
]
public_deps = [
":cef_framework",
":${app_name}_helper_app",
2016-06-23 19:42:00 +02:00
]
outputs = [
"{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
2016-06-23 19:42:00 +02:00
]
}
tweak_info_plist("${app_name}_plist") {
testonly = app_testonly
info_plist = invoker.info_plist
args = [
"--scm=1",
"--version",
cef_plist_version,
2016-06-23 19:42:00 +02:00
]
}
mac_app_bundle(app_name) {
testonly = app_testonly
output_name = app_name
sources = invoker.sources
deps = [
":libcef_dll_wrapper",
2016-06-23 19:42:00 +02:00
":${app_name}_framework_bundle_data",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
if (defined(invoker.libs)) {
libs = invoker.libs
}
if (defined(invoker.defines)) {
defines = invoker.defines
}
2016-06-23 19:42:00 +02:00
info_plist_target = ":${app_name}_plist"
}
}
#
# cefclient app targets.
#
bundle_data("cefclient_resources_bundle_data") {
sources = gypi_paths2.shared_sources_resources +
gypi_paths2.cefclient_sources_resources + [
2016-06-23 19:42:00 +02:00
"tests/cefclient/resources/mac/cefclient.icns",
]
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
}
bundle_data("cefclient_resources_bundle_data_extensions_set_page_color") {
sources = gypi_paths2.cefclient_sources_resources_extensions_set_page_color
outputs = [
"{{bundle_resources_dir}}/extensions/set_page_color/{{source_file_part}}",
]
}
2016-06-23 19:42:00 +02:00
bundle_data("cefclient_resources_bundle_data_english") {
sources = [
"tests/cefclient/resources/mac/English.lproj/InfoPlist.strings",
]
outputs = [
"{{bundle_resources_dir}}/English.lproj/{{source_file_part}}",
]
}
mac_xib_bundle_data("cefclient_xibs") {
sources = [
"tests/cefclient/resources/mac/English.lproj/MainMenu.xib",
]
output_path = "{{bundle_resources_dir}}/English.lproj"
}
cef_app("cefclient") {
helper_info_plist = "tests/cefclient/resources/mac/helper-Info.plist"
helper_sources = gypi_paths2.includes_mac +
gypi_paths2.includes_common +
gypi_paths2.includes_wrapper +
gypi_paths2.includes_wrapper_mac +
gypi_paths2.shared_sources_common +
gypi_paths2.shared_sources_renderer +
gypi_paths2.shared_sources_mac_helper +
2016-06-23 19:42:00 +02:00
gypi_paths2.cefclient_sources_common +
gypi_paths2.cefclient_sources_renderer
helper_defines = [
"CEF_USE_SANDBOX",
]
2016-06-23 19:42:00 +02:00
info_plist = "tests/cefclient/resources/mac/Info.plist"
sources = gypi_paths2.includes_mac +
gypi_paths2.includes_common +
gypi_paths2.includes_wrapper +
gypi_paths2.includes_wrapper_mac +
gypi_paths2.shared_sources_browser +
gypi_paths2.shared_sources_common +
gypi_paths2.shared_sources_mac +
2016-06-23 19:42:00 +02:00
gypi_paths2.cefclient_sources_browser +
gypi_paths2.cefclient_sources_common +
gypi_paths2.cefclient_sources_mac
deps = [
":cefclient_resources_bundle_data",
":cefclient_resources_bundle_data_extensions_set_page_color",
2016-06-23 19:42:00 +02:00
":cefclient_resources_bundle_data_english",
":cefclient_xibs",
]
libs = [
"AppKit.framework",
"OpenGL.framework",
]
defines = [
"CEF_USE_SANDBOX",
]
2016-06-23 19:42:00 +02:00
}
#
# cefsimple app targets.
#
bundle_data("cefsimple_resources_bundle_data") {
sources = [
"tests/cefsimple/mac/cefsimple.icns",
]
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
}
bundle_data("cefsimple_resources_bundle_data_english") {
sources = [
"tests/cefsimple/mac/English.lproj/InfoPlist.strings",
]
outputs = [
"{{bundle_resources_dir}}/English.lproj/{{source_file_part}}",
]
}
mac_xib_bundle_data("cefsimple_xibs") {
sources = [
"tests/cefsimple/mac/English.lproj/MainMenu.xib",
]
output_path = "{{bundle_resources_dir}}/English.lproj"
}
cef_app("cefsimple") {
helper_info_plist = "tests/cefsimple/mac/helper-Info.plist"
helper_sources = gypi_paths2.includes_mac +
gypi_paths2.includes_common +
gypi_paths2.includes_wrapper +
gypi_paths2.includes_wrapper_mac +
2016-06-23 19:42:00 +02:00
gypi_paths2.cefsimple_sources_mac_helper
helper_defines = [
"CEF_USE_SANDBOX",
]
2016-06-23 19:42:00 +02:00
info_plist = "tests/cefsimple/mac/Info.plist"
sources = gypi_paths2.includes_mac +
gypi_paths2.includes_common +
gypi_paths2.includes_wrapper +
gypi_paths2.includes_wrapper_mac +
2016-06-23 19:42:00 +02:00
gypi_paths2.cefsimple_sources_common +
gypi_paths2.cefsimple_sources_mac
deps = [
":cefsimple_resources_bundle_data",
":cefsimple_resources_bundle_data_english",
":cefsimple_xibs",
]
defines = [
"CEF_USE_SANDBOX",
]
2016-06-23 19:42:00 +02:00
}
#
# ceftests app targets.
2016-06-23 19:42:00 +02:00
#
bundle_data("ceftests_resources_bundle_data") {
sources = gypi_paths2.shared_sources_resources + [
"tests/ceftests/resources/mac/ceftests.icns",
]
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
}
bundle_data("ceftests_resources_bundle_data_english") {
sources = [
"tests/ceftests/resources/mac/English.lproj/InfoPlist.strings",
]
outputs = [
"{{bundle_resources_dir}}/English.lproj/{{source_file_part}}",
]
}
mac_xib_bundle_data("ceftests_xibs") {
sources = [
"tests/ceftests/resources/mac/English.lproj/MainMenu.xib",
]
output_path = "{{bundle_resources_dir}}/English.lproj"
}
cef_app("ceftests") {
2016-06-23 19:42:00 +02:00
testonly = true
helper_info_plist = "tests/ceftests/resources/mac/helper-Info.plist"
helper_sources = gypi_paths2.shared_sources_common +
gypi_paths2.shared_sources_renderer +
gypi_paths2.shared_sources_mac_helper +
gypi_paths2.ceftests_sources_mac_helper
helper_deps = [
"//testing/gtest",
2016-06-23 19:42:00 +02:00
]
helper_defines = [
"CEF_USE_SANDBOX",
]
2016-06-23 19:42:00 +02:00
info_plist = "tests/ceftests/resources/mac/Info.plist"
sources = gypi_paths2.includes_mac +
gypi_paths2.includes_common +
gypi_paths2.includes_wrapper +
gypi_paths2.includes_wrapper_mac +
gypi_paths2.shared_sources_browser +
gypi_paths2.shared_sources_common +
gypi_paths2.shared_sources_mac +
gypi_paths2.ceftests_sources_common +
gypi_paths2.ceftests_sources_mac
deps = [
":ceftests_resources_bundle_data",
":ceftests_resources_bundle_data_english",
":ceftests_xibs",
"//testing/gtest",
2016-06-23 19:42:00 +02:00
]
libs = [
"AppKit.framework",
]
defines = [
"CEF_USE_SANDBOX",
]
2016-06-23 19:42:00 +02:00
}
} else {
#
# cefclient targets.
#
# The cefclient target depends on packages that are not available in the
# default sysroot environment.
if (is_linux && !use_sysroot) {
pkg_config("glib") {
packages = [
"glib-2.0",
]
}
2016-06-23 19:42:00 +02:00
pkg_config("gtk") {
packages = [
"gmodule-2.0",
"gtk+-2.0",
"gthread-2.0",
"gtk+-unix-print-2.0",
"xi",
2016-06-23 19:42:00 +02:00
]
}
pkg_config("gtkglext") {
packages = [
"gtkglext-1.0",
]
}
}
if (is_linux) {
copy("copy_cefclient_files") {
sources = gypi_paths2.shared_sources_resources +
gypi_paths2.cefclient_sources_resources
outputs = [ "${root_out_dir}/cefclient_files/{{source_file_part}}" ]
2016-06-23 19:42:00 +02:00
}
copy("copy_cefclient_files_extensions_set_page_color") {
sources = gypi_paths2.cefclient_sources_resources_extensions_set_page_color
outputs = [ "${root_out_dir}/cefclient_files/extensions/set_page_color/{{source_file_part}}" ]
}
2016-06-23 19:42:00 +02:00
}
executable("cefclient") {
sources = gypi_paths2.includes_common +
gypi_paths2.includes_wrapper +
gypi_paths2.shared_sources_browser +
gypi_paths2.shared_sources_common +
gypi_paths2.shared_sources_renderer +
gypi_paths2.shared_sources_resources +
2016-06-23 19:42:00 +02:00
gypi_paths2.cefclient_sources_browser +
gypi_paths2.cefclient_sources_common +
gypi_paths2.cefclient_sources_renderer +
gypi_paths2.cefclient_sources_resources +
gypi_paths2.cefclient_sources_resources_extensions_set_page_color
2016-06-23 19:42:00 +02:00
deps = [
":libcef",
":libcef_dll_wrapper",
]
defines = [
"CEF_USE_SANDBOX",
]
2016-06-23 19:42:00 +02:00
if (is_win) {
sources += gypi_paths2.includes_win +
gypi_paths2.shared_sources_win +
2016-06-23 19:42:00 +02:00
gypi_paths2.cefclient_sources_win
# Set /SUBSYSTEM:WINDOWS.
configs -= [ "//build/config/win:console" ]
configs += [ "//build/config/win:windowed" ]
defines += [
2016-06-23 19:42:00 +02:00
"CEF_USE_ATL",
]
deps += [
":cef_sandbox",
"//build/win:default_exe_manifest",
]
libs = [
"comctl32.lib",
"d3d11.lib",
2016-06-23 19:42:00 +02:00
"glu32.lib",
"imm32.lib",
"oleacc.lib",
"opengl32.lib",
"rpcrt4.lib",
"shlwapi.lib",
2016-06-23 19:42:00 +02:00
]
}
if (is_linux) {
sources += gypi_paths2.includes_linux +
gypi_paths2.shared_sources_linux +
2016-06-23 19:42:00 +02:00
gypi_paths2.cefclient_sources_linux
deps += [
":copy_cefclient_files",
":copy_cefclient_files_extensions_set_page_color",
2016-06-23 19:42:00 +02:00
]
libs = [
"X11",
]
if (!use_sysroot) {
configs += [
":gtk",
":gtkglext",
]
}
if (is_component_build) {
if (use_allocator=="tcmalloc") {
# Link to base to initialize tcmalloc allocator shims, otherwise
# base::allocator::IsAllocatorInitialized check fails
deps += [ "//base" ]
}
} else {
2016-06-23 19:42:00 +02:00
# Set rpath to find our own libfreetype even in a non-component build.
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
}
}
#
# cefsimple targets.
#
executable("cefsimple") {
sources = gypi_paths2.includes_common +
gypi_paths2.includes_wrapper +
gypi_paths2.cefsimple_sources_common
deps = [
":libcef",
":libcef_dll_wrapper",
]
defines = [
"CEF_USE_SANDBOX",
]
2016-06-23 19:42:00 +02:00
if (is_win) {
sources += gypi_paths2.includes_win +
gypi_paths2.cefsimple_sources_win
# Set /SUBSYSTEM:WINDOWS.
configs -= [ "//build/config/win:console" ]
configs += [ "//build/config/win:windowed" ]
deps += [
":cef_sandbox",
"//build/win:default_exe_manifest",
]
libs = [
"comctl32.lib",
"shlwapi.lib",
"rpcrt4.lib",
]
}
if (is_linux) {
sources += gypi_paths2.includes_linux +
gypi_paths2.cefsimple_sources_linux
if (use_x11) {
libs = [
"X11",
]
}
2016-06-23 19:42:00 +02:00
if (!is_component_build) {
# Set rpath to find our own libfreetype even in a non-component build.
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
}
}
#
# ceftests targets.
2016-06-23 19:42:00 +02:00
#
if (is_linux) {
copy("copy_ceftests_files") {
sources = gypi_paths2.shared_sources_resources
outputs = [ "${root_out_dir}/ceftests_files/{{source_file_part}}" ]
}
}
2016-06-23 19:42:00 +02:00
executable("ceftests") {
2016-06-23 19:42:00 +02:00
testonly = true
sources = gypi_paths2.includes_common +
gypi_paths2.includes_wrapper +
gypi_paths2.shared_sources_browser +
gypi_paths2.shared_sources_common +
gypi_paths2.shared_sources_renderer +
gypi_paths2.shared_sources_resources +
gypi_paths2.ceftests_sources_common +
gypi_paths2.ceftests_sources_views
2016-06-23 19:42:00 +02:00
deps = [
2016-06-23 19:42:00 +02:00
":libcef",
":libcef_dll_wrapper",
"//testing/gtest",
2016-06-23 19:42:00 +02:00
]
defines = [
"CEF_USE_SANDBOX",
]
2016-06-23 19:42:00 +02:00
if (is_win) {
sources += gypi_paths2.shared_sources_win +
gypi_paths2.ceftests_sources_win
2016-06-23 19:42:00 +02:00
deps += [
":cef_sandbox",
"//build/win:default_exe_manifest",
]
}
if (is_linux) {
sources += gypi_paths2.shared_sources_linux +
gypi_paths2.ceftests_sources_linux
2016-06-23 19:42:00 +02:00
if (use_x11) {
libs = [
"X11",
]
} else {
if (!use_sysroot) {
configs += [ ":glib" ]
}
}
2016-06-23 19:42:00 +02:00
deps += [
":copy_ceftests_files",
2016-06-23 19:42:00 +02:00
]
}
if (is_linux && !is_component_build) {
# Set rpath to find our own libfreetype even in a non-component build.
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
}
}