1 Star 0 Fork 154

zhuleilei/chromium_cef

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD.gn 95.97 KB
一键复制 编辑 原始数据 按行查看 历史
王国亮 提交于 2023-11-04 13:22 . modify the source with comments
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591
# 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:
#
# Optionally configure GN by setting the `GN_DEFINES` and/or `GN_ARGUMENTS`
# environment variables.
#
# Example A: Create an official build on Windows:
#
# > set GN_DEFINES=is_official_build=true
#
# Example B: Generate VS2017 project files in addition to the default Ninja
# build files on Windows:
#
# > set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
#
# 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
#
# 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("//base/allocator/allocator.gni")
import("//build/config/features.gni")
import("//build/config/locales.gni")
import("//build/config/ohos/config.gni")
import("//build/config/ozone.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//chrome/common/features.gni")
import("//content/public/app/mac_helpers.gni")
import("//extensions/buildflags/buildflags.gni")
import("//media/media_options.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//printing/buildflags/buildflags.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
import("//third_party/widevine/cdm/widevine.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/repack.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")
}
if (is_linux) {
import("//build/config/linux/pkg_config.gni")
import("//third_party/fontconfig/fontconfig.gni")
}
if (is_mac) {
import("//build/apple/tweak_info_plist.gni")
import("//build/config/mac/rules.gni")
import("//build/util/version.gni")
import("//media/cdm/library_cdm/cdm_paths.gni")
# Template to compile .xib and .storyboard files.
#
# Arguments
#
# sources:
# list of string, sources to compile
#
# ibtool_flags:
# (optional) list of string, additional flags to pass to the ibtool
template("compile_ib_files") {
action_foreach(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
])
assert(defined(invoker.sources),
"sources must be specified for $target_name")
assert(defined(invoker.output_extension),
"output_extension must be specified for $target_name")
ibtool_flags = []
if (defined(invoker.ibtool_flags)) {
ibtool_flags = invoker.ibtool_flags
}
_output_extension = invoker.output_extension
script = "//cef/tools/compile_ib_files.py"
sources = invoker.sources
outputs = [
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
]
args = [
"--input",
"{{source}}",
"--output",
rebase_path(
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
root_build_dir),
]
if (!use_system_xcode) {
args += [
"--developer_dir",
hermetic_xcode_path,
]
}
args += ibtool_flags
}
}
# Template to compile and package Mac XIB files as bundle data.
#
# Arguments
#
# sources:
# list of string, sources to comiple
#
# output_path:
# (optional) string, the path to use for the outputs list in the
# bundle_data step. If unspecified, defaults to bundle_resources_dir.
template("mac_xib_bundle_data") {
_target_name = target_name
_compile_target_name = _target_name + "_compile_ibtool"
compile_ib_files(_compile_target_name) {
forward_variables_from(invoker, [ "testonly" ])
visibility = [ ":$_target_name" ]
sources = invoker.sources
output_extension = "nib"
ibtool_flags = [
"--minimum-deployment-target",
mac_deployment_target,
# TODO(rsesek): Enable this once all the bots are on Xcode 7+.
# "--target-device",
# "mac",
]
}
bundle_data(_target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
])
public_deps = [ ":$_compile_target_name" ]
sources = get_target_outputs(":$_compile_target_name")
_output_path = "{{bundle_resources_dir}}"
if (defined(invoker.output_path)) {
_output_path = invoker.output_path
}
outputs = [ "$_output_path/{{source_file_part}}" ]
}
}
}
if (is_win) {
import("//build/config/win/console_app.gni")
import("//build/config/win/manifest.gni")
}
if (is_linux) {
declare_args() {
# The cefclient target depends on GTK packages that are not available in the
# default sysroot environment. So we should only use them when we are not
# using the sysroot. Alternatively, the developer might not want to use the
# GTK dependencies at all, in which case they can set `cef_use_gtk=false`.
cef_use_gtk = !use_sysroot
}
}
#
# Verify required global arguments configured via `gn args`.
# Set by GetRequiredArgs() in //cef/tools/gn_args.py.
#
# Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1.
assert(enable_basic_printing)
assert(enable_print_preview || is_ohos)
# Enable support for Widevine CDM.
assert(enable_widevine || is_ohos)
if (is_clang) {
# Don't use the chrome style plugin.
assert(!clang_use_chrome_plugins)
}
if (is_ohos) {
import("//pdf/features.gni")
declare_args() {
ohos_enable_cef_chrome_runtime = false
}
}
#
# 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", [])
}
# 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",
[ rebase_path("cef_paths.gypi") ],
"scope",
[ "cef_paths.gypi" ])
gypi_paths2 = exec_script("//cef/tools/gypi_to_gn.py",
[ rebase_path("cef_paths2.gypi") ],
"scope",
[ "cef_paths2.gypi" ])
includes_common = gypi_paths2.includes_common + gypi_paths2.includes_common_capi
includes_mac = gypi_paths2.includes_mac + gypi_paths2.includes_mac_capi
includes_linux = gypi_paths2.includes_linux + gypi_paths2.includes_linux_capi
includes_win = gypi_paths2.includes_win + gypi_paths2.includes_win_capi
#
# Targets that will be built when depending on "//cef".
#
group("cef") {
testonly = true
deps = [
":cefsimple",
":ceftests",
":libcef_static_unittests",
]
if (!is_linux || ozone_platform_x11) {
deps += [ ":cefclient" ]
}
}
#
# 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/chrome_switches.cc",
"//chrome/common/crash_keys.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",
# Required by content_switches.cc
"//media:media_buildflags",
# Required by crash_keys.cc (from base/stl_util.h)
"//third_party/abseil-cpp:absl",
]
}
}
# libcef_static source files that have unit tests.
source_set("libcef_static_unittested") {
sources = [
"libcef/browser/devtools/devtools_util.cc",
"libcef/browser/devtools/devtools_util.h",
]
deps = [ "//base" ]
configs += [
"libcef/features:config",
"//build/config:precompiled_headers",
]
}
# Executable target for libcef_static unit tests.
test("libcef_static_unittests") {
sources = [ "libcef/browser/devtools/devtools_util_unittest.cc" ]
deps = [
":libcef_static_unittested",
"//base/test:run_all_unittests",
"//testing/gtest",
]
configs += [
"libcef/features:config",
"//build/config:precompiled_headers",
]
}
static_library("libcef_static") {
if (gpu_switch == "off") {
defines = [ "DISABLE_GPU" ]
}
sources = includes_common + gypi_paths.autogen_cpp_includes + [
"libcef/browser/alloy/alloy_browser_context.cc",
"libcef/browser/alloy/alloy_browser_context.h",
"libcef/browser/alloy/alloy_browser_host_impl.cc",
"libcef/browser/alloy/alloy_browser_host_impl.h",
"libcef/browser/alloy/alloy_browser_main.cc",
"libcef/browser/alloy/alloy_browser_main.h",
"libcef/browser/alloy/alloy_client_cert_lookup_table.cc",
"libcef/browser/alloy/alloy_client_cert_lookup_table.h",
"libcef/browser/alloy/alloy_content_browser_client.cc",
"libcef/browser/alloy/alloy_content_browser_client.h",
"libcef/browser/alloy/alloy_web_contents_view_delegate.cc",
"libcef/browser/alloy/alloy_web_contents_view_delegate.h",
"libcef/browser/alloy/alloy_dialog_util.cc",
"libcef/browser/alloy/alloy_dialog_util.h",
"libcef/browser/alloy/alloy_download_util.cc",
"libcef/browser/alloy/alloy_download_util.h",
"libcef/browser/alloy/browser_platform_delegate_alloy.cc",
"libcef/browser/alloy/browser_platform_delegate_alloy.h",
"libcef/browser/alloy/chrome_browser_process_alloy.cc",
"libcef/browser/alloy/chrome_browser_process_alloy.h",
"libcef/browser/alloy/chrome_profile_manager_alloy.cc",
"libcef/browser/alloy/chrome_profile_manager_alloy.h",
"libcef/browser/alloy/chrome_profile_alloy.cc",
"libcef/browser/alloy/chrome_profile_alloy.h",
"libcef/browser/audio_capturer.cc",
"libcef/browser/audio_capturer.h",
"libcef/browser/audio_loopback_stream_creator.cc",
"libcef/browser/audio_loopback_stream_creator.h",
"libcef/browser/browser_contents_delegate.cc",
"libcef/browser/browser_contents_delegate.h",
"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",
"libcef/browser/browser_frame.cc",
"libcef/browser/browser_frame.h",
"libcef/browser/browser_host_base.cc",
"libcef/browser/browser_host_base.h",
"libcef/browser/browser_host_create.cc",
"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_manager.cc",
"libcef/browser/browser_manager.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_util.cc",
"libcef/browser/browser_util.h",
"libcef/browser/received_slice_helper.h",
"libcef/browser/received_slice_helper.cc",
"libcef/browser/navigation_state_serializer.cc",
"libcef/browser/navigation_state_serializer.h",
"libcef/browser/chrome/browser_delegate.h",
"libcef/browser/chrome/browser_platform_delegate_chrome.cc",
"libcef/browser/chrome/browser_platform_delegate_chrome.h",
"libcef/browser/chrome/chrome_browser_context.cc",
"libcef/browser/chrome/chrome_browser_context.h",
"libcef/browser/chrome/chrome_browser_delegate.cc",
"libcef/browser/chrome/chrome_browser_delegate.h",
"libcef/browser/chrome/chrome_browser_host_impl.cc",
"libcef/browser/chrome/chrome_browser_host_impl.h",
"libcef/browser/chrome/chrome_browser_main_extra_parts_cef.cc",
"libcef/browser/chrome/chrome_browser_main_extra_parts_cef.h",
"libcef/browser/chrome/chrome_content_browser_client_cef.cc",
"libcef/browser/chrome/chrome_content_browser_client_cef.h",
"libcef/browser/chrome/chrome_context_menu_handler.cc",
"libcef/browser/chrome/chrome_context_menu_handler.h",
"libcef/browser/chrome_crash_reporter_client_stub.cc",
"libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.cc",
"libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.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_controller.cc",
"libcef/browser/devtools/devtools_controller.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.cc",
"libcef/browser/devtools/devtools_manager.h",
"libcef/browser/devtools/devtools_manager_delegate.cc",
"libcef/browser/devtools/devtools_manager_delegate.h",
"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/download_resume_util.cc",
"libcef/browser/download_resume_util.h",
"libcef/browser/extension_impl.cc",
"libcef/browser/extension_impl.h",
"libcef/browser/extensions/api/file_system/cef_file_system_delegate.cc",
"libcef/browser/extensions/api/file_system/cef_file_system_delegate.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",
"libcef/browser/extensions/alloy_extensions_util.cc",
"libcef/browser/extensions/alloy_extensions_util.h",
"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",
"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",
"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",
"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",
"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/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",
"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/icon_helper.cc",
"libcef/browser/icon_helper.h",
"libcef/browser/frame_service_base.h",
"libcef/browser/image_impl.cc",
"libcef/browser/image_impl.h",
"libcef/browser/iothread_state.cc",
"libcef/browser/iothread_state.h",
"libcef/browser/javascript_dialog_runner.h",
"libcef/browser/javascript_dialog_manager.cc",
"libcef/browser/javascript_dialog_manager.h",
"libcef/browser/main_runner.cc",
"libcef/browser/main_runner.h",
"libcef/browser/media_capture_devices_dispatcher.cc",
"libcef/browser/media_capture_devices_dispatcher.h",
"libcef/browser/media_router/media_route_impl.cc",
"libcef/browser/media_router/media_route_impl.h",
"libcef/browser/media_router/media_router_impl.cc",
"libcef/browser/media_router/media_router_impl.h",
"libcef/browser/media_router/media_router_manager.cc",
"libcef/browser/media_router/media_router_manager.h",
"libcef/browser/media_router/media_sink_impl.cc",
"libcef/browser/media_router/media_sink_impl.h",
"libcef/browser/media_router/media_source_impl.cc",
"libcef/browser/media_router/media_source_impl.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/native/cursor_util.h",
"libcef/browser/native/cursor_util.cc",
"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/crlset_file_util_impl.cc",
"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/scheme_handler.cc",
"libcef/browser/net/scheme_handler.h",
"libcef/browser/net/throttle_handler.cc",
"libcef/browser/net/throttle_handler.h",
"libcef/browser/net_database/cef_data_base_impl.cc",
"libcef/browser/net_database/cef_data_base_impl.h",
"libcef/browser/net_service/browser_urlrequest_impl.cc",
"libcef/browser/net_service/browser_urlrequest_impl.h",
"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",
"libcef/browser/net_service/login_delegate.cc",
"libcef/browser/net_service/login_delegate.h",
"libcef/browser/net_service/proxy_config_monitor.cc",
"libcef/browser/net_service/proxy_config_monitor.h",
"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/response_filter_wrapper.cc",
"libcef/browser/net_service/response_filter_wrapper.h",
"libcef/browser/net_service/restrict_cookie_manager.cc",
"libcef/browser/net_service/restrict_cookie_manager.h",
"libcef/browser/net_service/stream_reader_url_loader.cc",
"libcef/browser/net_service/stream_reader_url_loader.h",
"libcef/browser/net_service/url_loader_factory_getter.cc",
"libcef/browser/net_service/url_loader_factory_getter.h",
"libcef/browser/net_service/net_helpers.cc",
"libcef/browser/net_service/net_helpers.h",
"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/host_display_client_osr.cc",
"libcef/browser/osr/host_display_client_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",
"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/synthetic_gesture_target_osr.cc",
"libcef/browser/osr/synthetic_gesture_target_osr.h",
"libcef/browser/osr/video_consumer_osr.cc",
"libcef/browser/osr/video_consumer_osr.h",
"libcef/browser/osr/web_contents_view_osr.cc",
"libcef/browser/osr/web_contents_view_osr.h",
"libcef/browser/osr/touch_handle_drawable_osr.cc",
"libcef/browser/osr/touch_handle_drawable_osr.h",
"libcef/browser/osr/touch_selection_controller_client_osr.cc",
"libcef/browser/osr/touch_selection_controller_client_osr.h",
"libcef/browser/page_load_metrics/alloy_page_load_metrics_memory_tracker_factory.cc",
"libcef/browser/page_load_metrics/alloy_page_load_metrics_memory_tracker_factory.h",
"libcef/browser/page_load_metrics/page_load_metrics_initialize.cc",
"libcef/browser/page_load_metrics/page_load_metrics_initialize.h",
"libcef/browser/page_load_metrics/oh_page_load_metrics_observer.h",
"libcef/browser/page_load_metrics/oh_page_load_metrics_observer.cc",
"libcef/browser/path_util_impl.cc",
"libcef/browser/permission/alloy_access_request.cc",
"libcef/browser/permission/alloy_access_request.h",
"libcef/browser/permission/alloy_geolocation_access.cc",
"libcef/browser/permission/alloy_geolocation_access.h",
"libcef/browser/permission/alloy_permission_manager.cc",
"libcef/browser/permission/alloy_permission_manager.h",
"libcef/browser/permission/alloy_permission_request_handler.cc",
"libcef/browser/permission/alloy_permission_request_handler.h",
"libcef/browser/predictors/loading_predictor.cc",
"libcef/browser/predictors/loading_predictor.h",
"libcef/browser/predictors/loading_predictor_config.cc",
"libcef/browser/predictors/loading_predictor_config.h",
"libcef/browser/predictors/loading_predictor_factory.cc",
"libcef/browser/predictors/loading_predictor_factory.h",
"libcef/browser/predictors/loading_predictor_tab_helper.cc",
"libcef/browser/predictors/loading_predictor_tab_helper.h",
"libcef/browser/predictors/navigation_id.cc",
"libcef/browser/predictors/navigation_id.h",
"libcef/browser/predictors/preconnect_manager.cc",
"libcef/browser/predictors/preconnect_manager.h",
"libcef/browser/predictors/proxy_lookup_client_impl.cc",
"libcef/browser/predictors/proxy_lookup_client_impl.h",
"libcef/browser/predictors/resolve_host_client_impl.cc",
"libcef/browser/predictors/resolve_host_client_impl.h",
"libcef/browser/predictors/resource_prefetch_predictor.cc",
"libcef/browser/predictors/resource_prefetch_predictor.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",
"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/constrained_window_views_client.cc",
"libcef/browser/printing/constrained_window_views_client.h",
"libcef/browser/printing/ohos_print_manager.cc",
"libcef/browser/printing/ohos_print_manager.h",
"libcef/browser/printing/print_view_manager.cc",
"libcef/browser/printing/print_view_manager.h",
"libcef/browser/process_util_impl.cc",
"libcef/browser/request_context_handler_map.cc",
"libcef/browser/request_context_handler_map.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",
"libcef/browser/simple_menu_model_impl.cc",
"libcef/browser/simple_menu_model_impl.h",
"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",
"libcef/browser/storage/web_storage_impl.cc",
"libcef/browser/storage/web_storage_impl.h",
"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_contents_dialog_helper.cc",
"libcef/browser/web_contents_dialog_helper.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",
"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/alloy/alloy_content_client.cc",
"libcef/common/alloy/alloy_content_client.h",
"libcef/common/alloy/alloy_main_delegate.cc",
"libcef/common/alloy/alloy_main_delegate.h",
"libcef/common/alloy/alloy_main_runner_delegate.cc",
"libcef/common/alloy/alloy_main_runner_delegate.h",
"libcef/common/app_manager.cc",
"libcef/common/app_manager.h",
"libcef/common/base_impl.cc",
"libcef/common/cef_switches.cc",
"libcef/common/cef_switches.h",
"libcef/common/chrome/chrome_content_client_cef.cc",
"libcef/common/chrome/chrome_content_client_cef.h",
"libcef/common/chrome/chrome_main_delegate_cef.cc",
"libcef/common/chrome/chrome_main_delegate_cef.h",
"libcef/common/chrome/chrome_main_runner_delegate.cc",
"libcef/common/chrome/chrome_main_runner_delegate.h",
"libcef/common/command_line_impl.cc",
"libcef/common/command_line_impl.h",
"libcef/common/crash_reporter_client.cc",
"libcef/common/crash_reporter_client.h",
"libcef/common/crash_reporting.cc",
"libcef/common/crash_reporting.h",
"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",
"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",
"libcef/common/frame_util.cc",
"libcef/common/frame_util.h",
"libcef/common/i18n_util_impl.cc",
"libcef/common/json_impl.cc",
"libcef/common/main_runner_delegate.h",
"libcef/common/main_runner_handler.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/url_util.cc",
"libcef/common/net/url_util.h",
"libcef/common/net_service/net_service_util.cc",
"libcef/common/net_service/net_service_util.h",
"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_delegate.cc",
"libcef/common/resource_bundle_delegate.h",
"libcef/common/resource_bundle_impl.cc",
"libcef/common/resource_bundle_impl.h",
"libcef/common/resource_util.cc",
"libcef/common/resource_util.h",
"libcef/common/response_impl.cc",
"libcef/common/response_impl.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/string_util.cc",
"libcef/common/string_util.h",
"libcef/common/task_impl.cc",
"libcef/common/task_runner_impl.cc",
"libcef/common/task_runner_impl.h",
"libcef/common/task_runner_manager.cc",
"libcef/common/task_runner_manager.h",
"libcef/common/test/translator_test_impl.cc",
"libcef/common/thread_impl.cc",
"libcef/common/thread_impl.h",
"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/features/runtime.h",
"libcef/features/runtime_checks.h",
"libcef/renderer/alloy/alloy_content_renderer_client.cc",
"libcef/renderer/alloy/alloy_content_renderer_client.h",
"libcef/renderer/alloy/alloy_content_settings_client.cc",
"libcef/renderer/alloy/alloy_content_settings_client.h",
"libcef/renderer/alloy/alloy_render_thread_observer.cc",
"libcef/renderer/alloy/alloy_render_thread_observer.h",
"libcef/renderer/alloy/url_loader_throttle_provider_impl.cc",
"libcef/renderer/alloy/url_loader_throttle_provider_impl.h",
"libcef/renderer/browser_impl.cc",
"libcef/renderer/browser_impl.h",
"libcef/renderer/chrome/chrome_content_renderer_client_cef.cc",
"libcef/renderer/chrome/chrome_content_renderer_client_cef.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/ohos_print_render_frame_helper_delegate.cc",
"libcef/renderer/extensions/ohos_print_render_frame_helper_delegate.h",
"libcef/renderer/extensions/print_render_frame_helper_delegate.cc",
"libcef/renderer/extensions/print_render_frame_helper_delegate.h",
"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",
"libcef/renderer/render_manager.cc",
"libcef/renderer/render_manager.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",
# For Chrome runtime support.
"//chrome/app/chrome_main_delegate.cc",
"//chrome/app/chrome_main_delegate.h",
# For Javascript
"libcef/browser/javascript/oh_javascript_injector.h",
"libcef/browser/javascript/oh_javascript_injector.cc",
"libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.h",
"libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.cc",
"libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.h",
"libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.cc",
"libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.h",
"libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.cc",
"libcef/common/javascript/oh_gin_javascript_bridge_messages.h",
"libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h",
"libcef/common/javascript/oh_gin_javascript_bridge_message_generator.cc",
"libcef/common/javascript/oh_gin_javascript_bridge_errors.h",
"libcef/common/javascript/oh_gin_javascript_bridge_errors.cc",
"libcef/common/javascript/oh_gin_javascript_bridge_value.h",
"libcef/common/javascript/oh_gin_javascript_bridge_value.cc",
"libcef/common/soc_perf_util.h",
"libcef/common/soc_perf_util.cc",
"libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.h",
"libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.cc",
"libcef/renderer/javascript/oh_gin_javascript_bridge_object.h",
"libcef/renderer/javascript/oh_gin_javascript_bridge_object.cc",
"libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.h",
"libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.cc",
"libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.h",
"libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.cc",
]
if (is_ohos) {
sources += [
"libcef/browser/password/oh_password_manager_client.h",
"libcef/browser/password/oh_password_manager_client.cc",
"libcef/browser/password/oh_password_store_factory.h",
"libcef/browser/password/oh_password_store_factory.cc",
"libcef/browser/password/oh_sync_start_util.h",
"libcef/browser/password/oh_sync_start_util.cc",
"libcef/browser/autofill/oh_autofill_client.cc",
"libcef/browser/autofill/oh_autofill_client.h",
"libcef/browser/autofill/oh_autofill_provider.cc",
"libcef/browser/autofill/oh_autofill_provider.h",
"libcef/browser/autofill/oh_autofill_manager.cc",
"libcef/browser/autofill/oh_autofill_manager.h",
]
}
configs += [
"libcef/features:config",
"//build/config:precompiled_headers",
]
public_configs = [ "libcef/features:config" ]
include_dirs = [
# Crashpad code uses paths relative to this directory.
"//third_party/crashpad/crashpad",
]
if (defined(ohos_enable_cef_chrome_runtime) &&
!ohos_enable_cef_chrome_runtime) {
sources -= [
"//chrome/app/chrome_main_delegate.cc",
"//chrome/app/chrome_main_delegate.h",
"libcef/browser/chrome/browser_delegate.h",
"libcef/browser/chrome/browser_platform_delegate_chrome.cc",
"libcef/browser/chrome/browser_platform_delegate_chrome.h",
"libcef/browser/chrome/chrome_browser_context.cc",
"libcef/browser/chrome/chrome_browser_context.h",
"libcef/browser/chrome/chrome_browser_delegate.cc",
"libcef/browser/chrome/chrome_browser_delegate.h",
"libcef/browser/chrome/chrome_browser_host_impl.cc",
"libcef/browser/chrome/chrome_browser_host_impl.h",
"libcef/browser/chrome/chrome_browser_main_extra_parts_cef.cc",
"libcef/browser/chrome/chrome_browser_main_extra_parts_cef.h",
"libcef/browser/chrome/chrome_content_browser_client_cef.cc",
"libcef/browser/chrome/chrome_content_browser_client_cef.h",
"libcef/browser/chrome/chrome_context_menu_handler.cc",
"libcef/browser/chrome/chrome_context_menu_handler.h",
"libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.cc",
"libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.h",
"libcef/browser/chrome_crash_reporter_client_stub.cc",
"libcef/browser/net/chrome_scheme_handler.cc",
"libcef/browser/net/chrome_scheme_handler.h",
"libcef/common/chrome/chrome_content_client_cef.cc",
"libcef/common/chrome/chrome_content_client_cef.h",
"libcef/common/chrome/chrome_main_delegate_cef.cc",
"libcef/common/chrome/chrome_main_delegate_cef.h",
"libcef/common/chrome/chrome_main_runner_delegate.cc",
"libcef/common/chrome/chrome_main_runner_delegate.h",
"libcef/renderer/chrome/chrome_content_renderer_client_cef.cc",
"libcef/renderer/chrome/chrome_content_renderer_client_cef.h",
]
}
if (is_ohos) {
sources += [
"libcef/browser/predictors/predictor_database.cc",
"libcef/browser/predictors/predictor_database.h",
]
}
if (is_ohos && !enable_print_preview) {
sources -= [
"libcef/browser/printing/constrained_window_views_client.cc",
"libcef/browser/printing/constrained_window_views_client.h",
"libcef/browser/printing/print_view_manager.cc",
"libcef/browser/printing/print_view_manager.h",
]
}
if (is_ohos && !enable_plugins) {
sources -= [
"libcef/browser/web_plugin_impl.cc",
"libcef/browser/web_plugin_impl.h",
]
}
if (is_ohos && !ohos_enable_media_router) {
sources -= [
"libcef/browser/media_router/media_route_impl.cc",
"libcef/browser/media_router/media_route_impl.h",
"libcef/browser/media_router/media_router_impl.cc",
"libcef/browser/media_router/media_router_impl.h",
"libcef/browser/media_router/media_router_manager.cc",
"libcef/browser/media_router/media_router_manager.h",
"libcef/browser/media_router/media_sink_impl.cc",
"libcef/browser/media_router/media_sink_impl.h",
"libcef/browser/media_router/media_source_impl.cc",
"libcef/browser/media_router/media_source_impl.h",
]
}
public_deps = [
# Bring in feature flag defines.
"//cef/libcef/features",
]
deps = [
":cef_make_headers",
":libcef_static_unittested",
"libcef/common/mojom",
# 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",
# Normal build dependencies. Should be sorted alphabetically.
"//base",
"//base:base_static",
"//base/third_party/dynamic_annotations",
"//cc",
"//chrome:browser_dependencies",
"//chrome:child_dependencies",
"//chrome:packed_resources",
"//chrome:resources",
"//chrome:strings",
"//chrome/common:buildflags",
"//chrome/services/printing:lib",
"//components/cdm/renderer",
"//components/certificate_transparency",
"//components/component_updater",
"//components/content_settings/core/browser",
"//components/content_settings/core/common",
"//components/crx_file",
"//components/data_use_measurement/core",
"//components/google/core/common",
"//components/keyed_service/content:content",
"//components/keyed_service/core:core",
"//components/media_router/common/mojom:media_router",
"//components/navigation_interception",
"//components/network_session_configurator/common",
"//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/services/print_compositor/public/cpp",
"//components/services/print_compositor/public/mojom",
"//components/update_client",
"//components/url_formatter",
"//components/user_prefs",
"//components/version_info",
"//components/visitedlink/browser",
"//components/visitedlink/common",
"//components/visitedlink/renderer",
"//components/viz/service",
"//components/web_cache/renderer",
"//content/public/app",
"//content/public/browser",
"//content/public/child",
"//content/public/common",
"//content/public/gpu",
"//content/public/renderer",
"//content/public/utility",
"//crypto",
"//device/base",
"//extensions/browser",
"//extensions/browser:core_api_provider",
"//extensions/buildflags",
"//extensions/common:core_api_provider",
"//extensions/common/api",
"//extensions/renderer",
"//gpu",
"//ipc",
"//media",
"//net",
"//pdf",
"//ppapi/buildflags",
"//printing/buildflags",
"//services/network:network_service",
"//services/network/public/cpp",
"//services/service_manager/public/cpp",
"//skia",
"//storage/browser",
"//third_party/blink/public:blink",
"//third_party/brotli:dec",
"//third_party/cld_3/src/src:cld_3",
"//third_party/hunspell",
"//third_party/icu",
"//third_party/leveldatabase",
"//third_party/libxml:libxml",
"//third_party/pdfium",
"//third_party/widevine/cdm",
"//third_party/widevine/cdm:headers",
"//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",
]
deps += [ "//components/no_state_prefetch/renderer" ]
if (is_ohos) {
deps += [
"//components/js_injection/browser",
"//components/js_injection/renderer",
"//components/password_manager/content/browser",
"//components/ukm/content:content",
]
}
if (defined(ohos_enable_cef_chrome_runtime) &&
!ohos_enable_cef_chrome_runtime) {
deps -= [
"//chrome:packed_resources",
"//chrome:resources",
"//chrome:strings",
"//chrome/services/printing:lib",
]
}
if (is_ohos && !enable_print_preview) {
deps -= [
"//components/printing/browser",
"//components/printing/common",
"//components/printing/renderer",
"//components/services/print_compositor/public/cpp",
"//components/services/print_compositor/public/mojom",
]
}
if (is_ohos && !enable_plugins) {
deps -= [ "//components/plugins/renderer" ]
}
if (is_ohos && !enable_pdf) {
deps -= [
"//components/pdf/browser",
"//components/pdf/renderer",
"//pdf",
]
}
if (is_ohos && !ohos_enable_media_router) {
deps -= [ "//components/media_router/common/mojom:media_router" ]
}
if (defined(ohos_nweb_ex) && ohos_nweb_ex) {
deps += [ "//ohos_nweb_ex/overrides/cef" ]
}
if (is_ohos) {
deps += [ "//components/network_hints/browser" ]
}
if (safe_browsing_mode != 0) {
deps += [ "//components/safe_browsing/core/db:test_database_manager" ]
}
if (is_win) {
sources +=
includes_win + [
"libcef/browser/alloy/alloy_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/cursor_util_win.cc",
"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",
]
deps += [
"//chrome/chrome_elf",
"//chrome/install_static:secondary_module",
]
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" ]
}
if (is_ohos) {
sources +=
includes_linux + [
"libcef/browser/native/browser_platform_delegate_native_linux.cc",
"libcef/browser/native/browser_platform_delegate_native_linux.h",
"libcef/browser/native/cursor_util_linux.cc",
"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",
]
}
if (is_linux) {
sources +=
includes_linux + [
"libcef/browser/native/browser_platform_delegate_native_linux.cc",
"libcef/browser/native/browser_platform_delegate_native_linux.h",
"libcef/browser/native/cursor_util_linux.cc",
"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/printing/print_dialog_linux.cc",
"libcef/browser/printing/print_dialog_linux.h",
]
if (ozone_platform_x11) {
sources += [
"libcef/browser/native/window_x11.cc",
"libcef/browser/native/window_x11.h",
]
}
deps += [
"//build/config/freetype",
"//third_party/fontconfig",
]
if (is_linux && !ozone_platform_x11) {
deps += [ "//third_party/angle:libEGL" ]
}
}
if (is_mac) {
sources +=
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/common/util_mac.h",
"libcef/common/util_mac.mm",
# For Chrome runtime support.
"//chrome/app/chrome_main_mac.h",
"//chrome/app/chrome_main_mac.mm",
]
}
if (is_win || is_mac) {
deps += [ "//third_party/crashpad/crashpad/handler" ]
}
if (ozone_platform_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",
]
deps += [
"//components/crash/content/browser",
"//components/crash/core/app",
]
}
if (v8_use_external_startup_data && use_v8_context_snapshot) {
deps += [ "//tools/v8_context_snapshot" ]
}
if (toolkit_views) {
sources += [
"libcef/browser/chrome/views/browser_platform_delegate_chrome_views.cc",
"libcef/browser/chrome/views/browser_platform_delegate_chrome_views.h",
"libcef/browser/chrome/views/chrome_browser_frame.cc",
"libcef/browser/chrome/views/chrome_browser_frame.h",
"libcef/browser/chrome/views/chrome_browser_view.cc",
"libcef/browser/chrome/views/chrome_browser_view.h",
"libcef/browser/chrome/views/chrome_views_util.cc",
"libcef/browser/chrome/views/chrome_views_util.h",
"libcef/browser/chrome/views/toolbar_view_impl.cc",
"libcef/browser/chrome/views/toolbar_view_impl.h",
"libcef/browser/chrome/views/toolbar_view_view.cc",
"libcef/browser/chrome/views/toolbar_view_view.h",
"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_adapter.cc",
"libcef/browser/views/layout_adapter.h",
"libcef/browser/views/layout_impl.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/overlay_view_host.cc",
"libcef/browser/views/overlay_view_host.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.
"//ui/views/test/desktop_test_views_delegate.h",
"//ui/views/test/test_views_delegate.h",
# Support for UI input events.
# Part of //ui/base:test_support which is testingonly.
"//ui/base/test/ui_controls.h",
]
deps += [
"//ui/events",
"//ui/strings",
"//ui/views",
"//ui/views/controls/webview",
]
if (use_aura) {
sources += [
"libcef/browser/native/browser_platform_delegate_native_aura.cc",
"libcef/browser/native/browser_platform_delegate_native_aura.h",
"libcef/browser/views/view_util_aura.cc",
# Part of //ui/views:test_support which is testingonly.
"//ui/views/test/desktop_test_views_delegate_aura.cc",
"//ui/views/test/test_views_delegate_aura.cc",
# Support for UI input events.
# Part of //ui/base:test_support which is testingonly.
"//ui/aura/test/ui_controls_factory_aura.h",
"//ui/base/test/ui_controls_aura.cc",
]
deps += [
"//ui/aura",
"//ui/wm",
"//ui/wm/public",
]
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.
"//ui/aura/test/ui_controls_factory_aurawin.cc",
# Part of //ui/base:test_support which is testingonly.
"//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.
"$root_gen_dir/ui/ozone/test_constructor_list.cc",
"//ui/aura/test/aura_test_utils.cc",
"//ui/aura/test/aura_test_utils.h",
# Part of //ui/events:test_support which is testingonly.
"//ui/events/test/x11_event_waiter.cc",
"//ui/events/test/x11_event_waiter.h",
# Part of //ui/ozone::ui_test_support which is testingonly.
"//ui/ozone/common/test/stub_ozone_ui_controls_test_helper.cc",
"//ui/ozone/common/test/stub_ozone_ui_controls_test_helper.h",
"//ui/ozone/public/ozone_ui_controls_test_helper.cc",
"//ui/ozone/public/ozone_ui_controls_test_helper.h",
# Part of //ui/views:test_support which is testingonly.
"//ui/views/test/test_desktop_screen_ozone.cc",
"//ui/views/test/test_desktop_screen_ozone.h",
"//ui/views/test/ui_controls_factory_desktop_aura_ozone.cc",
"//ui/views/test/ui_controls_factory_desktop_aura_ozone.h",
]
deps += [ "//ui/ozone:generate_test_support_constructor_list" ]
if (ozone_platform_x11) {
sources += [
# Part of //ui/aura:test_support which is testingonly.
# Support for UI input events.
# Part of //ui/base/x:test_support which is testingonly.
"//ui/aura/test/x11_event_sender.h",
"//ui/base/x/test/x11_ui_controls_test_helper.cc",
"//ui/base/x/test/x11_ui_controls_test_helper.h",
# Part of //ui/ozone/platform/x11:test_support which is testingonly.
"//ui/ozone/platform/x11/x11_ozone_ui_controls_test_helper.cc",
"//ui/ozone/platform/x11/x11_ozone_ui_controls_test_helper.h",
]
} else {
sources += [
# Support for UI input events.
# Part of //ui/base:test_support which is testingonly.
"//ui/aura/test/ui_controls_factory_ozone.cc",
# Part of //ui//events:test_support which is testingonly.
"//ui/events/test/events_test_utils.cc",
]
}
}
if (is_ohos) {
sources += [
# Support for UI input events.
# Part of //ui/aura:test_support which is testingonly.
"//ui/aura/test/aura_test_utils.cc",
"//ui/aura/test/aura_test_utils.h",
# Part of //ui/events:test_support which is testingonly.
# "//ui/events/test/x11_event_waiter.cc",
# "//ui/events/test/x11_event_waiter.h",
]
}
}
if (is_mac) {
sources += [
"libcef/browser/views/view_util_mac.mm",
# Part of //ui/views:test_support which is testingonly.
"//ui/views/test/desktop_test_views_delegate_mac.mm",
"//ui/views/test/test_views_delegate_mac.mm",
# Support for UI input events.
# Part of //ui/base:test_support which is testingonly.
"//ui/base/test/ui_controls_mac.mm",
# Part of //ui//events:test_support which is testingonly.
"//ui/events/test/cocoa_test_event_utils.mm",
]
}
} else {
sources += [
# Provides stub implementations for the views static methods.
"libcef_dll/views_stub.cc",
]
}
if (is_ohos) {
sources += [
"libcef/browser/chrome/views/chrome_views_util.cc",
"libcef/browser/chrome/views/chrome_views_util.h",
"libcef/browser/views/view_util.cc",
"libcef/browser/views/view_util.h",
]
if (use_aura) {
sources += [
"libcef/browser/native/browser_platform_delegate_native_aura.cc",
"libcef/browser/native/browser_platform_delegate_native_aura.h",
"libcef/browser/views/view_util_aura.cc",
# Part of //ui/views:test_support which is testingonly.
"//ui/views/test/desktop_test_views_delegate_aura.cc",
"//ui/views/test/test_views_delegate_aura.cc",
# Support for UI input events.
# Part of //ui/base:test_support which is testingonly.
"//ui/aura/test/ui_controls_factory_aura.h",
"//ui/base/test/ui_controls_aura.cc",
]
deps += [
"//ui/aura",
"//ui/wm",
"//ui/wm/public",
]
if (is_ohos) {
sources += [
# Support for UI input events.
# Part of //ui/aura:test_support which is testingonly.
"//ui/aura/test/aura_test_utils.cc",
"//ui/aura/test/aura_test_utils.h",
# Part of //ui/events:test_support which is testingonly.
# "//ui/events/test/x11_event_waiter.cc",
# "//ui/events/test/x11_event_waiter.h",
]
deps += [
"//ui/events",
"//ui/strings",
"//ui/views",
"//ui/views/controls/webview",
]
}
}
}
}
#
# libcef_dll_wrapper static targets.
#
# Configuration that will be applied to all targets that build autogen files.
config("libcef_autogen_config") {
if (is_clang) {
cflags = [
# Disable clang warnings related to CEF's translation layer templates.
"-Wno-undefined-var-template",
]
}
}
# Configuration that will be applied to all targets that depend on
# libcef_dll_wrapper.
config("libcef_dll_wrapper_config") {
include_dirs = [
# CEF sources use include paths relative to the CEF root directory.
".",
# 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",
]
configs = [ ":libcef_autogen_config" ]
}
# libcef_dll_wrapper target.
static_library("libcef_dll_wrapper") {
configs += [ "//build/config/sanitizers:cfi_config" ]
sources = 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" ]
public_configs = [ ":libcef_dll_wrapper_config" ]
deps = [
":cef_make_headers",
"//base",
]
}
#
# 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.
include_dirs = [ "." ]
deps = [
"libcef/features",
"//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 = [
"//build/config:executable_deps",
"//sandbox/mac:seatbelt",
]
}
}
#
# Resource grit/pack targets.
#
# Included in locales/*.pak via //chrome/chrome_repack_locales.gni.
grit("cef_strings") {
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" ]
}
}
# Included in resources.pak via //chrome/chrome_paks.gni.
grit("cef_resources") {
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),
]
}
# Helper for generating pack header files.
template("make_pack_header") {
assert(defined(invoker.header))
assert(defined(invoker.inputs))
assert(defined(invoker.deps))
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 = invoker.deps
}
}
# Generate cef_pack_resources.h.
make_pack_header("resources") {
header = "$root_out_dir/includes/include/cef_pack_resources.h"
inputs = [
"$root_gen_dir/base/tracing/protos/grit/tracing_proto_resources.h",
"$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/dev_ui_browser_resources.h",
"$root_gen_dir/chrome/grit/pdf_resources.h",
"$root_gen_dir/chrome/grit/renderer_resources.h",
"$root_gen_dir/components/grit/components_resources.h",
"$root_gen_dir/components/grit/dev_ui_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/browser/webrtc/resources/grit/webrtc_internals_resources.h",
"$root_gen_dir/content/grit/content_resources.h",
"$root_gen_dir/content/grit/dev_ui_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/mojo/public/js/grit/mojo_bindings_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_generated_resources.h",
"$root_gen_dir/ui/resources/grit/webui_resources.h",
]
deps = [
":cef_resources",
"//base/tracing/protos:chrome_track_event_resources",
"//chrome/browser:dev_ui_browser_resources",
"//chrome/browser:resources",
"//chrome/browser/resources:component_extension_resources",
"//chrome/browser/resources/pdf:resources",
"//chrome/common:resources",
"//chrome/renderer:resources",
"//components/resources:components_resources",
"//components/resources:dev_ui_components_resources",
"//content:content_resources",
"//content:dev_ui_content_resources",
"//content/browser/devtools:devtools_resources",
"//content/browser/tracing:resources",
"//content/browser/webrtc/resources",
"//extensions:extensions_browser_resources",
"//extensions:extensions_renderer_resources",
"//extensions:extensions_resources_grd",
"//mojo/public/js:resources",
"//net:net_resources",
"//third_party/blink/public:resources",
"//ui/resources:ui_resources_grd",
"//ui/resources:webui_generated_resources_grd",
"//ui/resources:webui_resources_grd",
]
if (defined(ohos_enable_cef_chrome_runtime) &&
!ohos_enable_cef_chrome_runtime) {
inputs -= [
"$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/dev_ui_browser_resources.h",
"$root_gen_dir/chrome/grit/pdf_resources.h",
"$root_gen_dir/chrome/grit/renderer_resources.h",
]
deps -= [
"//chrome/browser:dev_ui_browser_resources",
"//chrome/browser:resources",
"//chrome/browser/resources:component_extension_resources",
"//chrome/browser/resources/pdf:resources",
"//chrome/common:resources",
"//chrome/renderer:resources",
]
}
if (toolkit_views) {
inputs += [ "$root_gen_dir/ui/views/resources/grit/views_resources.h" ]
deps += [ "//ui/views/resources:resources_grd" ]
}
}
# 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/omnibox/resources/grit/omnibox_resources.h",
"$root_gen_dir/components/strings/grit/components_chromium_strings.h",
"$root_gen_dir/components/strings/grit/components_strings.h",
"$root_gen_dir/extensions/strings/grit/extensions_strings.h",
"$root_gen_dir/services/strings/grit/services_strings.h",
"$root_gen_dir/third_party/blink/public/strings/grit/blink_accessibility_strings.h",
"$root_gen_dir/third_party/blink/public/strings/grit/blink_strings.h",
"$root_gen_dir/ui/strings/grit/ui_strings.h",
]
deps = [
":cef_strings",
"//chrome/app:chromium_strings",
"//chrome/app:generated_resources",
"//chrome/app/resources:locale_settings",
"//chrome/app/resources:platform_locale_settings",
"//components/omnibox/resources:omnibox_resources",
"//components/strings:components_chromium_strings",
"//components/strings:components_locale_settings",
"//components/strings:components_strings",
"//extensions/strings",
"//services/strings",
"//third_party/blink/public/strings",
"//third_party/blink/public/strings:accessibility_strings",
"//ui/strings:app_locale_settings",
"//ui/strings:ui_strings",
]
if (defined(ohos_enable_cef_chrome_runtime) &&
!ohos_enable_cef_chrome_runtime) {
inputs -= [
"$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",
]
deps -= [
"//chrome/app:chromium_strings",
"//chrome/app:generated_resources",
"//chrome/app/resources:locale_settings",
"//chrome/app/resources:platform_locale_settings",
]
}
}
# Generate cef_api_hash.h.
action("make_api_hash_header") {
script = "tools/make_api_hash_header.py"
# List of all C API files that will be checked for changes by cef_api_hash.py.
inputs = gypi_paths2.includes_common_capi + gypi_paths2.includes_linux_capi +
gypi_paths2.includes_mac_capi + gypi_paths2.includes_win_capi +
gypi_paths2.includes_capi + gypi_paths.autogen_capi_includes
include_dir = [ "include" ]
outputs = [ "$root_out_dir/includes/include/cef_api_hash.h" ]
args = rebase_path(outputs + include_dir, root_build_dir)
}
# Generate cef_config.h.
action("make_config_header") {
script = "tools/make_config_header.py"
outputs = [ "$root_out_dir/includes/include/cef_config.h" ]
args = rebase_path(outputs + [ "$root_out_dir/args.gn" ], root_build_dir)
}
# Generate pack files and associated CEF header files.
group("cef_make_headers") {
deps = [
":make_api_hash_header",
":make_config_header",
":make_pack_header_resources",
":make_pack_header_strings",
]
}
#
# 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",
"--keystone=0",
"--scm=1",
"--version",
cef_plist_version,
"--branding",
cef_framework_name,
]
}
bundle_data("cef_framework_resources") {
sources = []
public_deps = []
if (icu_use_data_file) {
sources += [ "$root_out_dir/icudtl.dat" ]
public_deps += [ "//third_party/icu:icudata" ]
}
if (v8_use_external_startup_data) {
sources += [ "$root_out_dir/snapshot_blob.bin" ]
public_deps += [ "//v8" ]
if (use_v8_context_snapshot) {
sources += [ "$root_out_dir/$v8_context_snapshot_filename" ]
public_deps += [ "//tools/v8_context_snapshot" ]
}
}
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",
"$root_out_dir/vk_intermediates/libvk_swiftshader.dylib",
"$root_out_dir/vk_intermediates/vk_swiftshader_icd.json",
]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
public_deps = [
"//ui/gl:swiftshader_egl_library_copy",
"//ui/gl:swiftshader_vk_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" ]
}
}
mac_framework_bundle("cef_framework") {
output_name = cef_framework_name
framework_version = "A"
framework_contents = [
"Libraries",
"Resources",
]
sources =
includes_common + 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
deps = [
":cef_framework_angle_library",
":cef_framework_resources",
":cef_framework_swiftshader_library",
":libcef_static",
]
configs += [ ":libcef_autogen_config" ]
# 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/../../../../../..",
]
}
info_plist_target = ":cef_framework_plist"
}
} else {
shared_library("libweb_engine") {
configs += [ "//build/config/sanitizers:cfi_config" ]
sources =
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" ]
configs += [ ":libcef_autogen_config" ]
if (is_win) {
sources += includes_win + [ "libcef_dll/libcef_dll.rc" ]
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") {
# 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.
ldflags = [ "-Wl,--version-script=" +
rebase_path("//cef/libcef_dll/libcef.lst") ]
}
if (is_ohos) {
deps += [ "//ohos_nweb:nweb_sources" ]
if (defined(ohos_nweb_ex) && ohos_nweb_ex) {
deps += [ "//ohos_nweb_ex:nweb_ex" ]
}
configs += [ "//build/config/ohos:lld_pack_relocations" ]
if (!(defined(testonly) && testonly)) {
configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
configs += [ "//build/config/compiler:thinlto_optimize_max" ]
}
}
}
}
#
# Executable/app targets.
#
# Source files for TeamCity GTest integration.
# See tests/gtest/teamcity/README.cef for details.
source_set("gtest_teamcity") {
testonly = true
sources = [
"tests/gtest/teamcity/include/teamcity_gtest.h",
"tests/gtest/teamcity/src/teamcity_gtest.cpp",
"tests/gtest/teamcity/src/teamcity_gtest.h",
"tests/gtest/teamcity/src/teamcity_messages.cpp",
"tests/gtest/teamcity/src/teamcity_messages.h",
]
deps = [ "//testing/gtest" ]
configs += [
"libcef/features:config",
"//build/config:precompiled_headers",
]
}
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,
]
}
template("cef_helper_app") {
mac_app_bundle(target_name) {
assert(defined(invoker.helper_sources))
assert(defined(invoker.helper_name_suffix))
assert(defined(invoker.helper_bundle_id_suffix))
testonly = app_testonly
output_name = app_helper_name + invoker.helper_name_suffix
sources = invoker.helper_sources
extra_substitutions =
[ "BUNDLE_ID_SUFFIX=${invoker.helper_bundle_id_suffix}" ]
deps = [
":cef_make_headers",
":cef_sandbox",
":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.
"-rpath",
"@executable_path/../../../../../..",
]
info_plist_target = ":${app_name}_helper_plist"
if (defined(invoker.helper_frameworks)) {
frameworks = invoker.helper_frameworks
}
if (defined(invoker.helper_defines)) {
defines = invoker.helper_defines
}
}
}
foreach(helper_params, content_mac_helpers) {
_helper_target = helper_params[0]
_helper_bundle_id = helper_params[1]
_helper_suffix = helper_params[2]
cef_helper_app("${app_name}_helper_app_${_helper_target}") {
helper_sources = invoker.helper_sources
if (defined(invoker.helper_deps)) {
helper_deps = invoker.helper_deps
}
if (defined(invoker.helper_frameworks)) {
helper_frameworks = invoker.helper_frameworks
}
if (defined(invoker.helper_defines)) {
helper_defines = invoker.helper_defines
}
helper_name_suffix = _helper_suffix
helper_bundle_id_suffix = _helper_bundle_id
}
}
bundle_data("${app_name}_framework_bundle_data") {
testonly = app_testonly
sources = [ "$root_out_dir/$cef_framework_name.framework" ]
public_deps = [ ":cef_framework" ]
foreach(helper_params, content_mac_helpers) {
sources += [ "$root_out_dir/${app_helper_name}${helper_params[2]}.app" ]
public_deps += [ ":${app_name}_helper_app_${helper_params[0]}" ]
}
outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
}
tweak_info_plist("${app_name}_plist") {
testonly = app_testonly
info_plist = invoker.info_plist
args = [
"--scm=1",
"--version",
cef_plist_version,
]
}
mac_app_bundle(app_name) {
testonly = app_testonly
output_name = app_name
sources = invoker.sources
public_deps = [ ":libcef_dll_wrapper" ]
deps = [
":${app_name}_framework_bundle_data",
":cef_make_headers",
":libcef_dll_wrapper",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
if (defined(invoker.frameworks)) {
frameworks = invoker.frameworks
}
if (defined(invoker.defines)) {
defines = invoker.defines
}
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 +
[ "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}}",
]
}
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 =
includes_common + includes_mac + 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 +
gypi_paths2.cefclient_sources_common +
gypi_paths2.cefclient_sources_renderer
helper_defines = [ "CEF_USE_SANDBOX" ]
info_plist = "tests/cefclient/resources/mac/Info.plist"
sources =
includes_common + includes_mac + 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.cefclient_sources_browser +
gypi_paths2.cefclient_sources_common + gypi_paths2.cefclient_sources_mac
deps = [
":cefclient_resources_bundle_data",
":cefclient_resources_bundle_data_english",
":cefclient_resources_bundle_data_extensions_set_page_color",
":cefclient_xibs",
]
frameworks = [
"AppKit.framework",
"OpenGL.framework",
]
defines = [ "CEF_USE_SANDBOX" ]
}
#
# 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 =
includes_common + includes_mac + gypi_paths2.includes_wrapper +
gypi_paths2.includes_wrapper_mac +
gypi_paths2.cefsimple_sources_mac_helper
helper_defines = [ "CEF_USE_SANDBOX" ]
info_plist = "tests/cefsimple/mac/Info.plist"
sources =
includes_common + includes_mac + gypi_paths2.includes_wrapper +
gypi_paths2.includes_wrapper_mac +
gypi_paths2.cefsimple_sources_common + gypi_paths2.cefsimple_sources_mac
deps = [
":cefsimple_resources_bundle_data",
":cefsimple_resources_bundle_data_english",
":cefsimple_xibs",
]
frameworks = [ "AppKit.framework" ]
defines = [ "CEF_USE_SANDBOX" ]
}
#
# ceftests app targets.
#
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") {
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 = [
":gtest_teamcity",
"//testing/gtest",
]
helper_frameworks = [ "AppKit.framework" ]
helper_defines = [ "CEF_USE_SANDBOX" ]
info_plist = "tests/ceftests/resources/mac/Info.plist"
sources =
includes_common + includes_mac + 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",
":gtest_teamcity",
"//testing/gtest",
]
frameworks = [ "AppKit.framework" ]
defines = [ "CEF_USE_SANDBOX" ]
}
} 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" ]
}
}
if (is_linux && cef_use_gtk) {
pkg_config("gtk") {
packages = [
"gmodule-2.0",
"gtk+-3.0",
"gthread-2.0",
"gtk+-unix-print-3.0",
"xi",
]
}
}
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}}" ]
}
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}}" ]
}
}
executable("cefclient") {
sources =
includes_common + gypi_paths2.includes_wrapper +
gypi_paths2.shared_sources_browser + gypi_paths2.shared_sources_common +
gypi_paths2.shared_sources_renderer +
gypi_paths2.cefclient_sources_browser +
gypi_paths2.cefclient_sources_common +
gypi_paths2.cefclient_sources_renderer
deps = [
":libcef_dll_wrapper",
":libweb_engine",
]
defines = [ "CEF_USE_SANDBOX" ]
if (is_win) {
sources += includes_win + gypi_paths2.shared_sources_win +
gypi_paths2.cefclient_sources_win
# Set /SUBSYSTEM:WINDOWS.
configs -= [ "//build/config/win:console" ]
configs += [ "//build/config/win:windowed" ]
defines += [ "CEF_USE_ATL" ]
deps += [
":cef_sandbox",
"//build/win:default_exe_manifest",
]
libs = [
"comctl32.lib",
"d3d11.lib",
"imm32.lib",
"oleacc.lib",
"rpcrt4.lib",
"shlwapi.lib",
]
if (target_cpu != "arm64") {
libs += [
"opengl32.lib",
"glu32.lib",
]
}
}
if (is_linux) {
sources += includes_linux + gypi_paths2.shared_sources_linux +
gypi_paths2.cefclient_sources_linux
deps += [
":copy_cefclient_files",
":copy_cefclient_files_extensions_set_page_color",
]
libs = [
"GL",
"X11",
]
if (cef_use_gtk) {
configs += [ ":gtk" ]
}
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 {
# 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 = includes_common + gypi_paths2.includes_wrapper +
gypi_paths2.cefsimple_sources_common
deps = [
":libcef_dll_wrapper",
":libweb_engine",
]
defines = [ "CEF_USE_SANDBOX" ]
if (is_win) {
sources += 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 += includes_linux + gypi_paths2.cefsimple_sources_linux
if (ozone_platform_x11) {
libs = [ "X11" ]
}
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.
#
if (is_linux) {
copy("copy_ceftests_files") {
sources = gypi_paths2.shared_sources_resources
outputs = [ "${root_out_dir}/ceftests_files/{{source_file_part}}" ]
}
}
executable("ceftests") {
testonly = true
sources =
includes_common + gypi_paths2.includes_wrapper +
gypi_paths2.shared_sources_browser + gypi_paths2.shared_sources_common +
gypi_paths2.shared_sources_renderer +
gypi_paths2.ceftests_sources_common
deps = [
":gtest_teamcity",
":libcef_dll_wrapper",
":libweb_engine",
"//testing/gtest",
]
defines = [ "CEF_USE_SANDBOX" ]
if (is_win) {
sources +=
gypi_paths2.shared_sources_win + gypi_paths2.ceftests_sources_win
deps += [
":cef_sandbox",
"//build/win:default_exe_manifest",
]
}
if (is_linux) {
sources +=
gypi_paths2.shared_sources_linux + gypi_paths2.ceftests_sources_linux
if (ozone_platform_x11) {
libs = [ "X11" ]
} else {
if (!use_sysroot) {
configs += [ ":glib" ]
}
}
deps += [ ":copy_ceftests_files" ]
}
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" ]
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zsaya/chromium_cef.git
git@gitee.com:zsaya/chromium_cef.git
zsaya
chromium_cef
chromium_cef
master

搜索帮助