mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
49 Commits
5bafd32ee1
...
2785
Author | SHA1 | Date | |
---|---|---|---|
|
8c4ba9f2d8 | ||
|
2b5c3a7185 | ||
|
37a29e36b3 | ||
|
150a22a49c | ||
|
16e49fb8af | ||
|
c3a7e2cdec | ||
|
162e9a9190 | ||
|
15d09c7592 | ||
|
aab55437e2 | ||
|
58b5209269 | ||
|
dfdcf403a8 | ||
|
aead0852b3 | ||
|
4a88e6738a | ||
|
c7e062b773 | ||
|
14084aaf41 | ||
|
d811450a32 | ||
|
71d9d35fc3 | ||
|
3e763188b5 | ||
|
cb3e183d78 | ||
|
8949b13120 | ||
|
80e473edf2 | ||
|
87ce1497b9 | ||
|
e33dd88cd4 | ||
|
67bb846748 | ||
|
1dac96f3e2 | ||
|
0974f72478 | ||
|
1e15b76262 | ||
|
9f1bd36e74 | ||
|
a9f5c8bfb2 | ||
|
d538cf683e | ||
|
a99ebd38a0 | ||
|
39b9b98b5c | ||
|
3bd9c18309 | ||
|
e0a22fe9fa | ||
|
cc24f60779 | ||
|
5edb3bf62d | ||
|
e90b99171b | ||
|
4cf33c94e8 | ||
|
8a0e29ecf6 | ||
|
eac4425c21 | ||
|
6b6edcc19c | ||
|
06ebf2b0a4 | ||
|
6560d03ab0 | ||
|
7686007c1a | ||
|
da265f6a2d | ||
|
39e62853cc | ||
|
9bfcca74f2 | ||
|
7641240f2e | ||
|
2627733710 |
88
BUILD.gn
88
BUILD.gn
@@ -230,8 +230,6 @@ static_library("libcef_static") {
|
||||
"libcef/browser/chrome_browser_process_stub.h",
|
||||
"libcef/browser/chrome_profile_stub.cc",
|
||||
"libcef/browser/chrome_profile_stub.h",
|
||||
"libcef/browser/component_updater/cef_component_updater_configurator.cc",
|
||||
"libcef/browser/component_updater/cef_component_updater_configurator.h",
|
||||
"libcef/browser/content_browser_client.cc",
|
||||
"libcef/browser/content_browser_client.h",
|
||||
"libcef/browser/context.cc",
|
||||
@@ -465,6 +463,8 @@ static_library("libcef_static") {
|
||||
"libcef/common/value_base.h",
|
||||
"libcef/common/values_impl.cc",
|
||||
"libcef/common/values_impl.h",
|
||||
"libcef/common/widevine_loader.cc",
|
||||
"libcef/common/widevine_loader.h",
|
||||
"libcef/renderer/browser_impl.cc",
|
||||
"libcef/renderer/browser_impl.h",
|
||||
"libcef/renderer/content_renderer_client.cc",
|
||||
@@ -636,10 +636,6 @@ static_library("libcef_static") {
|
||||
"//extensions/shell/browser/shell_display_info_provider.h",
|
||||
"//extensions/shell/browser/shell_web_contents_modal_dialog_manager.cc",
|
||||
|
||||
# Include sources for component-updater support.
|
||||
"//chrome/browser/component_updater/widevine_cdm_component_installer.cc",
|
||||
"//chrome/browser/component_updater/widevine_cdm_component_installer.h",
|
||||
|
||||
# Include sources for widevine support.
|
||||
"//chrome/common/widevine_cdm_constants.cc",
|
||||
"//chrome/common/widevine_cdm_constants.h",
|
||||
@@ -722,13 +718,9 @@ static_library("libcef_static") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
# Generate pack files and make include paths for grit headers discoverable.
|
||||
":pak",
|
||||
":pak_100_percent",
|
||||
":pak_200_percent",
|
||||
":pak_devtools",
|
||||
":pak_extensions",
|
||||
":repack_locales_pack",
|
||||
# Generate pack files and associated CEF header files.
|
||||
":make_pack_header_resources",
|
||||
":make_pack_header_strings",
|
||||
|
||||
# Grit deps that generate .cc files must be listed both here and in the
|
||||
# repack() target.
|
||||
@@ -744,7 +736,6 @@ static_library("libcef_static") {
|
||||
"//base/third_party/dynamic_annotations",
|
||||
"//cc",
|
||||
"//components/cdm/renderer",
|
||||
"//components/component_updater",
|
||||
"//components/content_settings/core/browser",
|
||||
"//components/content_settings/core/common",
|
||||
"//components/crash/content/app:app_breakpad_mac_win_to_be_deleted",
|
||||
@@ -799,6 +790,7 @@ static_library("libcef_static") {
|
||||
"//skia",
|
||||
"//storage/browser",
|
||||
"//sync",
|
||||
"//third_party/brotli",
|
||||
"//third_party/cld_2",
|
||||
"//third_party/hunspell",
|
||||
"//third_party/leveldatabase",
|
||||
@@ -1051,7 +1043,11 @@ static_library("libcef_static") {
|
||||
config("libcef_dll_wrapper_config") {
|
||||
include_dirs = [
|
||||
".",
|
||||
# Source files included in the binary distrib use include paths relative to
|
||||
# the tests directory.
|
||||
"tests",
|
||||
# For generated include headers.
|
||||
"$root_out_dir/includes",
|
||||
]
|
||||
defines = [ "USING_CEF_SHARED" ]
|
||||
}
|
||||
@@ -1183,7 +1179,10 @@ repack("pak_devtools") {
|
||||
"$root_gen_dir/blink/devtools_resources.pak",
|
||||
]
|
||||
|
||||
deps = [
|
||||
# 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 = [
|
||||
"//content/browser/devtools:resources",
|
||||
]
|
||||
|
||||
@@ -1274,6 +1273,65 @@ repack("pak") {
|
||||
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/blink/grit/devtools_resources.h",
|
||||
"$root_gen_dir/blink/public/resources/grit/blink_resources.h",
|
||||
"$root_gen_dir/cef/grit/cef_resources.h",
|
||||
"$root_gen_dir/chrome/grit/component_extension_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/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/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",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# libcef dll/framework target.
|
||||
|
@@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': '68623971be0cfc492a2cb0427d7f478e7b214c24',
|
||||
'chromium_checkout': 'refs/tags/53.0.2785.116',
|
||||
}
|
||||
|
52
cef.gyp
52
cef.gyp
@@ -18,6 +18,7 @@
|
||||
},
|
||||
'includes': [
|
||||
# Bring in the source file lists.
|
||||
'cef_paths.gypi',
|
||||
'cef_paths2.gypi',
|
||||
],
|
||||
'targets': [
|
||||
@@ -37,10 +38,12 @@
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(autogen_cpp_includes)',
|
||||
'<@(includes_wrapper)',
|
||||
],
|
||||
'mac_bundle_resources': [
|
||||
'<@(cefclient_bundle_resources_mac)',
|
||||
'<@(cefclient_sources_resources)',
|
||||
],
|
||||
'mac_bundle_resources!': [
|
||||
# TODO(mark): Come up with a fancier way to do this (mac_info_plist?)
|
||||
@@ -97,6 +100,10 @@
|
||||
'sources': [
|
||||
'<@(includes_win)',
|
||||
'<@(cefclient_sources_win)',
|
||||
'<@(cefclient_sources_browser)',
|
||||
'<@(cefclient_sources_common)',
|
||||
'<@(cefclient_sources_renderer)',
|
||||
'<@(cefclient_sources_resources)',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="mac"', {
|
||||
@@ -162,6 +169,8 @@
|
||||
'sources': [
|
||||
'<@(includes_mac)',
|
||||
'<@(cefclient_sources_mac)',
|
||||
'<@(cefclient_sources_browser)',
|
||||
'<@(cefclient_sources_common)',
|
||||
],
|
||||
}],
|
||||
[ '(OS=="linux" or OS=="freebsd" or OS=="openbsd") and use_sysroot==0', {
|
||||
@@ -181,12 +190,15 @@
|
||||
'sources': [
|
||||
'<@(includes_linux)',
|
||||
'<@(cefclient_sources_linux)',
|
||||
'<@(cefclient_sources_browser)',
|
||||
'<@(cefclient_sources_common)',
|
||||
'<@(cefclient_sources_renderer)',
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/files',
|
||||
'files': [
|
||||
'<@(cefclient_bundle_resources_linux)',
|
||||
'<@(cefclient_sources_resources)',
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -209,6 +221,7 @@
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(autogen_cpp_includes)',
|
||||
'<@(includes_wrapper)',
|
||||
'<@(cefsimple_sources_common)',
|
||||
],
|
||||
@@ -469,6 +482,8 @@
|
||||
'.',
|
||||
# Necessary to allow unittest files to access cefclient files.
|
||||
'tests',
|
||||
# For generated include headers.
|
||||
'<(PRODUCT_DIR)/includes',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS=="win"', {
|
||||
@@ -618,10 +633,13 @@
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(autogen_cpp_includes)',
|
||||
'<@(includes_capi)',
|
||||
'<@(autogen_capi_includes)',
|
||||
'<@(includes_wrapper)',
|
||||
'<@(libcef_dll_wrapper_sources_base)',
|
||||
'<@(libcef_dll_wrapper_sources_common)',
|
||||
'<@(autogen_client_side)',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS=="mac"', {
|
||||
@@ -658,9 +676,12 @@
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(autogen_cpp_includes)',
|
||||
'<@(includes_capi)',
|
||||
'<@(autogen_capi_includes)',
|
||||
'<@(includes_wrapper)',
|
||||
'<@(libcef_dll_wrapper_sources_common)',
|
||||
'<@(autogen_client_side)',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS=="mac"', {
|
||||
@@ -885,7 +906,7 @@
|
||||
'<@(header_inputs)',
|
||||
],
|
||||
'outputs': [
|
||||
'include/cef_pack_resources.h',
|
||||
'<(PRODUCT_DIR)/includes/include/cef_pack_resources.h',
|
||||
],
|
||||
'action': ['python', '<(make_pack_header_path)', '<@(_outputs)',
|
||||
'<@(header_inputs)'],
|
||||
@@ -907,7 +928,7 @@
|
||||
'<@(header_inputs)',
|
||||
],
|
||||
'outputs': [
|
||||
'include/cef_pack_strings.h',
|
||||
'<(PRODUCT_DIR)/includes/include/cef_pack_strings.h',
|
||||
],
|
||||
'action': ['python', '<(make_pack_header_path)', '<@(_outputs)',
|
||||
'<@(header_inputs)'],
|
||||
@@ -940,9 +961,6 @@
|
||||
'<(DEPTH)/cef/libcef/resources/grit_stub/chrome',
|
||||
'<(grit_out_dir)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/chrome',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/components',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/strings',
|
||||
],
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/base.gyp:base',
|
||||
@@ -960,7 +978,6 @@
|
||||
# chrome/common/chrome_contants.cc
|
||||
'<(DEPTH)/chrome/common_constants.gyp:version_header',
|
||||
'<(DEPTH)/components/components.gyp:cdm_renderer',
|
||||
'<(DEPTH)/components/components.gyp:component_updater',
|
||||
'<(DEPTH)/components/components.gyp:content_settings_core_browser',
|
||||
'<(DEPTH)/components/components.gyp:content_settings_core_common',
|
||||
'<(DEPTH)/components/components.gyp:crash_component_breakpad_to_be_deleted',
|
||||
@@ -1019,6 +1036,7 @@
|
||||
'<(DEPTH)/skia/skia.gyp:skia',
|
||||
'<(DEPTH)/storage/storage_browser.gyp:storage',
|
||||
'<(DEPTH)/sync/sync.gyp:sync',
|
||||
'<(DEPTH)/third_party/brotli/brotli.gyp:brotli',
|
||||
'<(DEPTH)/third_party/cld_2/cld_2.gyp:cld_2',
|
||||
'<(DEPTH)/third_party/hunspell/hunspell.gyp:hunspell',
|
||||
'<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
|
||||
@@ -1039,6 +1057,7 @@
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(autogen_cpp_includes)',
|
||||
'libcef/browser/browser_context.cc',
|
||||
'libcef/browser/browser_context.h',
|
||||
'libcef/browser/browser_context_impl.cc',
|
||||
@@ -1068,8 +1087,6 @@
|
||||
'libcef/browser/chrome_browser_process_stub.h',
|
||||
'libcef/browser/chrome_profile_stub.cc',
|
||||
'libcef/browser/chrome_profile_stub.h',
|
||||
'libcef/browser/component_updater/cef_component_updater_configurator.cc',
|
||||
'libcef/browser/component_updater/cef_component_updater_configurator.h',
|
||||
'libcef/browser/content_browser_client.cc',
|
||||
'libcef/browser/content_browser_client.h',
|
||||
'libcef/browser/context.cc',
|
||||
@@ -1303,6 +1320,8 @@
|
||||
'libcef/common/value_base.h',
|
||||
'libcef/common/values_impl.cc',
|
||||
'libcef/common/values_impl.h',
|
||||
'libcef/common/widevine_loader.cc',
|
||||
'libcef/common/widevine_loader.h',
|
||||
'libcef/renderer/browser_impl.cc',
|
||||
'libcef/renderer/browser_impl.h',
|
||||
'libcef/renderer/content_renderer_client.cc',
|
||||
@@ -1463,9 +1482,6 @@
|
||||
'<(DEPTH)/extensions/shell/browser/shell_display_info_provider.h',
|
||||
'<(DEPTH)/extensions/shell/browser/shell_web_contents_modal_dialog_manager.cc',
|
||||
'<(grit_out_dir)/grit/component_extension_resources_map.cc',
|
||||
# Include sources for component-updater support.
|
||||
'<(DEPTH)/chrome/browser/component_updater/widevine_cdm_component_installer.cc',
|
||||
'<(DEPTH)/chrome/browser/component_updater/widevine_cdm_component_installer.h',
|
||||
# Include sources for widevine support.
|
||||
'<(DEPTH)/chrome/common/widevine_cdm_constants.cc',
|
||||
'<(DEPTH)/chrome/common/widevine_cdm_constants.h',
|
||||
@@ -1753,8 +1769,11 @@
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(autogen_cpp_includes)',
|
||||
'<@(includes_capi)',
|
||||
'<@(autogen_capi_includes)',
|
||||
'<@(libcef_sources_common)',
|
||||
'<@(autogen_library_side)',
|
||||
],
|
||||
'postbuilds': [
|
||||
{
|
||||
@@ -1800,7 +1819,7 @@
|
||||
'.',
|
||||
# cefclient includes are relative to the tests directory to make
|
||||
# creation of binary releases easier.
|
||||
'tests'
|
||||
'tests',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
@@ -1809,6 +1828,8 @@
|
||||
},
|
||||
'sources': [
|
||||
'<@(cefclient_sources_mac_helper)',
|
||||
'<@(cefclient_sources_common)',
|
||||
'<@(cefclient_sources_renderer)',
|
||||
],
|
||||
# TODO(mark): Come up with a fancier way to do this. It should only
|
||||
# be necessary to list helper-Info.plist once, not the three times it
|
||||
@@ -1949,6 +1970,8 @@
|
||||
'.',
|
||||
# Necessary to allow unittest files to access cefclient files.
|
||||
'tests',
|
||||
# For generated include headers.
|
||||
'<(PRODUCT_DIR)/includes',
|
||||
],
|
||||
'sources': [
|
||||
'tests/cefclient/browser/resource_util.cc',
|
||||
@@ -2057,8 +2080,11 @@
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(autogen_cpp_includes)',
|
||||
'<@(includes_capi)',
|
||||
'<@(autogen_capi_includes)',
|
||||
'<@(libcef_sources_common)',
|
||||
'<@(autogen_library_side)',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
|
@@ -314,6 +314,8 @@
|
||||
'libcef_dll/cpptoc/process_message_cpptoc.h',
|
||||
'libcef_dll/ctocpp/read_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/read_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/register_cdm_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/register_cdm_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/render_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/render_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/render_process_handler_ctocpp.cc',
|
||||
@@ -562,6 +564,8 @@
|
||||
'libcef_dll/ctocpp/process_message_ctocpp.h',
|
||||
'libcef_dll/cpptoc/read_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/read_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/register_cdm_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/register_cdm_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/render_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/render_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/render_process_handler_cpptoc.cc',
|
||||
|
@@ -3,10 +3,6 @@
|
||||
# can be found in the LICENSE file.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
# Bring in the autogenerated source file lists.
|
||||
'cef_paths.gypi',
|
||||
],
|
||||
'variables': {
|
||||
'includes_common': [
|
||||
'include/base/cef_atomic_ref_count.h',
|
||||
@@ -40,8 +36,6 @@
|
||||
'include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h',
|
||||
'include/base/internal/cef_thread_checker_impl.h',
|
||||
'include/cef_base.h',
|
||||
'include/cef_pack_resources.h',
|
||||
'include/cef_pack_strings.h',
|
||||
'include/cef_version.h',
|
||||
'include/internal/cef_export.h',
|
||||
'include/internal/cef_logging_internal.h',
|
||||
@@ -57,11 +51,9 @@
|
||||
'include/internal/cef_trace_event_internal.h',
|
||||
'include/internal/cef_types.h',
|
||||
'include/internal/cef_types_wrappers.h',
|
||||
'<@(autogen_cpp_includes)',
|
||||
],
|
||||
'includes_capi': [
|
||||
'include/capi/cef_base_capi.h',
|
||||
'<@(autogen_capi_includes)',
|
||||
],
|
||||
'includes_wrapper': [
|
||||
'include/wrapper/cef_byte_read_handler.h',
|
||||
@@ -104,7 +96,6 @@
|
||||
'libcef_dll/transfer_util.cc',
|
||||
'libcef_dll/transfer_util.h',
|
||||
'libcef_dll/wrapper_types.h',
|
||||
'<@(autogen_library_side)',
|
||||
],
|
||||
'libcef_dll_wrapper_sources_base': [
|
||||
'libcef_dll/base/cef_atomicops_x86_gcc.cc',
|
||||
@@ -138,7 +129,6 @@
|
||||
'libcef_dll/wrapper/cef_zip_archive.cc',
|
||||
'libcef_dll/wrapper/libcef_dll_wrapper.cc',
|
||||
'libcef_dll/wrapper/libcef_dll_wrapper2.cc',
|
||||
'<@(autogen_client_side)',
|
||||
],
|
||||
'cefclient_sources_browser': [
|
||||
'tests/cefclient/browser/binding_test.cc',
|
||||
@@ -159,6 +149,8 @@
|
||||
'tests/cefclient/browser/client_types.h',
|
||||
'tests/cefclient/browser/dialog_test.cc',
|
||||
'tests/cefclient/browser/dialog_test.h',
|
||||
'tests/cefclient/browser/drm_test.cc',
|
||||
'tests/cefclient/browser/drm_test.h',
|
||||
'tests/cefclient/browser/geometry_util.cc',
|
||||
'tests/cefclient/browser/geometry_util.h',
|
||||
'tests/cefclient/browser/main_context.cc',
|
||||
@@ -224,6 +216,7 @@
|
||||
'tests/cefclient/resources/binding.html',
|
||||
'tests/cefclient/resources/dialogs.html',
|
||||
'tests/cefclient/resources/draggable.html',
|
||||
'tests/cefclient/resources/drm.html',
|
||||
'tests/cefclient/resources/localstorage.html',
|
||||
'tests/cefclient/resources/logo.png',
|
||||
'tests/cefclient/resources/menu_icon.1x.png',
|
||||
@@ -276,10 +269,6 @@
|
||||
'tests/cefclient/resources/win/cefclient.ico',
|
||||
'tests/cefclient/resources/win/cefclient.rc',
|
||||
'tests/cefclient/resources/win/small.ico',
|
||||
'<@(cefclient_sources_browser)',
|
||||
'<@(cefclient_sources_common)',
|
||||
'<@(cefclient_sources_renderer)',
|
||||
'<@(cefclient_sources_resources)',
|
||||
],
|
||||
'cefclient_sources_mac': [
|
||||
'tests/cefclient/browser/browser_window_osr_mac.h',
|
||||
@@ -297,20 +286,15 @@
|
||||
'tests/cefclient/browser/window_test_runner_mac.h',
|
||||
'tests/cefclient/browser/window_test_runner_mac.mm',
|
||||
'tests/cefclient/cefclient_mac.mm',
|
||||
'<@(cefclient_sources_browser)',
|
||||
'<@(cefclient_sources_common)',
|
||||
],
|
||||
'cefclient_sources_mac_helper': [
|
||||
'tests/cefclient/process_helper_mac.cc',
|
||||
'<@(cefclient_sources_common)',
|
||||
'<@(cefclient_sources_renderer)',
|
||||
],
|
||||
'cefclient_bundle_resources_mac': [
|
||||
'tests/cefclient/resources/mac/cefclient.icns',
|
||||
'tests/cefclient/resources/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/cefclient/resources/mac/English.lproj/MainMenu.xib',
|
||||
'tests/cefclient/resources/mac/Info.plist',
|
||||
'<@(cefclient_sources_resources)',
|
||||
],
|
||||
'cefclient_sources_linux': [
|
||||
'tests/cefclient/browser/browser_window_osr_gtk.cc',
|
||||
@@ -338,12 +322,6 @@
|
||||
'tests/cefclient/browser/window_test_runner_views.cc',
|
||||
'tests/cefclient/browser/window_test_runner_views.h',
|
||||
'tests/cefclient/cefclient_gtk.cc',
|
||||
'<@(cefclient_sources_browser)',
|
||||
'<@(cefclient_sources_common)',
|
||||
'<@(cefclient_sources_renderer)',
|
||||
],
|
||||
'cefclient_bundle_resources_linux': [
|
||||
'<@(cefclient_sources_resources)',
|
||||
],
|
||||
'cefsimple_sources_common': [
|
||||
'tests/cefsimple/simple_app.cc',
|
||||
|
@@ -185,26 +185,20 @@ endif(OS_LINUX)
|
||||
|
||||
if(OS_MACOSX)
|
||||
|
||||
# Fix the framework link in the helper executable.
|
||||
macro(FIX_MACOSX_HELPER_FRAMEWORK_LINK target app_path)
|
||||
add_custom_command(TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND install_name_tool -change "@executable_path/Chromium Embedded Framework"
|
||||
"@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
|
||||
"${app_path}/Contents/MacOS/${target}"
|
||||
VERBATIM
|
||||
)
|
||||
# Fix the framework rpath in the helper executable.
|
||||
macro(FIX_MACOSX_HELPER_FRAMEWORK_RPATH target)
|
||||
# The helper is in $app_name.app/Contents/Frameworks/$app_name Helper.app/Contents/MacOS/
|
||||
# so set rpath up to Contents/ so that the loader can find Frameworks/.
|
||||
set_target_properties(${target} PROPERTIES INSTALL_RPATH "@executable_path/../../../..")
|
||||
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
endmacro()
|
||||
|
||||
# Fix the framework link in the main executable.
|
||||
macro(FIX_MACOSX_MAIN_FRAMEWORK_LINK target app_path)
|
||||
add_custom_command(TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND install_name_tool -change "@executable_path/Chromium Embedded Framework"
|
||||
"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
|
||||
"${app_path}/Contents/MacOS/${target}"
|
||||
VERBATIM
|
||||
)
|
||||
# Fix the framework rpath in the main executable.
|
||||
macro(FIX_MACOSX_MAIN_FRAMEWORK_RPATH target)
|
||||
# The main app is at $app_name.app/Contents/MacOS/$app_name
|
||||
# so set rpath up to Contents/ so that the loader can find Frameworks/.
|
||||
set_target_properties(${target} PROPERTIES INSTALL_RPATH "@executable_path/..")
|
||||
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
endmacro()
|
||||
|
||||
# Manually process and copy over resource files.
|
||||
|
@@ -305,6 +305,24 @@ endif()
|
||||
#
|
||||
|
||||
if(OS_WINDOWS)
|
||||
# Configure use of the sandbox.
|
||||
option(USE_SANDBOX "Enable or disable use of the sandbox." ON)
|
||||
if(USE_SANDBOX AND NOT MSVC_VERSION EQUAL 1900)
|
||||
# The cef_sandbox.lib static library is currently built with VS2015. It will
|
||||
# not link successfully with other VS versions.
|
||||
set(USE_SANDBOX OFF)
|
||||
endif()
|
||||
|
||||
# Configure use of official build compiler settings.
|
||||
# When using an official build the "Debug" build is actually a Release build
|
||||
# with DCHECKs enabled. In order to link the sandbox the Debug build must
|
||||
# be configured with some Release-related compiler settings.
|
||||
option(USE_OFFICIAL_BUILD_SANDBOX "Enable or disable use of an official build sandbox." ON)
|
||||
if(NOT USE_SANDBOX)
|
||||
# Don't need official build settings when the sandbox is off.
|
||||
set(USE_OFFICIAL_BUILD_SANDBOX OFF)
|
||||
endif()
|
||||
|
||||
# Consumers who run into LNK4099 warnings can pass /Z7 instead (see issue #385).
|
||||
set(CEF_DEBUG_INFO_FLAG "/Zi" CACHE STRING "Optional flag specifying specific /Z flag to use")
|
||||
|
||||
@@ -326,11 +344,22 @@ if(OS_WINDOWS)
|
||||
/wd4996 # Ignore "function or variable may be unsafe" warning
|
||||
${CEF_DEBUG_INFO_FLAG}
|
||||
)
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
/MTd # Multithreaded debug runtime
|
||||
/RTC1 # Disable optimizations
|
||||
/Od # Enable basic run-time checks
|
||||
)
|
||||
if(USE_OFFICIAL_BUILD_SANDBOX)
|
||||
# CMake adds /RTC1, /D"_DEBUG" and a few other values by default for Debug
|
||||
# builds. We can't link the sandbox with those values so clear the CMake
|
||||
# defaults here.
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "")
|
||||
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
/MT # Multithreaded release runtime
|
||||
)
|
||||
else()
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
/MTd # Multithreaded debug runtime
|
||||
/RTC1 # Disable optimizations
|
||||
/Od # Enable basic run-time checks
|
||||
)
|
||||
endif()
|
||||
list(APPEND CEF_COMPILER_FLAGS_RELEASE
|
||||
/MT # Multithreaded release runtime
|
||||
/O2 # Optimize for maximum speed
|
||||
@@ -341,7 +370,8 @@ if(OS_WINDOWS)
|
||||
/DEBUG # Generate debug information
|
||||
)
|
||||
list(APPEND CEF_EXE_LINKER_FLAGS
|
||||
/MANIFEST:NO # No default manifest (see ADD_WINDOWS_MANIFEST macro usage)
|
||||
/MANIFEST:NO # No default manifest (see ADD_WINDOWS_MANIFEST macro usage)
|
||||
/LARGEADDRESSAWARE # Allow 32-bit processes to access 3GB of RAM
|
||||
)
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
WIN32 _WIN32 _WINDOWS # Windows platform
|
||||
@@ -351,6 +381,12 @@ if(OS_WINDOWS)
|
||||
WIN32_LEAN_AND_MEAN # Exclude less common API declarations
|
||||
_HAS_EXCEPTIONS=0 # Disable exceptions
|
||||
)
|
||||
if(USE_OFFICIAL_BUILD_SANDBOX)
|
||||
list(APPEND CEF_COMPILER_DEFINES_DEBUG
|
||||
NDEBUG _NDEBUG # Not a debug build
|
||||
DCHECK_ALWAYS_ON=1 # DCHECKs are enabled
|
||||
)
|
||||
endif()
|
||||
list(APPEND CEF_COMPILER_DEFINES_RELEASE
|
||||
NDEBUG _NDEBUG # Not a debug build
|
||||
)
|
||||
@@ -395,14 +431,6 @@ if(OS_WINDOWS)
|
||||
locales
|
||||
)
|
||||
|
||||
# Configure use of the sandbox.
|
||||
option(USE_SANDBOX "Enable or disable use of the sandbox." ON)
|
||||
if(USE_SANDBOX AND NOT MSVC_VERSION EQUAL 1900)
|
||||
# The cef_sandbox.lib static library is currently built with VS2015. It will
|
||||
# not link successfully with other VS versions.
|
||||
set(USE_SANDBOX OFF)
|
||||
endif()
|
||||
|
||||
if(USE_SANDBOX)
|
||||
list(APPEND CEF_COMPILER_DEFINES
|
||||
PSAPI_VERSION=1 # Required by cef_sandbox.lib
|
||||
|
@@ -45,6 +45,7 @@
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_platform_thread.h"
|
||||
#include "include/base/internal/cef_lock_impl.h"
|
||||
@@ -57,7 +58,7 @@ namespace cef_internal {
|
||||
// AssertAcquired() method.
|
||||
class Lock {
|
||||
public:
|
||||
#if defined(NDEBUG) // Optimized wrapper implementation
|
||||
#if !DCHECK_IS_ON() // Optimized wrapper implementation
|
||||
Lock() : lock_() {}
|
||||
~Lock() {}
|
||||
void Acquire() { lock_.Lock(); }
|
||||
@@ -96,10 +97,10 @@ class Lock {
|
||||
}
|
||||
|
||||
void AssertAcquired() const;
|
||||
#endif // NDEBUG
|
||||
#endif // !DCHECK_IS_ON()
|
||||
|
||||
private:
|
||||
#if !defined(NDEBUG)
|
||||
#if DCHECK_IS_ON()
|
||||
// Members and routines taking care of locks assertions.
|
||||
// Note that this checks for recursive locks and allows them
|
||||
// if the variable is set. This is allowed by the underlying implementation
|
||||
@@ -111,7 +112,7 @@ class Lock {
|
||||
// All private data is implicitly protected by lock_.
|
||||
// Be VERY careful to only access members under that lock.
|
||||
base::PlatformThreadRef owning_thread_ref_;
|
||||
#endif // NDEBUG
|
||||
#endif // DCHECK_IS_ON()
|
||||
|
||||
// Platform specific underlying lock implementation.
|
||||
LockImpl lock_;
|
||||
|
@@ -50,9 +50,7 @@
|
||||
|
||||
#include "include/base/cef_atomic_ref_count.h"
|
||||
#include "include/base/cef_build.h"
|
||||
#ifndef NDEBUG
|
||||
#include "include/base/cef_logging.h"
|
||||
#endif
|
||||
#include "include/base/cef_thread_collision_warner.h"
|
||||
|
||||
namespace base {
|
||||
@@ -66,14 +64,14 @@ class RefCountedBase {
|
||||
protected:
|
||||
RefCountedBase()
|
||||
: ref_count_(0)
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
, in_dtor_(false)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
~RefCountedBase() {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(in_dtor_) << "RefCounted object deleted without calling Release()";
|
||||
#endif
|
||||
}
|
||||
@@ -84,7 +82,7 @@ class RefCountedBase {
|
||||
// Current thread books the critical section "AddRelease"
|
||||
// without release it.
|
||||
// DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(!in_dtor_);
|
||||
#endif
|
||||
++ref_count_;
|
||||
@@ -96,11 +94,11 @@ class RefCountedBase {
|
||||
// Current thread books the critical section "AddRelease"
|
||||
// without release it.
|
||||
// DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(!in_dtor_);
|
||||
#endif
|
||||
if (--ref_count_ == 0) {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
in_dtor_ = true;
|
||||
#endif
|
||||
return true;
|
||||
@@ -110,7 +108,7 @@ class RefCountedBase {
|
||||
|
||||
private:
|
||||
mutable int ref_count_;
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
mutable bool in_dtor_;
|
||||
#endif
|
||||
|
||||
@@ -134,7 +132,7 @@ class RefCountedThreadSafeBase {
|
||||
|
||||
private:
|
||||
mutable AtomicRefCount ref_count_;
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
mutable bool in_dtor_;
|
||||
#endif
|
||||
|
||||
|
@@ -50,6 +50,7 @@
|
||||
#include "include/base/cef_atomicops.h"
|
||||
#include "include/base/cef_basictypes.h"
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
|
||||
// A helper class alongside macros to be used to verify assumptions about thread
|
||||
@@ -139,7 +140,7 @@
|
||||
// };
|
||||
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#if DCHECK_IS_ON()
|
||||
|
||||
// Defines a class member that acts like a mutex. It is used only as a
|
||||
// verification tool.
|
||||
|
@@ -72,14 +72,17 @@ typedef struct _cef_load_handler_t {
|
||||
///
|
||||
// Called when the browser begins loading a frame. The |frame| value will
|
||||
// never be NULL -- call the is_main() function to check if this frame is the
|
||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||
// start or continue loading after the main frame load has ended. This
|
||||
// function will always be called for all frames irrespective of whether the
|
||||
// request completes successfully. For notification of overall browser load
|
||||
// status use OnLoadingStateChange instead.
|
||||
// main frame. |transition_type| provides information about the source of the
|
||||
// navigation and an accurate value is only available in the browser process.
|
||||
// Multiple frames may be loading at the same time. Sub-frames may start or
|
||||
// continue loading after the main frame load has ended. This function will
|
||||
// always be called for all frames irrespective of whether the request
|
||||
// completes successfully. For notification of overall browser load status use
|
||||
// OnLoadingStateChange instead.
|
||||
///
|
||||
void (CEF_CALLBACK *on_load_start)(struct _cef_load_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame);
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
cef_transition_type_t transition_type);
|
||||
|
||||
///
|
||||
// Called when the browser is done loading a frame. The |frame| value will
|
||||
|
@@ -127,6 +127,29 @@ typedef struct _cef_web_plugin_unstable_callback_t {
|
||||
} cef_web_plugin_unstable_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to receive notification when CDM registration is
|
||||
// complete. The functions of this structure will be called on the browser
|
||||
// process UI thread.
|
||||
///
|
||||
typedef struct _cef_register_cdm_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Method that will be called when CDM registration is complete. |result| will
|
||||
// be CEF_CDM_REGISTRATION_ERROR_NONE if registration completed successfully.
|
||||
// Otherwise, |result| and |error_message| will contain additional information
|
||||
// about why registration failed.
|
||||
///
|
||||
void (CEF_CALLBACK *on_cdm_registration_complete)(
|
||||
struct _cef_register_cdm_callback_t* self,
|
||||
cef_cdm_registration_error_t result, const cef_string_t* error_message);
|
||||
} cef_register_cdm_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Visit web plugin information. Can be called on any thread in the browser
|
||||
// process.
|
||||
@@ -161,6 +184,54 @@ CEF_EXPORT void cef_register_web_plugin_crash(const cef_string_t* path);
|
||||
CEF_EXPORT void cef_is_web_plugin_unstable(const cef_string_t* path,
|
||||
cef_web_plugin_unstable_callback_t* callback);
|
||||
|
||||
///
|
||||
// Register the Widevine CDM plugin.
|
||||
//
|
||||
// The client application is responsible for downloading an appropriate
|
||||
// platform-specific CDM binary distribution from Google, extracting the
|
||||
// contents, and building the required directory structure on the local machine.
|
||||
// The cef_browser_host_t::StartDownload function and CefZipArchive structure
|
||||
// can be used to implement this functionality in CEF. Contact Google via
|
||||
// https://www.widevine.com/contact.html for details on CDM download.
|
||||
//
|
||||
// |path| is a directory that must contain the following files:
|
||||
// 1. manifest.json file from the CDM binary distribution (see below).
|
||||
// 2. widevinecdm file from the CDM binary distribution (e.g.
|
||||
// widevinecdm.dll on on Windows, libwidevinecdm.dylib on OS X,
|
||||
// libwidevinecdm.so on Linux).
|
||||
// 3. widevidecdmadapter file from the CEF binary distribution (e.g.
|
||||
// widevinecdmadapter.dll on Windows, widevinecdmadapter.plugin on OS X,
|
||||
// libwidevinecdmadapter.so on Linux).
|
||||
//
|
||||
// If any of these files are missing or if the manifest file has incorrect
|
||||
// contents the registration will fail and |callback| will receive a |result|
|
||||
// value of CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS.
|
||||
//
|
||||
// The manifest.json file must contain the following keys:
|
||||
// A. "os": Supported OS (e.g. "mac", "win" or "linux").
|
||||
// B. "arch": Supported architecture (e.g. "ia32" or "x64").
|
||||
// C. "x-cdm-module-versions": Module API version (e.g. "4").
|
||||
// D. "x-cdm-interface-versions": Interface API version (e.g. "8").
|
||||
// E. "x-cdm-host-versions": Host API version (e.g. "8").
|
||||
// F. "version": CDM version (e.g. "1.4.8.903").
|
||||
// G. "x-cdm-codecs": List of supported codecs (e.g. "vp8,vp9.0,avc1").
|
||||
//
|
||||
// A through E are used to verify compatibility with the current Chromium
|
||||
// version. If the CDM is not compatible the registration will fail and
|
||||
// |callback| will receive a |result| value of
|
||||
// CEF_CDM_REGISTRATION_ERROR_INCOMPATIBLE.
|
||||
//
|
||||
// |callback| will be executed asynchronously once registration is complete.
|
||||
//
|
||||
// On Linux this function must be called before cef_initialize() and the
|
||||
// registration cannot be changed during runtime. If registration is not
|
||||
// supported at the time that cef_register_widevine_cdm() is called then
|
||||
// |callback| will receive a |result| value of
|
||||
// CEF_CDM_REGISTRATION_ERROR_NOT_SUPPORTED.
|
||||
///
|
||||
CEF_EXPORT void cef_register_widevine_cdm(const cef_string_t* path,
|
||||
cef_register_cdm_callback_t* callback);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -51,6 +51,7 @@
|
||||
class CefLoadHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_errorcode_t ErrorCode;
|
||||
typedef cef_transition_type_t TransitionType;
|
||||
|
||||
///
|
||||
// Called when the loading state has changed. This callback will be executed
|
||||
@@ -68,15 +69,18 @@ class CefLoadHandler : public virtual CefBase {
|
||||
///
|
||||
// Called when the browser begins loading a frame. The |frame| value will
|
||||
// never be empty -- call the IsMain() method to check if this frame is the
|
||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||
// start or continue loading after the main frame load has ended. This method
|
||||
// will always be called for all frames irrespective of whether the request
|
||||
// main frame. |transition_type| provides information about the source of the
|
||||
// navigation and an accurate value is only available in the browser process.
|
||||
// Multiple frames may be loading at the same time. Sub-frames may start or
|
||||
// continue loading after the main frame load has ended. This method will
|
||||
// always be called for all frames irrespective of whether the request
|
||||
// completes successfully. For notification of overall browser load status use
|
||||
// OnLoadingStateChange instead.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnLoadStart(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame) {}
|
||||
CefRefPtr<CefFrame> frame,
|
||||
TransitionType transition_type) {}
|
||||
|
||||
///
|
||||
// Called when the browser is done loading a frame. The |frame| value will
|
||||
|
@@ -144,5 +144,71 @@ class CefWebPluginUnstableCallback : public virtual CefBase {
|
||||
void CefIsWebPluginUnstable(const CefString& path,
|
||||
CefRefPtr<CefWebPluginUnstableCallback> callback);
|
||||
|
||||
///
|
||||
// Implement this interface to receive notification when CDM registration is
|
||||
// complete. The methods of this class will be called on the browser process
|
||||
// UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefRegisterCdmCallback : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Method that will be called when CDM registration is complete. |result|
|
||||
// will be CEF_CDM_REGISTRATION_ERROR_NONE if registration completed
|
||||
// successfully. Otherwise, |result| and |error_message| will contain
|
||||
// additional information about why registration failed.
|
||||
///
|
||||
/*--cef(optional_param=error_message)--*/
|
||||
virtual void OnCdmRegistrationComplete(cef_cdm_registration_error_t result,
|
||||
const CefString& error_message) =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Register the Widevine CDM plugin.
|
||||
//
|
||||
// The client application is responsible for downloading an appropriate
|
||||
// platform-specific CDM binary distribution from Google, extracting the
|
||||
// contents, and building the required directory structure on the local machine.
|
||||
// The CefBrowserHost::StartDownload method and CefZipArchive class can be used
|
||||
// to implement this functionality in CEF. Contact Google via
|
||||
// https://www.widevine.com/contact.html for details on CDM download.
|
||||
//
|
||||
// |path| is a directory that must contain the following files:
|
||||
// 1. manifest.json file from the CDM binary distribution (see below).
|
||||
// 2. widevinecdm file from the CDM binary distribution (e.g.
|
||||
// widevinecdm.dll on on Windows, libwidevinecdm.dylib on OS X,
|
||||
// libwidevinecdm.so on Linux).
|
||||
// 3. widevidecdmadapter file from the CEF binary distribution (e.g.
|
||||
// widevinecdmadapter.dll on Windows, widevinecdmadapter.plugin on OS X,
|
||||
// libwidevinecdmadapter.so on Linux).
|
||||
//
|
||||
// If any of these files are missing or if the manifest file has incorrect
|
||||
// contents the registration will fail and |callback| will receive a |result|
|
||||
// value of CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS.
|
||||
//
|
||||
// The manifest.json file must contain the following keys:
|
||||
// A. "os": Supported OS (e.g. "mac", "win" or "linux").
|
||||
// B. "arch": Supported architecture (e.g. "ia32" or "x64").
|
||||
// C. "x-cdm-module-versions": Module API version (e.g. "4").
|
||||
// D. "x-cdm-interface-versions": Interface API version (e.g. "8").
|
||||
// E. "x-cdm-host-versions": Host API version (e.g. "8").
|
||||
// F. "version": CDM version (e.g. "1.4.8.903").
|
||||
// G. "x-cdm-codecs": List of supported codecs (e.g. "vp8,vp9.0,avc1").
|
||||
//
|
||||
// A through E are used to verify compatibility with the current Chromium
|
||||
// version. If the CDM is not compatible the registration will fail and
|
||||
// |callback| will receive a |result| value of
|
||||
// CEF_CDM_REGISTRATION_ERROR_INCOMPATIBLE.
|
||||
//
|
||||
// |callback| will be executed asynchronously once registration is complete.
|
||||
//
|
||||
// On Linux this function must be called before CefInitialize() and the
|
||||
// registration cannot be changed during runtime. If registration is not
|
||||
// supported at the time that CefRegisterWidevineCdm() is called then |callback|
|
||||
// will receive a |result| value of CEF_CDM_REGISTRATION_ERROR_NOT_SUPPORTED.
|
||||
///
|
||||
/*--cef(optional_param=callback)--*/
|
||||
void CefRegisterWidevineCdm(const CefString& path,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback);
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_WEB_PLUGIN_H_
|
||||
|
@@ -376,6 +376,19 @@ typedef struct _cef_settings_t {
|
||||
///
|
||||
int ignore_certificate_errors;
|
||||
|
||||
///
|
||||
// Set to true (1) to enable date-based expiration of built in network
|
||||
// security information (i.e. certificate transparency logs, HSTS preloading
|
||||
// and pinning information). Enabling this option improves network security
|
||||
// but may cause HTTPS load failures when using CEF binaries built more than
|
||||
// 10 weeks in the past. See https://www.certificate-transparency.org/ and
|
||||
// https://www.chromium.org/hsts for details. Also configurable using the
|
||||
// "enable-net-security-expiration" command-line switch. Can be overridden for
|
||||
// individual CefRequestContext instances via the
|
||||
// CefRequestContextSettings.enable_net_security_expiration value.
|
||||
///
|
||||
int enable_net_security_expiration;
|
||||
|
||||
///
|
||||
// Opaque background color used for accelerated content. By default the
|
||||
// background color will be white. Only the RGB compontents of the specified
|
||||
@@ -443,6 +456,17 @@ typedef struct _cef_request_context_settings_t {
|
||||
///
|
||||
int ignore_certificate_errors;
|
||||
|
||||
///
|
||||
// Set to true (1) to enable date-based expiration of built in network
|
||||
// security information (i.e. certificate transparency logs, HSTS preloading
|
||||
// and pinning information). Enabling this option improves network security
|
||||
// but may cause HTTPS load failures when using CEF binaries built more than
|
||||
// 10 weeks in the past. See https://www.certificate-transparency.org/ and
|
||||
// https://www.chromium.org/hsts for details. Can be set globally using the
|
||||
// CefSettings.enable_net_security_expiration value.
|
||||
///
|
||||
int enable_net_security_expiration;
|
||||
|
||||
///
|
||||
// Comma delimited ordered list of language codes without any whitespace that
|
||||
// will be used in the "Accept-Language" HTTP header. Can be set globally
|
||||
@@ -2635,6 +2659,31 @@ typedef enum {
|
||||
CEF_MENU_ANCHOR_BOTTOMCENTER,
|
||||
} cef_menu_anchor_position_t;
|
||||
|
||||
///
|
||||
// Error codes for CDM registration. See cef_web_plugin.h for details.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// No error. Registration completed successfully.
|
||||
///
|
||||
CEF_CDM_REGISTRATION_ERROR_NONE,
|
||||
|
||||
///
|
||||
// Required files or manifest contents are missing.
|
||||
///
|
||||
CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS,
|
||||
|
||||
///
|
||||
// The CDM is incompatible with the current Chromium version.
|
||||
///
|
||||
CEF_CDM_REGISTRATION_ERROR_INCOMPATIBLE,
|
||||
|
||||
///
|
||||
// CDM registration is not supported at this time.
|
||||
///
|
||||
CEF_CDM_REGISTRATION_ERROR_NOT_SUPPORTED,
|
||||
} cef_cdm_registration_error_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -607,6 +607,8 @@ struct CefSettingsTraits {
|
||||
target->uncaught_exception_stack_size = src->uncaught_exception_stack_size;
|
||||
target->context_safety_implementation = src->context_safety_implementation;
|
||||
target->ignore_certificate_errors = src->ignore_certificate_errors;
|
||||
target->enable_net_security_expiration =
|
||||
src->enable_net_security_expiration;
|
||||
target->background_color = src->background_color;
|
||||
|
||||
cef_string_set(src->accept_language_list.str,
|
||||
@@ -639,6 +641,8 @@ struct CefRequestContextSettingsTraits {
|
||||
target->persist_session_cookies = src->persist_session_cookies;
|
||||
target->persist_user_preferences = src->persist_user_preferences;
|
||||
target->ignore_certificate_errors = src->ignore_certificate_errors;
|
||||
target->enable_net_security_expiration =
|
||||
src->enable_net_security_expiration;
|
||||
cef_string_set(src->accept_language_list.str,
|
||||
src->accept_language_list.length, &target->accept_language_list, copy);
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#define CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_scoped_ptr.h"
|
||||
#include "include/cef_base.h"
|
||||
@@ -91,7 +92,7 @@ class CefStreamResourceHandler : public CefResourceHandler {
|
||||
|
||||
class Buffer;
|
||||
SCOPED_PTR(Buffer) buffer_;
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
// Used in debug builds to verify that |buffer_| isn't being accessed on
|
||||
// multiple threads at the same time.
|
||||
bool buffer_owned_by_file_thread_;
|
||||
|
@@ -17,13 +17,13 @@
|
||||
#include "extensions/browser/extension_protocols.h"
|
||||
#include "extensions/common/constants.h"
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
base::AtomicRefCount CefBrowserContext::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
CefBrowserContext::CefBrowserContext()
|
||||
: extension_system_(NULL) {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
base::AtomicRefCountInc(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
@@ -32,7 +32,7 @@ CefBrowserContext::~CefBrowserContext() {
|
||||
// Should be cleared in Shutdown().
|
||||
DCHECK(!resource_context_.get());
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
base::AtomicRefCountDec(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
@@ -158,7 +158,7 @@ class CefBrowserContext
|
||||
return extension_system_;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
// Simple tracking of allocated objects.
|
||||
static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int)
|
||||
#endif
|
||||
|
@@ -596,7 +596,7 @@ void CefBrowserHostImpl::SetFocus(bool focus) {
|
||||
|
||||
if (focus)
|
||||
OnSetFocus(FOCUS_SOURCE_SYSTEM);
|
||||
else
|
||||
else if (platform_delegate_)
|
||||
platform_delegate_->SendFocusEvent(false);
|
||||
}
|
||||
|
||||
@@ -940,7 +940,7 @@ void CefBrowserHostImpl::WasResized() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->WasResized();
|
||||
@@ -958,7 +958,7 @@ void CefBrowserHostImpl::WasHidden(bool hidden) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->WasHidden(hidden);
|
||||
@@ -976,7 +976,7 @@ void CefBrowserHostImpl::NotifyScreenInfoChanged() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->NotifyScreenInfoChanged();
|
||||
@@ -994,7 +994,7 @@ void CefBrowserHostImpl::Invalidate(PaintElementType type) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->Invalidate(type);
|
||||
@@ -1007,7 +1007,7 @@ void CefBrowserHostImpl::SendKeyEvent(const CefKeyEvent& event) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
content::NativeWebKeyboardEvent web_event;
|
||||
@@ -1024,7 +1024,7 @@ void CefBrowserHostImpl::SendMouseClickEvent(const CefMouseEvent& event,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
blink::WebMouseEvent web_event;
|
||||
@@ -1042,7 +1042,7 @@ void CefBrowserHostImpl::SendMouseMoveEvent(const CefMouseEvent& event,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
blink::WebMouseEvent web_event;
|
||||
@@ -1059,7 +1059,7 @@ void CefBrowserHostImpl::SendMouseWheelEvent(const CefMouseEvent& event,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
blink::WebMouseWheelEvent web_event;
|
||||
@@ -1078,7 +1078,7 @@ void CefBrowserHostImpl::SendCaptureLostEvent() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->SendCaptureLostEvent();
|
||||
@@ -1092,7 +1092,7 @@ void CefBrowserHostImpl::NotifyMoveOrResizeStarted() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->NotifyMoveOrResizeStarted();
|
||||
@@ -1118,7 +1118,9 @@ void CefBrowserHostImpl::SetWindowlessFrameRate(int frame_rate) {
|
||||
}
|
||||
|
||||
settings_.windowless_frame_rate = frame_rate;
|
||||
platform_delegate_->SetWindowlessFrameRate(frame_rate);
|
||||
|
||||
if (platform_delegate_)
|
||||
platform_delegate_->SetWindowlessFrameRate(frame_rate);
|
||||
}
|
||||
|
||||
// CefBrowser methods.
|
||||
@@ -1421,12 +1423,14 @@ void CefBrowserHostImpl::DestroyBrowser() {
|
||||
#if defined(USE_AURA)
|
||||
views::Widget* CefBrowserHostImpl::GetWindowWidget() const {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!platform_delegate_)
|
||||
return nullptr;
|
||||
return platform_delegate_->GetWindowWidget();
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserView> CefBrowserHostImpl::GetBrowserView() const {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (IsViewsHosted())
|
||||
if (IsViewsHosted() && platform_delegate_)
|
||||
return platform_delegate_->GetBrowserView();
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1665,7 +1669,8 @@ void CefBrowserHostImpl::ViewText(const std::string& text) {
|
||||
return;
|
||||
}
|
||||
|
||||
platform_delegate_->ViewText(text);
|
||||
if (platform_delegate_)
|
||||
platform_delegate_->ViewText(text);
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::HandleExternalProtocol(const GURL& url) {
|
||||
@@ -1678,7 +1683,7 @@ void CefBrowserHostImpl::HandleExternalProtocol(const GURL& url) {
|
||||
handler->OnProtocolExecution(this, url.spec(), allow_os_execution);
|
||||
}
|
||||
|
||||
if (allow_os_execution)
|
||||
if (allow_os_execution && platform_delegate_)
|
||||
platform_delegate_->HandleExternalProtocol(url);
|
||||
} else {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
@@ -1708,7 +1713,8 @@ void CefBrowserHostImpl::OnSetFocus(cef_focus_source_t source) {
|
||||
}
|
||||
}
|
||||
|
||||
platform_delegate_->SendFocusEvent(true);
|
||||
if (platform_delegate_)
|
||||
platform_delegate_->SendFocusEvent(true);
|
||||
} else {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::Bind(&CefBrowserHostImpl::OnSetFocus, this, source));
|
||||
@@ -1780,7 +1786,7 @@ CefTextInputContext CefBrowserHostImpl::GetNSTextInputContext() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return nullptr;
|
||||
|
||||
return platform_delegate_->GetNSTextInputContext();
|
||||
@@ -1802,7 +1808,7 @@ void CefBrowserHostImpl::HandleKeyEventBeforeTextInputClient(
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->HandleKeyEventBeforeTextInputClient(keyEvent);
|
||||
@@ -1822,7 +1828,7 @@ void CefBrowserHostImpl::HandleKeyEventAfterTextInputClient(
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
return platform_delegate_->HandleKeyEventAfterTextInputClient(keyEvent);
|
||||
@@ -1849,7 +1855,7 @@ void CefBrowserHostImpl::DragTargetDragEnter(CefRefPtr<CefDragData> drag_data,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->DragTargetDragEnter(drag_data, event, allowed_ops);
|
||||
@@ -1869,7 +1875,7 @@ void CefBrowserHostImpl::DragTargetDragOver(const CefMouseEvent& event,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->DragTargetDragOver(event, allowed_ops);
|
||||
@@ -1887,7 +1893,7 @@ void CefBrowserHostImpl::DragTargetDragLeave() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->DragTargetDragLeave();
|
||||
@@ -1905,7 +1911,7 @@ void CefBrowserHostImpl::DragTargetDrop(const CefMouseEvent& event) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->DragTargetDrop(event);
|
||||
@@ -1923,6 +1929,9 @@ void CefBrowserHostImpl::DragSourceSystemDragEnded() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->DragSourceSystemDragEnded();
|
||||
}
|
||||
|
||||
@@ -1939,7 +1948,7 @@ void CefBrowserHostImpl::DragSourceEndedAt(
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents())
|
||||
if (!web_contents() || !platform_delegate_)
|
||||
return;
|
||||
|
||||
platform_delegate_->DragSourceEndedAt(x, y, op);
|
||||
@@ -2109,6 +2118,9 @@ bool CefBrowserHostImpl::PreHandleKeyboardEvent(
|
||||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event,
|
||||
bool* is_keyboard_shortcut) {
|
||||
if (!platform_delegate_)
|
||||
return false;
|
||||
|
||||
if (client_.get()) {
|
||||
CefRefPtr<CefKeyboardHandler> handler = client_->GetKeyboardHandler();
|
||||
if (handler.get()) {
|
||||
@@ -2134,6 +2146,9 @@ void CefBrowserHostImpl::HandleKeyboardEvent(
|
||||
if (event.skip_in_browser)
|
||||
return;
|
||||
|
||||
if (!platform_delegate_)
|
||||
return;
|
||||
|
||||
if (client_.get()) {
|
||||
CefRefPtr<CefKeyboardHandler> handler = client_->GetKeyboardHandler();
|
||||
if (handler.get()) {
|
||||
@@ -2235,7 +2250,7 @@ void CefBrowserHostImpl::DidNavigateMainFramePostCommit(
|
||||
content::JavaScriptDialogManager*
|
||||
CefBrowserHostImpl::GetJavaScriptDialogManager(
|
||||
content::WebContents* source) {
|
||||
if (!javascript_dialog_manager_.get()) {
|
||||
if (!javascript_dialog_manager_.get() && platform_delegate_) {
|
||||
javascript_dialog_manager_.reset(
|
||||
new CefJavaScriptDialogManager(this,
|
||||
platform_delegate_->CreateJavaScriptDialogRunner()));
|
||||
@@ -2254,7 +2269,7 @@ bool CefBrowserHostImpl::HandleContextMenu(
|
||||
content::WebContents* web_contents,
|
||||
const content::ContextMenuParams& params) {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!menu_manager_.get()) {
|
||||
if (!menu_manager_.get() && platform_delegate_) {
|
||||
menu_manager_.reset(
|
||||
new CefMenuManager(this,
|
||||
platform_delegate_->CreateMenuRunner()));
|
||||
@@ -2266,7 +2281,8 @@ void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source,
|
||||
const gfx::Size& pref_size) {
|
||||
#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MACOSX))
|
||||
CEF_REQUIRE_UIT();
|
||||
platform_delegate_->SizeTo(pref_size.width(), pref_size.height());
|
||||
if (platform_delegate_)
|
||||
platform_delegate_->SizeTo(pref_size.width(), pref_size.height());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2932,7 +2948,7 @@ void CefBrowserHostImpl::SetFocusedFrame(int64 frame_id) {
|
||||
|
||||
gfx::Point CefBrowserHostImpl::GetScreenPoint(const gfx::Point& view) const {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (platform_delegate_.get())
|
||||
if (platform_delegate_)
|
||||
return platform_delegate_->GetScreenPoint(view);
|
||||
return gfx::Point();
|
||||
}
|
||||
@@ -2955,7 +2971,8 @@ void CefBrowserHostImpl::OnLoadStart(CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefLoadHandler> handler = client_->GetLoadHandler();
|
||||
if (handler.get()) {
|
||||
// Notify the handler that loading has started.
|
||||
handler->OnLoadStart(this, frame);
|
||||
handler->OnLoadStart(this, frame,
|
||||
static_cast<cef_transition_type_t>(transition_type));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3017,7 +3034,7 @@ void CefBrowserHostImpl::OnDevToolsWebContentsDestroyed() {
|
||||
|
||||
void CefBrowserHostImpl::EnsureFileDialogManager() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!file_dialog_manager_.get()) {
|
||||
if (!file_dialog_manager_.get() && platform_delegate_) {
|
||||
file_dialog_manager_.reset(
|
||||
new CefFileDialogManager(this,
|
||||
platform_delegate_->CreateFileDialogRunner()));
|
||||
|
@@ -347,7 +347,7 @@ void CefBrowserInfoManager::OnGetNewBrowserInfo(
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
// Verify that no request for the same route is currently queued.
|
||||
{
|
||||
PendingNewBrowserInfoList::const_iterator it =
|
||||
@@ -408,7 +408,7 @@ void CefBrowserInfoManager::DestroyAllBrowsers() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
{
|
||||
// Verify that all browser windows have been destroyed.
|
||||
base::AutoLock lock_scope(browser_info_lock_);
|
||||
|
@@ -178,7 +178,7 @@ void CefBrowserMainParts::PostMainMessageLoopRun() {
|
||||
|
||||
global_browser_context_ = NULL;
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
// No CefBrowserContext instances should exist at this point.
|
||||
DCHECK_EQ(0, CefBrowserContext::DebugObjCt);
|
||||
#endif
|
||||
@@ -190,7 +190,7 @@ void CefBrowserMainParts::PostDestroyThreads() {
|
||||
delete views::ViewsDelegate::GetInstance();
|
||||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
// No CefURLRequestContext instances should exist at this point.
|
||||
DCHECK_EQ(0, CefURLRequestContext::DebugObjCt);
|
||||
#endif
|
||||
|
@@ -8,10 +8,10 @@
|
||||
|
||||
#include "libcef/browser/browser_main.h"
|
||||
|
||||
#include "cef/grit/cef_strings.h"
|
||||
#include "chrome/common/chrome_utility_messages.h"
|
||||
#include "content/public/browser/utility_process_host.h"
|
||||
#include "content/public/browser/utility_process_host_client.h"
|
||||
#include "grit/cef_strings.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/gfx/win/direct_write.h"
|
||||
|
||||
|
@@ -226,7 +226,7 @@ net_log::ChromeNetLog* ChromeBrowserProcessStub::net_log() {
|
||||
|
||||
component_updater::ComponentUpdateService*
|
||||
ChromeBrowserProcessStub::component_updater() {
|
||||
return CefContext::Get()->component_updater();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CRLSetFetcher* ChromeBrowserProcessStub::crl_set_fetcher() {
|
||||
|
@@ -1,304 +0,0 @@
|
||||
// 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.
|
||||
|
||||
#include "libcef/browser/component_updater/cef_component_updater_configurator.h"
|
||||
#include "include/cef_version.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/version.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
|
||||
#include "components/update_client/component_patcher_operation.h"
|
||||
#include "components/component_updater/component_updater_switches.h"
|
||||
#include "components/component_updater/component_updater_url_constants.h"
|
||||
#include "components/update_client/configurator.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "net/url_request/url_request_context_getter.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "base/win/win_util.h"
|
||||
#endif // OS_WIN
|
||||
|
||||
using update_client::Configurator;
|
||||
|
||||
namespace component_updater {
|
||||
|
||||
namespace {
|
||||
|
||||
// Default time constants.
|
||||
const int kDelayOneMinute = 60;
|
||||
const int kDelayOneHour = kDelayOneMinute * 60;
|
||||
|
||||
// Debug values you can pass to --component-updater=value1,value2.
|
||||
// Speed up component checking.
|
||||
const char kSwitchFastUpdate[] = "fast-update";
|
||||
|
||||
// Add "testrequest=1" attribute to the update check request.
|
||||
const char kSwitchRequestParam[] = "test-request";
|
||||
|
||||
// Disables pings. Pings are the requests sent to the update server that report
|
||||
// the success or the failure of component install or update attempts.
|
||||
extern const char kSwitchDisablePings[] = "disable-pings";
|
||||
|
||||
// Sets the URL for updates.
|
||||
const char kSwitchUrlSource[] = "url-source";
|
||||
|
||||
// Disables differential updates.
|
||||
const char kSwitchDisableDeltaUpdates[] = "disable-delta-updates";
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Disables background downloads.
|
||||
const char kSwitchDisableBackgroundDownloads[] = "disable-background-downloads";
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
// Returns true if and only if |test| is contained in |vec|.
|
||||
bool HasSwitchValue(const std::vector<std::string>& vec, const char* test) {
|
||||
if (vec.empty())
|
||||
return 0;
|
||||
return (std::find(vec.begin(), vec.end(), test) != vec.end());
|
||||
}
|
||||
|
||||
// If there is an element of |vec| of the form |test|=.*, returns the right-
|
||||
// hand side of that assignment. Otherwise, returns an empty string.
|
||||
// The right-hand side may contain additional '=' characters, allowing for
|
||||
// further nesting of switch arguments.
|
||||
std::string GetSwitchArgument(const std::vector<std::string>& vec,
|
||||
const char* test) {
|
||||
if (vec.empty())
|
||||
return std::string();
|
||||
for (std::vector<std::string>::const_iterator it = vec.begin();
|
||||
it != vec.end();
|
||||
++it) {
|
||||
const std::size_t found = it->find("=");
|
||||
if (found != std::string::npos) {
|
||||
if (it->substr(0, found) == test) {
|
||||
return it->substr(found + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return std::string();
|
||||
}
|
||||
|
||||
class CefConfigurator : public Configurator {
|
||||
public:
|
||||
CefConfigurator(const base::CommandLine* cmdline,
|
||||
net::URLRequestContextGetter* url_request_getter,
|
||||
PrefService* pref_service);
|
||||
|
||||
int InitialDelay() const override;
|
||||
int NextCheckDelay() const override;
|
||||
int StepDelay() const override;
|
||||
int OnDemandDelay() const override;
|
||||
int UpdateDelay() const override;
|
||||
std::vector<GURL> UpdateUrl() const override;
|
||||
std::vector<GURL> PingUrl() const override;
|
||||
base::Version GetBrowserVersion() const override;
|
||||
std::string GetChannel() const override;
|
||||
std::string GetBrand() const override;
|
||||
std::string GetLang() const override;
|
||||
std::string GetOSLongName() const override;
|
||||
std::string ExtraRequestParams() const override;
|
||||
std::string GetDownloadPreference() const override;
|
||||
net::URLRequestContextGetter* RequestContext() const override;
|
||||
scoped_refptr<update_client::OutOfProcessPatcher>
|
||||
CreateOutOfProcessPatcher() const override;
|
||||
bool DeltasEnabled() const override;
|
||||
bool UseBackgroundDownloader() const override;
|
||||
bool UseCupSigning() const override;
|
||||
scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner()
|
||||
const override;
|
||||
PrefService* GetPrefService() const override;
|
||||
|
||||
private:
|
||||
friend class base::RefCountedThreadSafe<CefConfigurator>;
|
||||
|
||||
~CefConfigurator() override {}
|
||||
|
||||
net::URLRequestContextGetter* url_request_getter_;
|
||||
PrefService* pref_service_;
|
||||
std::string extra_info_;
|
||||
GURL url_source_override_;
|
||||
bool fast_update_;
|
||||
bool pings_enabled_;
|
||||
bool deltas_enabled_;
|
||||
bool background_downloads_enabled_;
|
||||
};
|
||||
|
||||
CefConfigurator::CefConfigurator(
|
||||
const base::CommandLine* cmdline,
|
||||
net::URLRequestContextGetter* url_request_getter,
|
||||
PrefService* pref_service)
|
||||
: url_request_getter_(url_request_getter),
|
||||
pref_service_(pref_service),
|
||||
fast_update_(false),
|
||||
pings_enabled_(false),
|
||||
deltas_enabled_(false),
|
||||
background_downloads_enabled_(false) {
|
||||
// Parse comma-delimited debug flags.
|
||||
std::vector<std::string> switch_values = base::SplitString(
|
||||
cmdline->GetSwitchValueASCII(switches::kComponentUpdater),
|
||||
",", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
|
||||
fast_update_ = HasSwitchValue(switch_values, kSwitchFastUpdate);
|
||||
pings_enabled_ = !HasSwitchValue(switch_values, kSwitchDisablePings);
|
||||
deltas_enabled_ = !HasSwitchValue(switch_values, kSwitchDisableDeltaUpdates);
|
||||
|
||||
// TODO(dberger): Pull this (and possibly the various hard-coded
|
||||
// delay params in this file) from cef settings.
|
||||
fast_update_ = true;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
background_downloads_enabled_ =
|
||||
!HasSwitchValue(switch_values, kSwitchDisableBackgroundDownloads);
|
||||
#else
|
||||
background_downloads_enabled_ = false;
|
||||
#endif
|
||||
|
||||
const std::string switch_url_source =
|
||||
GetSwitchArgument(switch_values, kSwitchUrlSource);
|
||||
if (!switch_url_source.empty()) {
|
||||
url_source_override_ = GURL(switch_url_source);
|
||||
DCHECK(url_source_override_.is_valid());
|
||||
}
|
||||
|
||||
if (HasSwitchValue(switch_values, kSwitchRequestParam))
|
||||
extra_info_ += "testrequest=\"1\"";
|
||||
}
|
||||
|
||||
int CefConfigurator::InitialDelay() const {
|
||||
return fast_update_ ? 10 : (6 * kDelayOneMinute);
|
||||
}
|
||||
|
||||
int CefConfigurator::NextCheckDelay() const {
|
||||
return fast_update_ ? 60 : (6 * kDelayOneHour);
|
||||
}
|
||||
|
||||
int CefConfigurator::StepDelay() const {
|
||||
return fast_update_ ? 1 : 1;
|
||||
}
|
||||
|
||||
int CefConfigurator::OnDemandDelay() const {
|
||||
return fast_update_ ? 2 : (30 * kDelayOneMinute);
|
||||
}
|
||||
|
||||
int CefConfigurator::UpdateDelay() const {
|
||||
return fast_update_ ? 10 : (15 * kDelayOneMinute);
|
||||
}
|
||||
|
||||
std::vector<GURL> CefConfigurator::UpdateUrl() const {
|
||||
std::vector<GURL> urls;
|
||||
if (url_source_override_.is_valid()) {
|
||||
urls.push_back(GURL(url_source_override_));
|
||||
} else {
|
||||
urls.push_back(GURL(kUpdaterDefaultUrl));
|
||||
}
|
||||
return urls;
|
||||
}
|
||||
|
||||
std::vector<GURL> CefConfigurator::PingUrl() const {
|
||||
return pings_enabled_ ? UpdateUrl() : std::vector<GURL>();
|
||||
}
|
||||
|
||||
base::Version CefConfigurator::GetBrowserVersion() const {
|
||||
return base::Version(base::StringPrintf("%d.%d.%d.%d",
|
||||
CHROME_VERSION_MAJOR,
|
||||
CHROME_VERSION_MINOR,
|
||||
CHROME_VERSION_BUILD,
|
||||
CHROME_VERSION_PATCH));
|
||||
}
|
||||
|
||||
std::string CefConfigurator::GetChannel() const {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string CefConfigurator::GetBrand() const {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string CefConfigurator::GetLang() const {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string CefConfigurator::GetOSLongName() const {
|
||||
#if defined(OS_WIN)
|
||||
return "Windows";
|
||||
#elif defined(OS_MACOSX)
|
||||
return "Mac OS X";
|
||||
#elif defined(OS_CHROMEOS)
|
||||
return "Chromium OS";
|
||||
#elif defined(OS_ANDROID)
|
||||
return "Android";
|
||||
#elif defined(OS_LINUX)
|
||||
return "Linux";
|
||||
#elif defined(OS_FREEBSD)
|
||||
return "FreeBSD";
|
||||
#elif defined(OS_OPENBSD)
|
||||
return "OpenBSD";
|
||||
#elif defined(OS_SOLARIS)
|
||||
return "Solaris";
|
||||
#else
|
||||
return "Unknown";
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string CefConfigurator::ExtraRequestParams() const {
|
||||
return extra_info_;
|
||||
}
|
||||
|
||||
std::string CefConfigurator::GetDownloadPreference() const {
|
||||
return std::string();
|
||||
}
|
||||
|
||||
net::URLRequestContextGetter* CefConfigurator::RequestContext() const {
|
||||
return url_request_getter_;
|
||||
}
|
||||
|
||||
scoped_refptr<update_client::OutOfProcessPatcher>
|
||||
CefConfigurator::CreateOutOfProcessPatcher() const {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool CefConfigurator::DeltasEnabled() const {
|
||||
return deltas_enabled_;
|
||||
}
|
||||
|
||||
bool CefConfigurator::UseBackgroundDownloader() const {
|
||||
return background_downloads_enabled_;
|
||||
}
|
||||
|
||||
bool CefConfigurator::UseCupSigning() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
scoped_refptr<base::SequencedTaskRunner>
|
||||
CefConfigurator::GetSequencedTaskRunner() const {
|
||||
return content::BrowserThread::GetBlockingPool()
|
||||
->GetSequencedTaskRunnerWithShutdownBehavior(
|
||||
base::SequencedWorkerPool::GetSequenceToken(),
|
||||
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
|
||||
}
|
||||
|
||||
PrefService* CefConfigurator::GetPrefService() const {
|
||||
return pref_service_;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
scoped_refptr<update_client::Configurator>
|
||||
MakeCefComponentUpdaterConfigurator(
|
||||
const base::CommandLine* cmdline,
|
||||
net::URLRequestContextGetter* context_getter,
|
||||
PrefService* pref_service) {
|
||||
return new CefConfigurator(cmdline, context_getter, pref_service);
|
||||
}
|
||||
|
||||
} // namespace component_updater
|
@@ -1,31 +0,0 @@
|
||||
// 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.
|
||||
|
||||
#ifndef LIBCEF_BROWSER_COMPONENT_UPDATER_CEF_COMPONENT_UPDATER_CONFIGURATOR_H_
|
||||
#define LIBCEF_BROWSER_COMPONENT_UPDATER_CEF_COMPONENT_UPDATER_CONFIGURATOR_H_
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "components/update_client/configurator.h"
|
||||
|
||||
namespace base {
|
||||
class CommandLine;
|
||||
}
|
||||
|
||||
namespace net {
|
||||
class URLRequestContextGetter;
|
||||
}
|
||||
|
||||
class PrefService;
|
||||
|
||||
namespace component_updater {
|
||||
|
||||
scoped_refptr<update_client::Configurator>
|
||||
MakeCefComponentUpdaterConfigurator(
|
||||
const base::CommandLine* cmdline,
|
||||
net::URLRequestContextGetter* context_getter,
|
||||
PrefService* pref_service);
|
||||
|
||||
} // namespace component_updater
|
||||
|
||||
#endif // LIBCEF_BROWSER_COMPONENT_UPDATER_CEF_COMPONENT_UPDATER_CONFIGURATOR_H_
|
@@ -76,6 +76,10 @@
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#include "libcef/common/widevine_loader.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
#include "chrome/browser/spellchecker/spellcheck_message_filter_platform.h"
|
||||
#endif
|
||||
@@ -559,8 +563,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
switches::kPpapiFlashPath,
|
||||
switches::kPpapiFlashVersion,
|
||||
switches::kUncaughtExceptionStackSize,
|
||||
switches::kWidevineCdmPath,
|
||||
switches::kWidevineCdmVersion,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
arraysize(kSwitchNames));
|
||||
@@ -582,17 +584,25 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
if (process_type == switches::kZygoteProcess) {
|
||||
// Propagate the following switches to the zygone command line (along with
|
||||
// Propagate the following switches to the zygote command line (along with
|
||||
// any associated values) if present in the browser command line.
|
||||
static const char* const kSwitchNames[] = {
|
||||
switches::kPpapiFlashPath,
|
||||
switches::kPpapiFlashVersion,
|
||||
switches::kWidevineCdmPath,
|
||||
switches::kWidevineCdmVersion,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
arraysize(kSwitchNames));
|
||||
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
if (!browser_cmd->HasSwitch(switches::kNoSandbox)) {
|
||||
// Pass the Widevine CDM path to the Zygote process. See comments in
|
||||
// CefWidevineLoader::AddPepperPlugins.
|
||||
const base::FilePath& cdm_path = CefWidevineLoader::GetInstance()->path();
|
||||
if (!cdm_path.empty())
|
||||
command_line->AppendSwitchPath(switches::kWidevineCdmPath, cdm_path);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (browser_cmd->HasSwitch(switches::kBrowserSubprocessPath)) {
|
||||
// Force use of the sub-process executable path for the zygote process.
|
||||
const base::FilePath& subprocess_path =
|
||||
|
@@ -10,12 +10,12 @@
|
||||
#include "libcef/browser/browser_main.h"
|
||||
#include "libcef/browser/browser_message_loop.h"
|
||||
#include "libcef/browser/chrome_browser_process_stub.h"
|
||||
#include "libcef/browser/component_updater/cef_component_updater_configurator.h"
|
||||
#include "libcef/browser/content_browser_client.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
#include "libcef/browser/trace_subscriber.h"
|
||||
#include "libcef/common/cef_switches.h"
|
||||
#include "libcef/common/main_delegate.h"
|
||||
#include "libcef/common/widevine_loader.h"
|
||||
#include "libcef/renderer/content_renderer_client.h"
|
||||
|
||||
#include "base/base_switches.h"
|
||||
@@ -24,12 +24,8 @@
|
||||
#include "base/debug/debugger.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
|
||||
#include "chrome/browser/printing/print_job_manager.h"
|
||||
#include "components/component_updater/component_updater_service.h"
|
||||
#include "components/network_session_configurator/switches.h"
|
||||
#include "components/update_client/configurator.h"
|
||||
#include "content/public/app/content_main.h"
|
||||
#include "content/public/app/content_main_runner.h"
|
||||
#include "content/public/browser/notification_service.h"
|
||||
@@ -362,25 +358,6 @@ CefTraceSubscriber* CefContext::GetTraceSubscriber() {
|
||||
return trace_subscriber_.get();
|
||||
}
|
||||
|
||||
component_updater::ComponentUpdateService*
|
||||
CefContext::component_updater() {
|
||||
if (!component_updater_.get()) {
|
||||
CEF_REQUIRE_UIT_RETURN(NULL);
|
||||
scoped_refptr<CefBrowserContextImpl> browser_context =
|
||||
CefContentBrowserClient::Get()->browser_context();
|
||||
scoped_refptr<update_client::Configurator> configurator =
|
||||
component_updater::MakeCefComponentUpdaterConfigurator(
|
||||
base::CommandLine::ForCurrentProcess(),
|
||||
browser_context->request_context().get(),
|
||||
browser_context->GetPrefs());
|
||||
// Creating the component updater does not do anything, components
|
||||
// need to be registered and Start() needs to be called.
|
||||
component_updater_.reset(component_updater::ComponentUpdateServiceFactory(
|
||||
configurator).release());
|
||||
}
|
||||
return component_updater_.get();
|
||||
}
|
||||
|
||||
void CefContext::PopulateRequestContextSettings(
|
||||
CefRequestContextSettings* settings) {
|
||||
CefRefPtr<CefCommandLine> command_line =
|
||||
@@ -395,34 +372,22 @@ void CefContext::PopulateRequestContextSettings(
|
||||
settings->ignore_certificate_errors =
|
||||
settings_.ignore_certificate_errors ||
|
||||
command_line->HasSwitch(switches::kIgnoreCertificateErrors);
|
||||
settings->enable_net_security_expiration =
|
||||
settings_.enable_net_security_expiration ||
|
||||
command_line->HasSwitch(switches::kEnableNetSecurityExpiration);
|
||||
CefString(&settings->accept_language_list) =
|
||||
CefString(&settings_.accept_language_list);
|
||||
}
|
||||
|
||||
void RegisterComponentsForUpdate() {
|
||||
component_updater::ComponentUpdateService* cus =
|
||||
CefContext::Get()->component_updater();
|
||||
|
||||
// Registration can be before or after cus->Start() so it is ok to post
|
||||
// a task to the UI thread to do registration once you done the necessary
|
||||
// file IO to know you existing component version.
|
||||
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kEnableWidevineCdm)) {
|
||||
RegisterWidevineCdmComponent(cus);
|
||||
}
|
||||
#endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
}
|
||||
|
||||
void CefContext::OnContextInitialized() {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
// Must be created after the NotificationService.
|
||||
print_job_manager_.reset(new printing::PrintJobManager());
|
||||
|
||||
bool io_was_allowed = base::ThreadRestrictions::SetIOAllowed(true);
|
||||
RegisterComponentsForUpdate();
|
||||
base::ThreadRestrictions::SetIOAllowed(io_was_allowed);
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
CefWidevineLoader::GetInstance()->OnContextInitialized();
|
||||
#endif
|
||||
|
||||
// Notify the handler.
|
||||
CefRefPtr<CefApp> app = CefContentClient::Get()->application();
|
||||
@@ -449,9 +414,6 @@ void CefContext::FinishShutdownOnUIThread(
|
||||
if (trace_subscriber_.get())
|
||||
trace_subscriber_.reset(NULL);
|
||||
|
||||
if (component_updater_.get())
|
||||
component_updater_.reset(NULL);
|
||||
|
||||
if (uithread_shutdown_event)
|
||||
uithread_shutdown_event->Signal();
|
||||
}
|
||||
|
@@ -18,10 +18,6 @@ namespace base {
|
||||
class WaitableEvent;
|
||||
}
|
||||
|
||||
namespace component_updater {
|
||||
class ComponentUpdateService;
|
||||
}
|
||||
|
||||
namespace content {
|
||||
class ContentMainRunner;
|
||||
}
|
||||
@@ -67,8 +63,6 @@ class CefContext {
|
||||
return print_job_manager_.get();
|
||||
}
|
||||
|
||||
component_updater::ComponentUpdateService* component_updater();
|
||||
|
||||
CefTraceSubscriber* GetTraceSubscriber();
|
||||
|
||||
// Populate the request context settings based on CefSettings and command-
|
||||
@@ -101,9 +95,6 @@ class CefContext {
|
||||
|
||||
// Only accessed on the UI Thread.
|
||||
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
|
||||
|
||||
// Initially only for Widevine components.
|
||||
std::unique_ptr<component_updater::ComponentUpdateService> component_updater_;
|
||||
};
|
||||
|
||||
// Helper macro that returns true if the global context is in a valid state.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "content/public/browser/devtools_agent_host.h"
|
||||
#include "base/time/time.h"
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "components/devtools_discovery/basic_target_descriptor.h"
|
||||
#include "components/devtools_discovery/devtools_discovery_manager.h"
|
||||
#include "content/public/browser/devtools_frontend_host.h"
|
||||
@@ -29,7 +30,6 @@
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "grit/cef_resources.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/socket/tcp_server_socket.h"
|
||||
#include "ui/base/layout.h"
|
||||
|
@@ -320,6 +320,21 @@ void CefDevToolsFrontend::DispatchProtocolMessage(
|
||||
}
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::SetPreferences(const std::string& json) {
|
||||
preferences_.Clear();
|
||||
if (json.empty())
|
||||
return;
|
||||
base::DictionaryValue* dict = nullptr;
|
||||
std::unique_ptr<base::Value> parsed = base::JSONReader::Read(json);
|
||||
if (!parsed || !parsed->GetAsDictionary(&dict))
|
||||
return;
|
||||
for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
|
||||
if (!it.value().IsType(base::Value::TYPE_STRING))
|
||||
continue;
|
||||
preferences_.SetWithoutPathExpansion(it.key(), it.value().CreateDeepCopy());
|
||||
}
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::OnURLFetchComplete(const net::URLFetcher* source) {
|
||||
// TODO(pfeldman): this is a copy of chrome's devtools_ui_bindings.cc.
|
||||
// We should handle some of the commands including this one in content.
|
||||
|
@@ -62,7 +62,7 @@ class CefDevToolsFrontend : public content::WebContentsObserver,
|
||||
bool replaced) override;
|
||||
void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host,
|
||||
const std::string& message) override;
|
||||
base::DictionaryValue* preferences() { return &preferences_; }
|
||||
void SetPreferences(const std::string& json);
|
||||
|
||||
// WebContentsObserver overrides
|
||||
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
|
||||
|
@@ -119,7 +119,7 @@ bool CefExtensionsBrowserClient::AllowCrossRendererResourceLoad(
|
||||
// AllowCrossRendererResourceLoad() in https://crrev.com/5cf9d45c. Figure out
|
||||
// why permission is not being granted based on "web_accessible_resources"
|
||||
// specified in the PDF extension manifest.json file.
|
||||
if (extension->id() == extension_misc::kPdfExtensionId)
|
||||
if (extension && extension->id() == extension_misc::kPdfExtensionId)
|
||||
return true;
|
||||
|
||||
bool allowed = false;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#include "libcef/browser/extensions/pdf_extension_util.h"
|
||||
|
||||
#include "base/strings/string_util.h"
|
||||
#include "grit/cef_resources.h"
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
namespace extensions {
|
||||
|
@@ -359,7 +359,7 @@ void CefFileDialogManager::OnRunFileChooserUploadFolderDelegateCallback(
|
||||
} else {
|
||||
lister_.reset(new net::DirectoryLister(
|
||||
file_paths[0],
|
||||
net::DirectoryLister::NO_SORT,
|
||||
net::DirectoryLister::NO_SORT_RECURSIVE,
|
||||
new UploadFolderHelper(
|
||||
base::Bind(&CefFileDialogManager::OnRunFileChooserDelegateCallback,
|
||||
weak_ptr_factory_.GetWeakPtr(), mode))));
|
||||
|
@@ -329,7 +329,12 @@ gfx::ImageSkia CefImageImpl::GetForced1xScaleRepresentation(
|
||||
|
||||
bool CefImageImpl::AddBitmap(float scale_factor,
|
||||
const SkBitmap& bitmap) {
|
||||
DCHECK(bitmap.readyToDraw());
|
||||
#if DCHECK_IS_ON()
|
||||
{
|
||||
SkAutoLockPixels bitmap_lock(bitmap);
|
||||
DCHECK(bitmap.readyToDraw());
|
||||
}
|
||||
#endif
|
||||
DCHECK(bitmap.colorType() == kBGRA_8888_SkColorType ||
|
||||
bitmap.colorType() == kRGBA_8888_SkColorType);
|
||||
|
||||
|
@@ -14,10 +14,10 @@
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/logging.h"
|
||||
#include "cef/grit/cef_strings.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "grit/cef_strings.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -762,13 +762,13 @@ void CefMenuModelImpl::InsertItemAt(const Item& item, int index) {
|
||||
}
|
||||
|
||||
void CefMenuModelImpl::ValidateItem(const Item& item) {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
if (item.type_ == MENUITEMTYPE_SEPARATOR) {
|
||||
DCHECK_EQ(item.command_id_, kSeparatorId);
|
||||
} else {
|
||||
DCHECK_GE(item.command_id_, 0);
|
||||
}
|
||||
#endif // NDEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
void CefMenuModelImpl::OnMenuClosed() {
|
||||
|
@@ -70,18 +70,6 @@
|
||||
browser_ = browser;
|
||||
|
||||
[window_ setDelegate:self];
|
||||
|
||||
// Register for application hide/unhide notifications.
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(applicationDidHide:)
|
||||
name:NSApplicationDidHideNotification
|
||||
object:nil];
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(applicationDidUnhide:)
|
||||
name:NSApplicationDidUnhideNotification
|
||||
object:nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -92,18 +80,6 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// Called when we are activated (when we gain focus).
|
||||
- (void)windowDidBecomeKey:(NSNotification*)notification {
|
||||
if (browser_)
|
||||
browser_->SetFocus(true);
|
||||
}
|
||||
|
||||
// Called when we are deactivated (when we lose focus).
|
||||
- (void)windowDidResignKey:(NSNotification*)notification {
|
||||
if (browser_)
|
||||
browser_->SetFocus(false);
|
||||
}
|
||||
|
||||
- (BOOL)windowShouldClose:(id)window {
|
||||
if (browser_ && !browser_->TryCloseBrowser()) {
|
||||
// Cancel the close.
|
||||
|
@@ -16,8 +16,8 @@
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "cef/grit/cef_strings.h"
|
||||
#include "content/public/common/file_chooser_params.h"
|
||||
#include "grit/cef_strings.h"
|
||||
#include "net/base/mime_util.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/strings/grit/ui_strings.h"
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/scoped_comptr.h"
|
||||
#include "grit/cef_strings.h"
|
||||
#include "cef/grit/cef_strings.h"
|
||||
#include "net/base/mime_util.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/win/shell.h"
|
||||
|
@@ -26,12 +26,12 @@
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/values.h"
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "components/grit/components_resources.h"
|
||||
#include "content/browser/net/view_http_cache_job_factory.h"
|
||||
#include "content/browser/net/view_blob_internals_job_factory.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "content/public/common/user_agent.h"
|
||||
#include "grit/cef_resources.h"
|
||||
#include "grit/components_resources.h"
|
||||
#include "ipc/ipc_channel.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "ui/base/webui/web_ui_util.h"
|
||||
@@ -281,6 +281,7 @@ class Delegate : public InternalHandlerDelegate {
|
||||
} else {
|
||||
action->mime_type = "text/html";
|
||||
action->resource_id = IDR_ABOUT_UI_CREDITS_HTML;
|
||||
action->encoding = Action::ENCODING_BROTLI;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -11,8 +11,8 @@
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "blink/grit/devtools_resources_map.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "grit/devtools_resources_map.h"
|
||||
|
||||
namespace scheme {
|
||||
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "net/base/mime_util.h"
|
||||
#include "third_party/brotli/dec/decode.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
namespace scheme {
|
||||
@@ -28,7 +29,7 @@ base::FilePath FilePathFromASCII(const std::string& str) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static std::string GetMimeType(const std::string& filename) {
|
||||
std::string GetMimeType(const std::string& filename) {
|
||||
// Requests should not block on the disk! On POSIX this goes to disk.
|
||||
// http://code.google.com/p/chromium/issues/detail?id=59849
|
||||
base::ThreadRestrictions::ScopedAllowIO allow_io;
|
||||
@@ -48,6 +49,24 @@ static std::string GetMimeType(const std::string& filename) {
|
||||
return "text/plain";
|
||||
}
|
||||
|
||||
bool DecodeBrotli(const base::StringPiece& encoded,
|
||||
std::string& decoded) {
|
||||
size_t decoded_size;
|
||||
|
||||
const uint8_t* encoded_response_buffer =
|
||||
reinterpret_cast<const uint8_t*>(encoded.data());
|
||||
if (!BrotliDecompressedSize(encoded.size(), encoded_response_buffer,
|
||||
&decoded_size)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
decoded.resize(decoded_size);
|
||||
return BrotliDecompressBuffer(encoded.size(), encoded_response_buffer,
|
||||
&decoded_size,
|
||||
reinterpret_cast<uint8_t*>(&decoded[0])) ==
|
||||
BROTLI_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
class RedirectHandler : public CefResourceHandler {
|
||||
public:
|
||||
explicit RedirectHandler(const GURL& url)
|
||||
@@ -153,6 +172,16 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory {
|
||||
base::StringPiece piece = CefContentClient::Get()->GetDataResource(
|
||||
action.resource_id, ui::SCALE_FACTOR_NONE);
|
||||
if (!piece.empty()) {
|
||||
std::string decoded;
|
||||
if (action.encoding ==
|
||||
InternalHandlerDelegate::Action::ENCODING_BROTLI &&
|
||||
!DecodeBrotli(piece, decoded)) {
|
||||
decoded = "Unable to decode content!";
|
||||
}
|
||||
|
||||
if (!decoded.empty())
|
||||
piece = base::StringPiece(decoded);
|
||||
|
||||
action.stream =
|
||||
CefStreamReader::CreateForData(const_cast<char*>(piece.data()),
|
||||
piece.size());
|
||||
@@ -183,7 +212,8 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory {
|
||||
|
||||
InternalHandlerDelegate::Action::Action()
|
||||
: stream_size(-1),
|
||||
resource_id(-1) {
|
||||
resource_id(-1),
|
||||
encoding(ENCODING_NONE) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefSchemeHandlerFactory> CreateInternalHandlerFactory(
|
||||
|
@@ -28,8 +28,13 @@ class InternalHandlerDelegate {
|
||||
CefRefPtr<CefStreamReader> stream;
|
||||
int stream_size;
|
||||
|
||||
// Option 2: Specify a resource id to load static content.
|
||||
// Option 2: Specify a resource id to load static content. May include an
|
||||
// optional encoding type.
|
||||
int resource_id;
|
||||
enum Encoding {
|
||||
ENCODING_NONE,
|
||||
ENCODING_BROTLI,
|
||||
} encoding;
|
||||
|
||||
// Option 3: Redirect to the specified URL.
|
||||
GURL redirect_url;
|
||||
|
@@ -4,18 +4,18 @@
|
||||
|
||||
#include "libcef/browser/net/url_request_context.h"
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
base::AtomicRefCount CefURLRequestContext::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
CefURLRequestContext::CefURLRequestContext() {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
base::AtomicRefCountInc(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
||||
CefURLRequestContext::~CefURLRequestContext() {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
base::AtomicRefCountDec(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#define CEF_LIBCEF_BROWSER_NET_URL_REQUEST_CONTEXT_H_
|
||||
#pragma once
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
|
||||
// Owns URLRequest instances and provides access to network-related
|
||||
@@ -18,7 +19,7 @@ class CefURLRequestContext : public net::URLRequestContext {
|
||||
CefURLRequestContext();
|
||||
~CefURLRequestContext() override;
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
// Simple tracking of allocated objects.
|
||||
static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int)
|
||||
#endif
|
||||
|
@@ -34,6 +34,8 @@
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "net/cert/cert_verifier.h"
|
||||
#include "net/cert/ct_known_logs.h"
|
||||
#include "net/cert/ct_log_verifier.h"
|
||||
#include "net/cert/ct_policy_enforcer.h"
|
||||
#include "net/cert/multi_log_ct_verifier.h"
|
||||
#include "net/cookies/cookie_monster.h"
|
||||
@@ -207,12 +209,25 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
|
||||
|
||||
storage_->set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
|
||||
storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
|
||||
storage_->set_transport_security_state(
|
||||
base::WrapUnique(new net::TransportSecurityState));
|
||||
storage_->set_cert_transparency_verifier(
|
||||
base::WrapUnique(new net::MultiLogCTVerifier));
|
||||
storage_->set_ct_policy_enforcer(
|
||||
base::WrapUnique(new net::CTPolicyEnforcer));
|
||||
|
||||
std::unique_ptr<net::TransportSecurityState> transport_security_state(
|
||||
new net::TransportSecurityState);
|
||||
transport_security_state->set_enforce_net_security_expiration(
|
||||
settings_.enable_net_security_expiration ? true : false);
|
||||
storage_->set_transport_security_state(std::move(transport_security_state));
|
||||
|
||||
std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs(
|
||||
net::ct::CreateLogVerifiersForKnownLogs());
|
||||
std::unique_ptr<net::MultiLogCTVerifier> ct_verifier(
|
||||
new net::MultiLogCTVerifier());
|
||||
ct_verifier->AddLogs(ct_logs);
|
||||
storage_->set_cert_transparency_verifier(std::move(ct_verifier));
|
||||
|
||||
std::unique_ptr<net::CTPolicyEnforcer> ct_policy_enforcer(
|
||||
new net::CTPolicyEnforcer);
|
||||
ct_policy_enforcer->set_enforce_net_security_expiration(
|
||||
settings_.enable_net_security_expiration ? true : false);
|
||||
storage_->set_ct_policy_enforcer(std::move(ct_policy_enforcer));
|
||||
|
||||
std::unique_ptr<net::ProxyService> system_proxy_service =
|
||||
ProxyServiceFactory::CreateProxyService(
|
||||
@@ -247,11 +262,14 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
|
||||
storage_->set_http_server_properties(base::WrapUnique(
|
||||
new net::HttpServerPropertiesImpl));
|
||||
|
||||
base::FilePath http_cache_path;
|
||||
if (!cache_path.empty())
|
||||
http_cache_path = cache_path.Append(FILE_PATH_LITERAL("Cache"));
|
||||
std::unique_ptr<net::HttpCache::DefaultBackend> main_backend(
|
||||
new net::HttpCache::DefaultBackend(
|
||||
cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE,
|
||||
net::CACHE_BACKEND_DEFAULT,
|
||||
cache_path,
|
||||
http_cache_path,
|
||||
0,
|
||||
BrowserThread::GetMessageLoopProxyForThread(
|
||||
BrowserThread::CACHE)));
|
||||
|
@@ -274,7 +274,7 @@ net::URLRequestJob* CefURLRequestManager::GetRequestJob(
|
||||
job = GetBuiltinSchemeRequestJob(request, network_delegate, scheme);
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
if (job)
|
||||
DLOG(INFO) << "CefURLRequestManager hit for " << request->url().spec();
|
||||
#endif
|
||||
|
@@ -45,12 +45,6 @@ const float kDefaultScaleFactor = 1.0;
|
||||
// The maximum number of retry counts if frame capture fails.
|
||||
const int kFrameRetryLimit = 2;
|
||||
|
||||
// When accelerated compositing is enabled and a widget resize is pending,
|
||||
// we delay further resizes of the UI. The following constant is the maximum
|
||||
// length of time that we should delay further UI resizes while waiting for a
|
||||
// resized frame from a renderer.
|
||||
const int kResizeLockTimeoutMs = 67;
|
||||
|
||||
static blink::WebScreenInfo webScreenInfoFrom(const CefScreenInfo& src) {
|
||||
blink::WebScreenInfo webScreenInfo;
|
||||
webScreenInfo.deviceScaleFactor = src.device_scale_factor;
|
||||
@@ -67,6 +61,14 @@ static blink::WebScreenInfo webScreenInfoFrom(const CefScreenInfo& src) {
|
||||
return webScreenInfo;
|
||||
}
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
|
||||
// When accelerated compositing is enabled and a widget resize is pending,
|
||||
// we delay further resizes of the UI. The following constant is the maximum
|
||||
// length of time that we should delay further UI resizes while waiting for a
|
||||
// resized frame from a renderer.
|
||||
const int kResizeLockTimeoutMs = 67;
|
||||
|
||||
// Used to prevent further resizes while a resize is pending.
|
||||
class CefResizeLock : public content::ResizeLock {
|
||||
public:
|
||||
@@ -124,6 +126,8 @@ class CefResizeLock : public content::ResizeLock {
|
||||
DISALLOW_COPY_AND_ASSIGN(CefResizeLock);
|
||||
};
|
||||
|
||||
#endif // !defined(OS_MACOSX)
|
||||
|
||||
} // namespace
|
||||
|
||||
// Used for managing copy requests when GPU compositing is enabled. Based on
|
||||
@@ -202,8 +206,7 @@ class CefCopyFrameGenerator {
|
||||
damage_rect));
|
||||
|
||||
request->set_area(gfx::Rect(view_->GetPhysicalBackingSize()));
|
||||
view_->DelegatedFrameHostGetLayer()->RequestCopyOfOutput(
|
||||
std::move(request));
|
||||
view_->GetRootLayer()->RequestCopyOfOutput(std::move(request));
|
||||
}
|
||||
|
||||
void CopyFromCompositingSurfaceHasResult(
|
||||
@@ -1035,10 +1038,7 @@ CefRenderWidgetHostViewOSR::CreateSoftwareOutputDevice(
|
||||
return base::WrapUnique(software_output_device_);
|
||||
}
|
||||
|
||||
int CefRenderWidgetHostViewOSR::DelegatedFrameHostGetGpuMemoryBufferClientId()
|
||||
const {
|
||||
return render_widget_host_->GetProcess()->GetID();
|
||||
}
|
||||
#if !defined(OS_MACOSX)
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::DelegatedFrameHostGetLayer() const {
|
||||
return GetRootLayer();
|
||||
@@ -1118,6 +1118,12 @@ void CefRenderWidgetHostViewOSR::SetBeginFrameSource(
|
||||
// See https://codereview.chromium.org/1841083007.
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::IsAutoResizeEnabled() const {
|
||||
return render_widget_host_->auto_resize_enabled();
|
||||
}
|
||||
|
||||
#endif // !defined(OS_MACOSX)
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::InstallTransparency() {
|
||||
if (transparent_) {
|
||||
SetBackgroundColor(SkColor());
|
||||
@@ -1332,18 +1338,20 @@ void CefRenderWidgetHostViewOSR::RemoveGuestHostView(
|
||||
}
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
|
||||
ui::Compositor* CefRenderWidgetHostViewOSR::GetCompositor() const {
|
||||
return compositor_.get();
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
||||
return root_layer_.get();
|
||||
}
|
||||
|
||||
content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost()
|
||||
const {
|
||||
return delegated_frame_host_.get();
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
||||
return root_layer_.get();
|
||||
}
|
||||
#endif // !defined(OS_MACOSX)
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetFrameRate() {
|
||||
@@ -1423,6 +1431,7 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
||||
|
||||
GetRootLayer()->SetBounds(gfx::Rect(size));
|
||||
GetCompositor()->SetScaleAndSize(scale_factor_, size_in_pixels);
|
||||
PlatformResizeCompositorWidget(size_in_pixels);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::OnBeginFrameTimerTick() {
|
||||
|
@@ -76,13 +76,16 @@ class CefWindowX11;
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
class AcceleratedWidgetMacNSViewHelper;
|
||||
class MacHelper;
|
||||
#endif
|
||||
|
||||
class CefRenderWidgetHostViewOSR
|
||||
: public content::RenderWidgetHostViewBase,
|
||||
public ui::CompositorDelegate,
|
||||
public content::DelegatedFrameHostClient {
|
||||
public ui::CompositorDelegate
|
||||
#if !defined(OS_MACOSX)
|
||||
, public content::DelegatedFrameHostClient
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
CefRenderWidgetHostViewOSR(const bool transparent,
|
||||
content::RenderWidgetHost* widget,
|
||||
@@ -190,8 +193,8 @@ class CefRenderWidgetHostViewOSR
|
||||
std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
|
||||
ui::Compositor* compositor) override;
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
// DelegatedFrameHostClient implementation.
|
||||
virtual int DelegatedFrameHostGetGpuMemoryBufferClientId() const override;
|
||||
ui::Layer* DelegatedFrameHostGetLayer() const override;
|
||||
bool DelegatedFrameHostIsVisible() const override;
|
||||
SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override;
|
||||
@@ -211,6 +214,8 @@ class CefRenderWidgetHostViewOSR
|
||||
const base::TimeTicks& timebase,
|
||||
const base::TimeDelta& interval) override;
|
||||
void SetBeginFrameSource(cc::BeginFrameSource* source) override;
|
||||
bool IsAutoResizeEnabled() const override;
|
||||
#endif // !defined(OS_MACOSX)
|
||||
|
||||
bool InstallTransparency();
|
||||
|
||||
@@ -267,10 +272,10 @@ class CefRenderWidgetHostViewOSR
|
||||
ui::Compositor* GetCompositor() const;
|
||||
content::RenderWidgetHostImpl* render_widget_host() const
|
||||
{ return render_widget_host_; }
|
||||
ui::Layer* GetRootLayer() const;
|
||||
|
||||
private:
|
||||
content::DelegatedFrameHost* GetDelegatedFrameHost() const;
|
||||
ui::Layer* GetRootLayer() const;
|
||||
|
||||
void SetFrameRate();
|
||||
void SetDeviceScaleFactor();
|
||||
@@ -286,7 +291,7 @@ class CefRenderWidgetHostViewOSR
|
||||
void OnScrollOffsetChanged();
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
friend class AcceleratedWidgetMacNSViewHelper;
|
||||
friend class MacHelper;
|
||||
|
||||
// Returns composition character boundary rectangle. The |range| is
|
||||
// composition based range. Also stores |actual_range| which is corresponding
|
||||
@@ -310,6 +315,7 @@ class CefRenderWidgetHostViewOSR
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
void PlatformCreateCompositorWidget();
|
||||
void PlatformResizeCompositorWidget(const gfx::Size& size);
|
||||
void PlatformDestroyCompositorWidget();
|
||||
|
||||
#if defined(USE_AURA)
|
||||
@@ -334,7 +340,7 @@ class CefRenderWidgetHostViewOSR
|
||||
NSWindow* window_;
|
||||
CALayer* background_layer_;
|
||||
std::unique_ptr<content::BrowserCompositorMac> browser_compositor_;
|
||||
AcceleratedWidgetMacNSViewHelper* accelerated_widget_helper_;
|
||||
MacHelper* mac_helper_;
|
||||
#elif defined(USE_X11)
|
||||
CefWindowX11* window_;
|
||||
std::unique_ptr<ui::XScopedCursor> invisible_cursor_;
|
||||
|
@@ -123,6 +123,9 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
||||
compositor_widget_ = window_->xwindow();
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size&) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||
DCHECK(window_);
|
||||
window_->Close();
|
||||
|
@@ -32,12 +32,67 @@ CefTextInputClientOSRMac* GetInputClientFromContext(
|
||||
} // namespace
|
||||
|
||||
|
||||
class AcceleratedWidgetMacNSViewHelper : public ui::AcceleratedWidgetMacNSView {
|
||||
class MacHelper :
|
||||
public content::BrowserCompositorMacClient,
|
||||
public ui::AcceleratedWidgetMacNSView {
|
||||
public:
|
||||
explicit AcceleratedWidgetMacNSViewHelper(CefRenderWidgetHostViewOSR* view)
|
||||
explicit MacHelper(CefRenderWidgetHostViewOSR* view)
|
||||
: view_(view) {
|
||||
}
|
||||
virtual ~AcceleratedWidgetMacNSViewHelper() {}
|
||||
virtual ~MacHelper() {}
|
||||
|
||||
// BrowserCompositorMacClient methods:
|
||||
|
||||
NSView* BrowserCompositorMacGetNSView() const override {
|
||||
// Intentionally return nil so that
|
||||
// BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP uses the layer
|
||||
// size instead of the NSView size.
|
||||
return nil;
|
||||
}
|
||||
|
||||
SkColor BrowserCompositorMacGetGutterColor(SkColor color) const override {
|
||||
// When making an element on the page fullscreen the element's background
|
||||
// may not match the page's, so use black as the gutter color to avoid
|
||||
// flashes of brighter colors during the transition.
|
||||
if (view_->render_widget_host()->delegate() &&
|
||||
view_->render_widget_host()->delegate()->IsFullscreenForCurrentTab()) {
|
||||
return SK_ColorBLACK;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
void BrowserCompositorMacSendCompositorSwapAck(
|
||||
int output_surface_id,
|
||||
const cc::CompositorFrameAck& ack) override {
|
||||
view_->render_widget_host()->Send(new ViewMsg_SwapCompositorFrameAck(
|
||||
view_->render_widget_host()->GetRoutingID(), output_surface_id, ack));
|
||||
}
|
||||
|
||||
void BrowserCompositorMacSendReclaimCompositorResources(
|
||||
int output_surface_id,
|
||||
const cc::CompositorFrameAck& ack) override {
|
||||
view_->render_widget_host()->Send(new ViewMsg_ReclaimCompositorResources(
|
||||
view_->render_widget_host()->GetRoutingID(), output_surface_id, ack));
|
||||
}
|
||||
|
||||
void BrowserCompositorMacOnLostCompositorResources() override {
|
||||
view_->render_widget_host()->ScheduleComposite();
|
||||
}
|
||||
|
||||
void BrowserCompositorMacUpdateVSyncParameters(
|
||||
const base::TimeTicks& timebase,
|
||||
const base::TimeDelta& interval) override {
|
||||
view_->render_widget_host()->UpdateVSyncParameters(timebase, interval);
|
||||
}
|
||||
|
||||
void BrowserCompositorMacSendBeginFrame(
|
||||
const cc::BeginFrameArgs& args) override {
|
||||
view_->render_widget_host()->Send(
|
||||
new ViewMsg_BeginFrame(view_->render_widget_host()->GetRoutingID(),
|
||||
args));
|
||||
}
|
||||
|
||||
// AcceleratedWidgetMacNSView methods:
|
||||
|
||||
NSView* AcceleratedWidgetGetNSView() const override {
|
||||
return [view_->window_ contentView];
|
||||
@@ -56,7 +111,7 @@ class AcceleratedWidgetMacNSViewHelper : public ui::AcceleratedWidgetMacNSView {
|
||||
// Guaranteed to outlive this object.
|
||||
CefRenderWidgetHostViewOSR* view_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AcceleratedWidgetMacNSViewHelper);
|
||||
DISALLOW_COPY_AND_ASSIGN(MacHelper);
|
||||
};
|
||||
|
||||
|
||||
@@ -311,15 +366,15 @@ ui::Compositor* CefRenderWidgetHostViewOSR::GetCompositor() const {
|
||||
return browser_compositor_->GetCompositor();
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
||||
return browser_compositor_->GetRootLayer();
|
||||
}
|
||||
|
||||
content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost()
|
||||
const {
|
||||
return browser_compositor_->GetDelegatedFrameHost();
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
||||
return browser_compositor_->GetRootLayer();
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
||||
// Create a borderless non-visible 1x1 window.
|
||||
window_ = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1)
|
||||
@@ -334,17 +389,17 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
||||
[content_view setLayer:background_layer_];
|
||||
[content_view setWantsLayer:YES];
|
||||
|
||||
accelerated_widget_helper_ = new AcceleratedWidgetMacNSViewHelper(this);
|
||||
mac_helper_ = new MacHelper(this);
|
||||
browser_compositor_.reset(new content::BrowserCompositorMac(
|
||||
accelerated_widget_helper_, this, render_widget_host_->is_hidden(),
|
||||
true));
|
||||
mac_helper_, mac_helper_, render_widget_host_->is_hidden(), true));
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size&) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||
DCHECK(window_);
|
||||
|
||||
browser_compositor_->Destroy();
|
||||
|
||||
[window_ close];
|
||||
window_ = nil;
|
||||
[background_layer_ release];
|
||||
@@ -352,6 +407,6 @@ void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||
|
||||
browser_compositor_.reset();
|
||||
|
||||
delete accelerated_widget_helper_;
|
||||
accelerated_widget_helper_ = nullptr;
|
||||
delete mac_helper_;
|
||||
mac_helper_ = nullptr;
|
||||
}
|
||||
|
@@ -10,8 +10,8 @@
|
||||
#include "libcef/browser/browser_host_impl.h"
|
||||
#include "libcef/browser/content_browser_client.h"
|
||||
|
||||
#include "grit/ui_unscaled_resources.h"
|
||||
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
|
||||
#include "ui/resources/grit/ui_unscaled_resources.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -149,6 +149,12 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
||||
compositor_widget_ = window_->hwnd();
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size& size) {
|
||||
DCHECK(window_);
|
||||
SetWindowPos(window_->hwnd(), NULL, 0, 0, size.width(), size.height(),
|
||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||
window_.reset(NULL);
|
||||
compositor_widget_ = gfx::kNullAcceleratedWidget;
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/values.h"
|
||||
#include "cef/grit/cef_strings.h"
|
||||
#include "chrome/browser/prefs/command_line_pref_store.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
@@ -29,7 +30,6 @@
|
||||
#include "components/update_client/update_client.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "extensions/browser/extension_prefs.h"
|
||||
#include "grit/cef_strings.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
|
||||
namespace browser_prefs {
|
||||
|
@@ -3,8 +3,10 @@
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "libcef/browser/web_plugin_impl.h"
|
||||
|
||||
#include "libcef/browser/context.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
#include "libcef/common/widevine_loader.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/files/file_path.h"
|
||||
@@ -28,6 +30,22 @@ void PluginsCallbackImpl(
|
||||
}
|
||||
}
|
||||
|
||||
#if !(defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)) || \
|
||||
defined(OS_LINUX)
|
||||
|
||||
void DeliverWidevineCdmError(const std::string& error_message,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback) {
|
||||
LOG(ERROR) << error_message;
|
||||
if (callback.get()) {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::Bind(&CefRegisterCdmCallback::OnCdmRegistrationComplete,
|
||||
callback.get(), CEF_CDM_REGISTRATION_ERROR_NOT_SUPPORTED,
|
||||
error_message));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -150,3 +168,24 @@ void CefIsWebPluginUnstable(
|
||||
CEF_POST_TASK(CEF_IOT, base::Bind(CefIsWebPluginUnstable, path, callback));
|
||||
}
|
||||
}
|
||||
|
||||
void CefRegisterWidevineCdm(const CefString& path,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback) {
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
#if defined(OS_LINUX)
|
||||
// Enforce the requirement that CefRegisterWidevineCdm() is called before
|
||||
// CefInitialize() on Linux. See comments in
|
||||
// CefWidevineLoader::AddPepperPlugins for details.
|
||||
if (CONTEXT_STATE_VALID()) {
|
||||
DeliverWidevineCdmError(
|
||||
"Widevine registration is not supported after context initialization",
|
||||
callback);
|
||||
return;
|
||||
}
|
||||
#endif // defined(OS_LINUX)
|
||||
|
||||
CefWidevineLoader::GetInstance()->LoadWidevineCdm(path, callback);
|
||||
#else
|
||||
DeliverWidevineCdmError("Widevine registration is not supported", callback);
|
||||
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
}
|
||||
|
@@ -106,15 +106,9 @@ const char kDisableScrollBounce[] = "disable-scroll-bounce";
|
||||
// Disable the PDF extension.
|
||||
const char kDisablePdfExtension[] = "disable-pdf-extension";
|
||||
|
||||
// Enable Widevine CDM.
|
||||
const char kEnableWidevineCdm[] = "enable-widevine-cdm";
|
||||
|
||||
// Path to Widevine CDM binaries.
|
||||
const char kWidevineCdmPath[] = "widevine-cdm-path";
|
||||
|
||||
// Widevine CDM version.
|
||||
const char kWidevineCdmVersion[] = "widevine-cdm-version";
|
||||
|
||||
// Default plugin policy action.
|
||||
const char kPluginPolicy[] = "plugin-policy";
|
||||
// Allow the content. This is the default value.
|
||||
@@ -128,4 +122,7 @@ const char kPluginPolicy_Block[] = "block";
|
||||
// Expose preferences used only by unit tests.
|
||||
const char kEnablePreferenceTesting[] = "enable-preference-testing";
|
||||
|
||||
// Enable date-based expiration of built in network security information.
|
||||
const char kEnableNetSecurityExpiration[] = "enable-net-security-expiration";
|
||||
|
||||
} // namespace switches
|
||||
|
@@ -45,14 +45,13 @@ extern const char kOverrideSpellCheckLang[];
|
||||
extern const char kEnableSystemFlash[];
|
||||
extern const char kDisableScrollBounce[];
|
||||
extern const char kDisablePdfExtension[];
|
||||
extern const char kEnableWidevineCdm[];
|
||||
extern const char kWidevineCdmPath[];
|
||||
extern const char kWidevineCdmVersion[];
|
||||
extern const char kPluginPolicy[];
|
||||
extern const char kPluginPolicy_Allow[];
|
||||
extern const char kPluginPolicy_Detect[];
|
||||
extern const char kPluginPolicy_Block[];
|
||||
extern const char kEnablePreferenceTesting[];
|
||||
extern const char kEnableNetSecurityExpiration[];
|
||||
|
||||
} // namespace switches
|
||||
|
||||
|
@@ -37,12 +37,8 @@
|
||||
#include "ppapi/shared_impl/ppapi_permissions.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
|
||||
|
||||
// The following must be after widevine_cdm_version.h.
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \
|
||||
!defined(WIDEVINE_CDM_IS_COMPONENT)
|
||||
#include "chrome/common/widevine_cdm_constants.h"
|
||||
#if defined(OS_LINUX)
|
||||
#include "libcef/common/widevine_loader.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
@@ -182,67 +178,6 @@ bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddWidevineCdmFromCommandLine(
|
||||
std::vector<content::PepperPluginInfo>* plugins) {
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \
|
||||
!defined(WIDEVINE_CDM_IS_COMPONENT)
|
||||
static bool skip_widevine_cdm_file_check = false;
|
||||
|
||||
base::FilePath widevine_cdm_path =
|
||||
base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(
|
||||
switches::kWidevineCdmPath);
|
||||
if (!widevine_cdm_path.empty()) {
|
||||
widevine_cdm_path =
|
||||
widevine_cdm_path.AppendASCII(kWidevineCdmAdapterFileName);
|
||||
}
|
||||
|
||||
// Also get the version from the command-line. Should be something like
|
||||
// 1.4.8.824.
|
||||
const std::string& widevine_cdm_version =
|
||||
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
||||
switches::kWidevineCdmVersion);
|
||||
|
||||
if (!widevine_cdm_path.empty() && !widevine_cdm_version.empty()) {
|
||||
if (skip_widevine_cdm_file_check || base::PathExists(widevine_cdm_path)) {
|
||||
content::PepperPluginInfo widevine_cdm;
|
||||
widevine_cdm.is_out_of_process = true;
|
||||
widevine_cdm.path = widevine_cdm_path;
|
||||
widevine_cdm.name = kWidevineCdmDisplayName;
|
||||
widevine_cdm.description = kWidevineCdmDescription +
|
||||
std::string(" (version: ") +
|
||||
widevine_cdm_version + ")";
|
||||
widevine_cdm.version = widevine_cdm_version;
|
||||
content::WebPluginMimeType widevine_cdm_mime_type(
|
||||
kWidevineCdmPluginMimeType,
|
||||
kWidevineCdmPluginExtension,
|
||||
kWidevineCdmPluginMimeTypeDescription);
|
||||
|
||||
// Add the supported codecs as if they came from the component manifest.
|
||||
// This list must match the CDM that is being shipped with Chrome.
|
||||
std::vector<std::string> codecs;
|
||||
codecs.push_back(kCdmSupportedCodecVp8);
|
||||
codecs.push_back(kCdmSupportedCodecVp9);
|
||||
#if defined(USE_PROPRIETARY_CODECS)
|
||||
codecs.push_back(kCdmSupportedCodecAvc1);
|
||||
#endif // defined(USE_PROPRIETARY_CODECS)
|
||||
std::string codec_string = base::JoinString(
|
||||
codecs, std::string(1, kCdmSupportedCodecsValueDelimiter));
|
||||
widevine_cdm_mime_type.additional_param_names.push_back(
|
||||
base::ASCIIToUTF16(kCdmSupportedCodecsParamName));
|
||||
widevine_cdm_mime_type.additional_param_values.push_back(
|
||||
base::ASCIIToUTF16(codec_string));
|
||||
|
||||
widevine_cdm.mime_types.push_back(widevine_cdm_mime_type);
|
||||
widevine_cdm.permissions = kWidevineCdmPluginPermissions;
|
||||
plugins->push_back(widevine_cdm);
|
||||
|
||||
skip_widevine_cdm_file_check = true;
|
||||
}
|
||||
}
|
||||
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) &&
|
||||
// !defined(WIDEVINE_CDM_IS_COMPONENT)
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
const char CefContentClient::kPDFPluginPath[] = "internal-pdf-viewer";
|
||||
@@ -269,7 +204,12 @@ void CefContentClient::AddPepperPlugins(
|
||||
std::vector<content::PepperPluginInfo>* plugins) {
|
||||
ComputeBuiltInPlugins(plugins);
|
||||
AddPepperFlashFromCommandLine(plugins);
|
||||
AddWidevineCdmFromCommandLine(plugins);
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
CefWidevineLoader::AddPepperPlugins(plugins);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
content::PepperPluginInfo plugin;
|
||||
if (GetSystemPepperFlash(&plugin))
|
||||
|
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/logging.h"
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "cef/libcef/common/extensions/api/generated_schemas.h"
|
||||
#include "extensions/common/api/generated_schemas.h"
|
||||
#include "extensions/common/common_manifest_handlers.h"
|
||||
@@ -27,8 +28,7 @@
|
||||
#include "extensions/common/permissions/permissions_info.h"
|
||||
#include "extensions/common/permissions/permissions_provider.h"
|
||||
#include "extensions/common/url_pattern_set.h"
|
||||
#include "grit/cef_resources.h"
|
||||
#include "grit/extensions_resources.h"
|
||||
#include "extensions/grit/extensions_resources.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
|
@@ -40,8 +40,6 @@
|
||||
#include "ui/base/ui_base_paths.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
|
||||
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
|
||||
|
||||
#include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
|
||||
|
||||
#if defined(IPC_MESSAGE_LOG_ENABLED)
|
||||
@@ -558,22 +556,6 @@ void CefMainDelegate::PreSandboxStartup() {
|
||||
user_data_path.AppendASCII("Dictionaries"),
|
||||
false, // May not be an absolute path.
|
||||
true); // Create if necessary.
|
||||
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
const base::FilePath& widevine_plugin_path =
|
||||
GetResourcesFilePath().AppendASCII(kWidevineCdmAdapterFileName);
|
||||
if (base::PathExists(widevine_plugin_path)) {
|
||||
PathService::Override(chrome::FILE_WIDEVINE_CDM_ADAPTER,
|
||||
widevine_plugin_path);
|
||||
}
|
||||
#if defined(WIDEVINE_CDM_IS_COMPONENT)
|
||||
if (command_line->HasSwitch(switches::kEnableWidevineCdm)) {
|
||||
PathService::Override(
|
||||
chrome::DIR_COMPONENT_WIDEVINE_CDM,
|
||||
user_data_path.Append(FILE_PATH_LITERAL("WidevineCDM")));
|
||||
}
|
||||
#endif // defined(WIDEVINE_CDM_IS_COMPONENT)
|
||||
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
}
|
||||
|
||||
if (command_line->HasSwitch(switches::kDisablePackLoading))
|
||||
|
406
libcef/common/widevine_loader.cc
Normal file
406
libcef/common/widevine_loader.cc
Normal file
@@ -0,0 +1,406 @@
|
||||
// Copyright 2016 The Chromium Embedded Framework Authors. Portions copyright
|
||||
// 2013 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.
|
||||
|
||||
#include "libcef/common/widevine_loader.h"
|
||||
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
|
||||
#include "libcef/browser/context.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
#include "libcef/common/cef_switches.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/json/json_string_value_serializer.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/native_library.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/common/widevine_cdm_constants.h"
|
||||
#include "content/browser/plugin_service_impl.h"
|
||||
#include "content/public/browser/cdm_service.h"
|
||||
#include "content/public/common/cdm_info.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "media/cdm/supported_cdm_versions.h"
|
||||
|
||||
namespace {
|
||||
|
||||
base::LazyInstance<CefWidevineLoader>::Leaky g_widevine_loader =
|
||||
LAZY_INSTANCE_INITIALIZER;
|
||||
|
||||
|
||||
// Based on chrome/browser/component_updater/widevine_cdm_component_installer.cc
|
||||
|
||||
// Name of the Widevine CDM OS in the component manifest.
|
||||
const char kWidevineCdmOs[] =
|
||||
#if defined(OS_MACOSX)
|
||||
"mac";
|
||||
#elif defined(OS_WIN)
|
||||
"win";
|
||||
#else // OS_LINUX, etc. TODO(viettrungluu): Separate out Chrome OS and Android?
|
||||
"linux";
|
||||
#endif
|
||||
|
||||
// Name of the Widevine CDM architecture in the component manifest.
|
||||
const char kWidevineCdmArch[] =
|
||||
#if defined(ARCH_CPU_X86)
|
||||
"ia32"; // This differs from the component updater which uses "x86".
|
||||
#elif defined(ARCH_CPU_X86_64)
|
||||
"x64";
|
||||
#else // TODO(viettrungluu): Support an ARM check?
|
||||
"???";
|
||||
#endif
|
||||
|
||||
// The CDM OS and architecture.
|
||||
const char kCdmOsName[] = "os";
|
||||
const char kCdmArchName[] = "arch";
|
||||
|
||||
// The CDM version (e.g. "1.4.8.903").
|
||||
const char kCdmVersionName[] = "version";
|
||||
|
||||
// The CDM manifest includes several custom values, all beginning with "x-cdm-".
|
||||
// All values are strings.
|
||||
// All values that are lists are delimited by commas. No trailing commas.
|
||||
// For example, "1,2,4".
|
||||
const char kCdmValueDelimiter = ',';
|
||||
static_assert(kCdmValueDelimiter == kCdmSupportedCodecsValueDelimiter,
|
||||
"cdm delimiters must match");
|
||||
// The following entries are required.
|
||||
// Interface versions are lists of integers (e.g. "1" or "1,2,4").
|
||||
// These are checked in this file before registering the CDM.
|
||||
// All match the interface versions from content_decryption_module.h that the
|
||||
// CDM supports.
|
||||
// Matches CDM_MODULE_VERSION.
|
||||
const char kCdmModuleVersionsName[] = "x-cdm-module-versions";
|
||||
// Matches supported ContentDecryptionModule_* version(s).
|
||||
const char kCdmInterfaceVersionsName[] = "x-cdm-interface-versions";
|
||||
// Matches supported Host_* version(s).
|
||||
const char kCdmHostVersionsName[] = "x-cdm-host-versions";
|
||||
// The codecs list is a list of simple codec names (e.g. "vp8,vorbis").
|
||||
// The list is passed to other parts of Chrome.
|
||||
const char kCdmCodecsListName[] = "x-cdm-codecs";
|
||||
|
||||
std::unique_ptr<base::DictionaryValue> ParseManifestFile(
|
||||
const base::FilePath& manifest_path) {
|
||||
CEF_REQUIRE_FILET();
|
||||
|
||||
// Manifest file should be < 1kb. Read at most 2kb.
|
||||
std::string manifest_contents;
|
||||
if (!base::ReadFileToStringWithMaxSize(manifest_path, &manifest_contents,
|
||||
2048)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
JSONStringValueDeserializer deserializer(manifest_contents);
|
||||
std::unique_ptr<base::Value> manifest(deserializer.Deserialize(NULL, NULL));
|
||||
|
||||
if (!manifest.get() || !manifest->IsType(base::Value::TYPE_DICTIONARY))
|
||||
return nullptr;
|
||||
|
||||
// Transfer ownership to the caller.
|
||||
return base::WrapUnique(
|
||||
static_cast<base::DictionaryValue*>(manifest.release()));
|
||||
}
|
||||
|
||||
std::string GetManifestValue(const base::DictionaryValue& manifest,
|
||||
const std::string& key,
|
||||
std::string* error_message) {
|
||||
std::stringstream ss;
|
||||
std::string value;
|
||||
if (!manifest.GetString(key, &value)) {
|
||||
ss << "Manifest missing " << key;
|
||||
*error_message = ss.str();
|
||||
} else if (value.empty()) {
|
||||
ss << "Manifest has empty " << key;
|
||||
*error_message = ss.str();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
typedef bool (*VersionCheckFunc)(int version);
|
||||
|
||||
bool CheckForCompatibleVersion(const base::DictionaryValue& manifest,
|
||||
const std::string version_name,
|
||||
VersionCheckFunc version_check_func,
|
||||
std::string* error_message) {
|
||||
std::string versions_string =
|
||||
GetManifestValue(manifest, version_name, error_message);
|
||||
if (versions_string.empty())
|
||||
return false;
|
||||
|
||||
for (const base::StringPiece& ver_str : base::SplitStringPiece(
|
||||
versions_string, std::string(1, kCdmValueDelimiter),
|
||||
base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
|
||||
int version = 0;
|
||||
if (base::StringToInt(ver_str, &version))
|
||||
if (version_check_func(version))
|
||||
return true;
|
||||
}
|
||||
|
||||
std::stringstream ss;
|
||||
ss << "Manifest has no supported " << version_name << " in '" <<
|
||||
versions_string << "'";
|
||||
*error_message = ss.str();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns whether the CDM's OS/platform and module/interface/host API versions,
|
||||
// as specified in the manifest, are compatible with this Chromium binary.
|
||||
bool IsCompatibleWithChrome(const base::DictionaryValue& manifest,
|
||||
std::string* error_message) {
|
||||
return GetManifestValue(manifest, kCdmOsName, error_message) ==
|
||||
kWidevineCdmOs &&
|
||||
GetManifestValue(manifest, kCdmArchName, error_message) ==
|
||||
kWidevineCdmArch &&
|
||||
CheckForCompatibleVersion(manifest,
|
||||
kCdmModuleVersionsName,
|
||||
media::IsSupportedCdmModuleVersion,
|
||||
error_message) &&
|
||||
CheckForCompatibleVersion(manifest,
|
||||
kCdmInterfaceVersionsName,
|
||||
media::IsSupportedCdmInterfaceVersion,
|
||||
error_message) &&
|
||||
CheckForCompatibleVersion(manifest,
|
||||
kCdmHostVersionsName,
|
||||
media::IsSupportedCdmHostVersion,
|
||||
error_message);
|
||||
}
|
||||
|
||||
// Populate the PepperPluginInfo structure.
|
||||
void GetPluginInfo(const base::FilePath& cdm_adapter_path,
|
||||
const base::FilePath& cdm_path,
|
||||
const std::string& cdm_version,
|
||||
const std::string& cdm_codecs,
|
||||
content::PepperPluginInfo* widevine_cdm) {
|
||||
widevine_cdm->is_out_of_process = true;
|
||||
widevine_cdm->path = cdm_adapter_path;
|
||||
widevine_cdm->name = kWidevineCdmDisplayName;
|
||||
widevine_cdm->description = kWidevineCdmDescription +
|
||||
std::string(" (version: ") +
|
||||
cdm_version + ")";
|
||||
widevine_cdm->version = cdm_version;
|
||||
content::WebPluginMimeType widevine_cdm_mime_type(
|
||||
kWidevineCdmPluginMimeType,
|
||||
kWidevineCdmPluginExtension,
|
||||
kWidevineCdmPluginMimeTypeDescription);
|
||||
|
||||
widevine_cdm_mime_type.additional_param_names.push_back(
|
||||
base::ASCIIToUTF16(kCdmSupportedCodecsParamName));
|
||||
widevine_cdm_mime_type.additional_param_values.push_back(
|
||||
base::ASCIIToUTF16(cdm_codecs));
|
||||
|
||||
widevine_cdm->mime_types.push_back(widevine_cdm_mime_type);
|
||||
widevine_cdm->permissions = kWidevineCdmPluginPermissions;
|
||||
}
|
||||
|
||||
// Verify and load the contents of |base_path|.
|
||||
cef_cdm_registration_error_t LoadWidevineCdmInfo(
|
||||
const base::FilePath& base_path,
|
||||
base::FilePath* cdm_adapter_path,
|
||||
base::FilePath* cdm_path,
|
||||
std::string* cdm_version,
|
||||
std::string* cdm_codecs,
|
||||
std::string* error_message) {
|
||||
std::stringstream ss;
|
||||
|
||||
*cdm_adapter_path = base_path.AppendASCII(kWidevineCdmAdapterFileName);
|
||||
if (!base::PathExists(*cdm_adapter_path)) {
|
||||
ss << "Missing adapter file " << cdm_adapter_path->value();
|
||||
*error_message = ss.str();
|
||||
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
|
||||
}
|
||||
|
||||
*cdm_path = base_path.AppendASCII(
|
||||
base::GetNativeLibraryName(kWidevineCdmLibraryName));
|
||||
if (!base::PathExists(*cdm_path)) {
|
||||
ss << "Missing file " << cdm_path->value();
|
||||
*error_message = ss.str();
|
||||
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
|
||||
}
|
||||
|
||||
base::FilePath manifest_path = base_path.AppendASCII("manifest.json");
|
||||
if (!base::PathExists(manifest_path)) {
|
||||
ss << "Missing manifest file " << manifest_path.value();
|
||||
*error_message = ss.str();
|
||||
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
|
||||
}
|
||||
|
||||
std::unique_ptr<base::DictionaryValue> manifest =
|
||||
ParseManifestFile(manifest_path);
|
||||
if (!manifest) {
|
||||
ss << "Failed to parse manifest file " << manifest_path.value();
|
||||
*error_message = ss.str();
|
||||
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
|
||||
}
|
||||
|
||||
if (!IsCompatibleWithChrome(*manifest, error_message))
|
||||
return CEF_CDM_REGISTRATION_ERROR_INCOMPATIBLE;
|
||||
|
||||
*cdm_version = GetManifestValue(*manifest, kCdmVersionName, error_message);
|
||||
if (cdm_version->empty())
|
||||
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
|
||||
|
||||
*cdm_codecs = GetManifestValue(*manifest, kCdmCodecsListName, error_message);
|
||||
if (cdm_codecs->empty())
|
||||
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
|
||||
|
||||
return CEF_CDM_REGISTRATION_ERROR_NONE;
|
||||
}
|
||||
|
||||
void DeliverWidevineCdmCallback(cef_cdm_registration_error_t result,
|
||||
const std::string& error_message,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
if (result != CEF_CDM_REGISTRATION_ERROR_NONE)
|
||||
LOG(ERROR) << "Widevine CDM registration failed; " << error_message;
|
||||
|
||||
if (callback)
|
||||
callback->OnCdmRegistrationComplete(result, error_message);
|
||||
}
|
||||
|
||||
void RegisterWidevineCdmOnUIThread(
|
||||
const base::FilePath& cdm_adapter_path,
|
||||
const base::FilePath& cdm_path,
|
||||
const std::string& cdm_version,
|
||||
const std::string& cdm_codecs,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
content::PepperPluginInfo widevine_cdm;
|
||||
GetPluginInfo(cdm_adapter_path, cdm_path, cdm_version, cdm_codecs,
|
||||
&widevine_cdm);
|
||||
|
||||
// true = Add to beginning of list to override any existing registrations.
|
||||
content::PluginService::GetInstance()->RegisterInternalPlugin(
|
||||
widevine_cdm.ToWebPluginInfo(), true);
|
||||
// Tell the browser to refresh the plugin list. Then tell all renderers to
|
||||
// update their plugin list caches.
|
||||
content::PluginService::GetInstance()->RefreshPlugins();
|
||||
content::PluginService::GetInstance()->PurgePluginListCache(NULL, false);
|
||||
|
||||
// Also register Widevine with the CdmService.
|
||||
const std::vector<std::string> codecs = base::SplitString(
|
||||
cdm_codecs, std::string(1, kCdmSupportedCodecsValueDelimiter),
|
||||
base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
|
||||
content::CdmService::GetInstance()->RegisterCdm(content::CdmInfo(
|
||||
kWidevineCdmType, base::Version(cdm_version), cdm_path, codecs));
|
||||
|
||||
DeliverWidevineCdmCallback(CEF_CDM_REGISTRATION_ERROR_NONE, std::string(),
|
||||
callback);
|
||||
}
|
||||
|
||||
void LoadWidevineCdmInfoOnFileThread(
|
||||
const base::FilePath& base_path,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback) {
|
||||
CEF_REQUIRE_FILET();
|
||||
|
||||
base::FilePath cdm_adapter_path;
|
||||
base::FilePath cdm_path;
|
||||
std::string cdm_version;
|
||||
std::string cdm_codecs;
|
||||
std::string error_message;
|
||||
cef_cdm_registration_error_t result =
|
||||
LoadWidevineCdmInfo(base_path, &cdm_adapter_path, &cdm_path, &cdm_version,
|
||||
&cdm_codecs, &error_message);
|
||||
if (result != CEF_CDM_REGISTRATION_ERROR_NONE) {
|
||||
CEF_POST_TASK(CEF_UIT, base::Bind(DeliverWidevineCdmCallback, result,
|
||||
error_message, callback));
|
||||
return;
|
||||
}
|
||||
|
||||
// Continue execution on the UI thread.
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::Bind(RegisterWidevineCdmOnUIThread, cdm_adapter_path, cdm_path,
|
||||
cdm_version, cdm_codecs, callback));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
CefWidevineLoader* CefWidevineLoader::GetInstance() {
|
||||
return &g_widevine_loader.Get();
|
||||
}
|
||||
|
||||
void CefWidevineLoader::LoadWidevineCdm(
|
||||
const base::FilePath& path,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback) {
|
||||
if (!CONTEXT_STATE_VALID()) {
|
||||
// Loading will proceed from OnContextInitialized().
|
||||
load_pending_ = true;
|
||||
path_ = path;
|
||||
callback_ = callback;
|
||||
return;
|
||||
}
|
||||
|
||||
// Continue execution on the FILE thread.
|
||||
CEF_POST_TASK(CEF_FILET,
|
||||
base::Bind(LoadWidevineCdmInfoOnFileThread, path, callback));
|
||||
}
|
||||
|
||||
void CefWidevineLoader::OnContextInitialized() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (load_pending_) {
|
||||
load_pending_ = false;
|
||||
LoadWidevineCdm(path_, callback_);
|
||||
callback_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
|
||||
// static
|
||||
void CefWidevineLoader::AddPepperPlugins(
|
||||
std::vector<content::PepperPluginInfo>* plugins) {
|
||||
const base::CommandLine& command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
|
||||
// Perform early plugin registration in the zygote process when the sandbox is
|
||||
// enabled to avoid "cannot open shared object file: Operation not permitted"
|
||||
// errors during plugin loading. This is because the Zygote process must pre-
|
||||
// load all plugins before initializing the sandbox.
|
||||
if (command_line.GetSwitchValueASCII(switches::kProcessType) !=
|
||||
switches::kZygoteProcess ||
|
||||
command_line.HasSwitch(switches::kNoSandbox)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The Widevine CDM path is passed to the zygote process via
|
||||
// CefContentBrowserClient::AppendExtraCommandLineSwitches.
|
||||
const base::FilePath& base_path = command_line.GetSwitchValuePath(
|
||||
switches::kWidevineCdmPath);
|
||||
if (base_path.empty())
|
||||
return;
|
||||
|
||||
// Load contents of the plugin directory synchronously. This only occurs once
|
||||
// on zygote process startup so should not have a huge performance penalty.
|
||||
base::FilePath cdm_adapter_path;
|
||||
base::FilePath cdm_path;
|
||||
std::string cdm_version;
|
||||
std::string cdm_codecs;
|
||||
std::string error_message;
|
||||
cef_cdm_registration_error_t result =
|
||||
LoadWidevineCdmInfo(base_path, &cdm_adapter_path, &cdm_path, &cdm_version,
|
||||
&cdm_codecs, &error_message);
|
||||
if (result != CEF_CDM_REGISTRATION_ERROR_NONE) {
|
||||
LOG(ERROR) << "Widevine CDM registration failed; " << error_message;
|
||||
return;
|
||||
}
|
||||
|
||||
content::PepperPluginInfo widevine_cdm;
|
||||
GetPluginInfo(cdm_adapter_path, cdm_path, cdm_version, cdm_codecs,
|
||||
&widevine_cdm);
|
||||
plugins->push_back(widevine_cdm);
|
||||
}
|
||||
|
||||
#endif // defined(OS_LINUX)
|
||||
|
||||
CefWidevineLoader::CefWidevineLoader() {
|
||||
}
|
||||
|
||||
CefWidevineLoader::~CefWidevineLoader() {
|
||||
}
|
||||
|
||||
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
64
libcef/common/widevine_loader.h
Normal file
64
libcef/common/widevine_loader.h
Normal file
@@ -0,0 +1,64 @@
|
||||
// Copyright 2016 The Chromium Embedded Framework Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be found
|
||||
// in the LICENSE file.
|
||||
|
||||
#ifndef CEF_LIBCEF_COMMON_WIDEVINE_LOADER_H_
|
||||
#define CEF_LIBCEF_COMMON_WIDEVINE_LOADER_H_
|
||||
#pragma once
|
||||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
|
||||
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "include/cef_web_plugin.h"
|
||||
|
||||
#include "base/lazy_instance.h"
|
||||
|
||||
namespace content {
|
||||
struct PepperPluginInfo;
|
||||
}
|
||||
|
||||
class CefWidevineLoader {
|
||||
public:
|
||||
// Returns the singleton instance of this object.
|
||||
static CefWidevineLoader* GetInstance();
|
||||
|
||||
// Load the Widevine CDM. May be called before or after context creation. See
|
||||
// comments in cef_web_plugin.h.
|
||||
void LoadWidevineCdm(const base::FilePath& path,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback);
|
||||
|
||||
// Plugin registration is triggered here if LoadWidevineCdm() was called
|
||||
// before context creation.
|
||||
void OnContextInitialized();
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
// The zygote process which is used when the sandbox is enabled on Linux
|
||||
// requires early loading of pepper plugins. Other processes will receive
|
||||
// load notification in the usual way.
|
||||
// Called from CefContentClient::AddPepperPlugins.
|
||||
static void AddPepperPlugins(std::vector<content::PepperPluginInfo>* plugins);
|
||||
|
||||
const base::FilePath& path() { return path_; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
friend struct base::DefaultLazyInstanceTraits<CefWidevineLoader>;
|
||||
|
||||
// Members are only accessed before context initialization or on the UI
|
||||
// thread.
|
||||
bool load_pending_ = false;
|
||||
base::FilePath path_;
|
||||
CefRefPtr<CefRegisterCdmCallback> callback_;
|
||||
|
||||
CefWidevineLoader();
|
||||
~CefWidevineLoader();
|
||||
};
|
||||
|
||||
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
|
||||
#endif // CEF_LIBCEF_COMMON_WIDEVINE_LOADER_H_
|
@@ -500,12 +500,14 @@ void CefBrowserImpl::FocusedNodeChanged(const blink::WebNode& node) {
|
||||
}
|
||||
}
|
||||
|
||||
// Based on ExtensionHelper::DraggableRegionsChanged.
|
||||
void CefBrowserImpl::DraggableRegionsChanged(blink::WebFrame* frame) {
|
||||
blink::WebVector<blink::WebDraggableRegion> webregions =
|
||||
frame->document().draggableRegions();
|
||||
std::vector<Cef_DraggableRegion_Params> regions;
|
||||
for (size_t i = 0; i < webregions.size(); ++i) {
|
||||
Cef_DraggableRegion_Params region;
|
||||
render_view()->ConvertViewportToWindowViaWidget(&webregions[i].bounds);
|
||||
region.bounds = webregions[i].bounds;
|
||||
region.draggable = webregions[i].draggable;
|
||||
regions.push_back(region);
|
||||
@@ -689,7 +691,7 @@ void CefBrowserImpl::OnLoadStart(blink::WebLocalFrame* frame) {
|
||||
CefRefPtr<CefLoadHandler> load_handler = handler->GetLoadHandler();
|
||||
if (load_handler.get()) {
|
||||
CefRefPtr<CefFrameImpl> cef_frame = GetWebFrameImpl(frame);
|
||||
load_handler->OnLoadStart(this, cef_frame.get());
|
||||
load_handler->OnLoadStart(this, cef_frame.get(), TT_EXPLICIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@ CefPluginPlaceholder::CefPluginPlaceholder(
|
||||
status_(CefViewHostMsg_GetPluginInfo_Status::kAllowed),
|
||||
title_(title),
|
||||
context_menu_request_id_(0),
|
||||
ignore_updates_(false) {
|
||||
did_send_blocked_content_notification_(false) {
|
||||
RenderThread::Get()->AddObserver(this);
|
||||
}
|
||||
|
||||
@@ -285,29 +285,10 @@ blink::WebPlugin* CefPluginPlaceholder::CreatePlugin() {
|
||||
GetPluginParams(), std::move(throttler));
|
||||
}
|
||||
|
||||
void CefPluginPlaceholder::OnLoadedRectUpdate(
|
||||
const gfx::Rect& unobscured_rect,
|
||||
content::RenderFrame::PeripheralContentStatus status) {
|
||||
// If the placeholder is in the blocked state, do nothing.
|
||||
if (ignore_updates_)
|
||||
void CefPluginPlaceholder::OnBlockedTinyContent() {
|
||||
if (did_send_blocked_content_notification_)
|
||||
return;
|
||||
|
||||
// This should only be called once.
|
||||
set_delayed(false);
|
||||
|
||||
// block tiny cross-origin - simply by not continuing the load chain.
|
||||
if (status ==
|
||||
content::RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_TINY) {
|
||||
ignore_updates_ = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// For essential content, powersaver can be turned off.
|
||||
if (status != content::RenderFrame::CONTENT_STATUS_PERIPHERAL)
|
||||
set_power_saver_enabled(false);
|
||||
|
||||
AllowLoading();
|
||||
LoadPlugin();
|
||||
did_send_blocked_content_notification_ = true;
|
||||
}
|
||||
|
||||
gin::ObjectTemplateBuilder CefPluginPlaceholder::GetObjectTemplateBuilder(
|
||||
|
@@ -52,9 +52,7 @@ class CefPluginPlaceholder final
|
||||
|
||||
// content::LoadablePluginPlaceholder overrides:
|
||||
blink::WebPlugin* CreatePlugin() override;
|
||||
void OnLoadedRectUpdate(
|
||||
const gfx::Rect& unobscured_rect,
|
||||
content::RenderFrame::PeripheralContentStatus status) override;
|
||||
void OnBlockedTinyContent() override;
|
||||
|
||||
// gin::Wrappable (via PluginPlaceholder) method
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
@@ -85,7 +83,7 @@ class CefPluginPlaceholder final
|
||||
int context_menu_request_id_; // Nonzero when request pending.
|
||||
base::string16 plugin_name_;
|
||||
|
||||
bool ignore_updates_;
|
||||
bool did_send_blocked_content_notification_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefPluginPlaceholder);
|
||||
};
|
||||
|
@@ -2363,13 +2363,9 @@ CefV8StackFrameImpl::CefV8StackFrameImpl(
|
||||
is_constructor_(false) {
|
||||
if (handle.IsEmpty())
|
||||
return;
|
||||
GetCefString(v8::Local<v8::String>::Cast(handle->GetScriptName()),
|
||||
script_name_);
|
||||
GetCefString(
|
||||
v8::Local<v8::String>::Cast(handle->GetScriptNameOrSourceURL()),
|
||||
script_name_or_source_url_);
|
||||
GetCefString(v8::Local<v8::String>::Cast(handle->GetFunctionName()),
|
||||
function_name_);
|
||||
GetCefString(handle->GetScriptName(), script_name_);
|
||||
GetCefString(handle->GetScriptNameOrSourceURL(), script_name_or_source_url_);
|
||||
GetCefString(handle->GetFunctionName(), function_name_);
|
||||
line_number_ = handle->GetLineNumber();
|
||||
column_ = handle->GetColumn();
|
||||
is_eval_ = handle->IsEval();
|
||||
|
@@ -1,2 +1,2 @@
|
||||
#include <grit/cef_resources.h>
|
||||
#include <grit/cef_strings.h>
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "cef/grit/cef_strings.h"
|
||||
|
@@ -1,2 +1,2 @@
|
||||
#include <grit/cef_resources.h>
|
||||
#include <grit/cef_strings.h>
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "cef/grit/cef_strings.h"
|
||||
|
@@ -1,2 +1,2 @@
|
||||
#include <grit/cef_resources.h>
|
||||
#include <grit/cef_strings.h>
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "cef/grit/cef_strings.h"
|
||||
|
@@ -6,11 +6,11 @@
|
||||
// is functionally a wrapper around the LockImpl class, so the only
|
||||
// real intelligence in the class is in the debugging logic.
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
|
||||
#include "include/base/cef_lock.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
|
||||
namespace base {
|
||||
namespace cef_internal {
|
||||
|
||||
@@ -43,4 +43,4 @@ void Lock::CheckUnheldAndMark() {
|
||||
} // namespace cef_internal
|
||||
} // namespace base
|
||||
|
||||
#endif // NDEBUG
|
||||
#endif // DCHECK_IS_ON()
|
||||
|
@@ -48,7 +48,7 @@ namespace base {
|
||||
namespace cef_internal {
|
||||
|
||||
LockImpl::LockImpl() {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
// In debug, setup attributes for lock error checking.
|
||||
pthread_mutexattr_t mta;
|
||||
int rv = pthread_mutexattr_init(&mta);
|
||||
|
@@ -15,32 +15,32 @@ bool RefCountedThreadSafeBase::HasOneRef() const {
|
||||
}
|
||||
|
||||
RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(0) {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
in_dtor_ = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
RefCountedThreadSafeBase::~RefCountedThreadSafeBase() {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(in_dtor_) << "RefCountedThreadSafe object deleted without "
|
||||
"calling Release()";
|
||||
#endif
|
||||
}
|
||||
|
||||
void RefCountedThreadSafeBase::AddRef() const {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(!in_dtor_);
|
||||
#endif
|
||||
AtomicRefCountInc(&ref_count_);
|
||||
}
|
||||
|
||||
bool RefCountedThreadSafeBase::Release() const {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(!in_dtor_);
|
||||
DCHECK(!AtomicRefCountIsZero(&ref_count_));
|
||||
#endif
|
||||
if (!AtomicRefCountDec(&ref_count_)) {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
in_dtor_ = true;
|
||||
#endif
|
||||
return true;
|
||||
|
@@ -127,7 +127,7 @@ template<> CefRefPtr<CefApp> CefCppToC<CefAppCppToC, CefApp,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefAppCppToC, CefApp,
|
||||
cef_app_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -67,7 +67,7 @@ template<> CefRefPtr<CefAuthCallback> CefCppToC<CefAuthCallbackCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefAuthCallbackCppToC,
|
||||
CefAuthCallback, cef_auth_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -13,7 +13,7 @@ template<> CefRefPtr<CefBase> CefCppToC<CefBaseCppToC, CefBase, cef_base_t>::
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefBaseCppToC, CefBase,
|
||||
cef_base_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -49,7 +49,7 @@ template<> CefRefPtr<CefBeforeDownloadCallback> CefCppToC<CefBeforeDownloadCallb
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefBeforeDownloadCallbackCppToC,
|
||||
CefBeforeDownloadCallback, cef_before_download_callback_t>::DebugObjCt =
|
||||
0;
|
||||
|
@@ -179,7 +179,7 @@ template<> CefRefPtr<CefBinaryValue> CefCppToC<CefBinaryValueCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefBinaryValueCppToC, CefBinaryValue,
|
||||
cef_binary_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -389,7 +389,7 @@ template<> CefRefPtr<CefBrowser> CefCppToC<CefBrowserCppToC, CefBrowser,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefBrowserCppToC, CefBrowser,
|
||||
cef_browser_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -1012,7 +1012,7 @@ template<> CefRefPtr<CefBrowserHost> CefCppToC<CefBrowserHostCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefBrowserHostCppToC, CefBrowserHost,
|
||||
cef_browser_host_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -121,7 +121,7 @@ template<> CefRefPtr<CefBrowserProcessHandler> CefCppToC<CefBrowserProcessHandle
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefBrowserProcessHandlerCppToC,
|
||||
CefBrowserProcessHandler, cef_browser_process_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -55,7 +55,7 @@ template<> CefRefPtr<CefCallback> CefCppToC<CefCallbackCppToC, CefCallback,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefCallbackCppToC, CefCallback,
|
||||
cef_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -313,7 +313,7 @@ template<> CefRefPtr<CefClient> CefCppToC<CefClientCppToC, CefClient,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefClientCppToC, CefClient,
|
||||
cef_client_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -429,7 +429,7 @@ template<> CefRefPtr<CefCommandLine> CefCppToC<CefCommandLineCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefCommandLineCppToC, CefCommandLine,
|
||||
cef_command_line_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -45,7 +45,7 @@ template<> CefRefPtr<CefCompletionCallback> CefCppToC<CefCompletionCallbackCppTo
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefCompletionCallbackCppToC,
|
||||
CefCompletionCallback, cef_completion_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -178,7 +178,7 @@ template<> CefRefPtr<CefContextMenuHandler> CefCppToC<CefContextMenuHandlerCppTo
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefContextMenuHandlerCppToC,
|
||||
CefContextMenuHandler, cef_context_menu_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -377,7 +377,7 @@ template<> CefRefPtr<CefContextMenuParams> CefCppToC<CefContextMenuParamsCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefContextMenuParamsCppToC,
|
||||
CefContextMenuParams, cef_context_menu_params_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -241,7 +241,7 @@ template<> CefRefPtr<CefCookieManager> CefCppToC<CefCookieManagerCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefCookieManagerCppToC,
|
||||
CefCookieManager, cef_cookie_manager_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -72,7 +72,7 @@ template<> CefRefPtr<CefCookieVisitor> CefCppToC<CefCookieVisitorCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefCookieVisitorCppToC,
|
||||
CefCookieVisitor, cef_cookie_visitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -89,7 +89,7 @@ class CefCppToC : public CefBase {
|
||||
}
|
||||
bool HasOneRef() const { return UnderlyingHasOneRef(); }
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
// Simple tracking of allocated objects.
|
||||
static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int)
|
||||
#endif
|
||||
@@ -106,13 +106,13 @@ class CefCppToC : public CefBase {
|
||||
base->release = struct_release;
|
||||
base->has_one_ref = struct_has_one_ref;
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
base::AtomicRefCountInc(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual ~CefCppToC() {
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
base::AtomicRefCountDec(&DebugObjCt);
|
||||
#endif
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ template<> CefRefPtr<CefDeleteCookiesCallback> CefCppToC<CefDeleteCookiesCallbac
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDeleteCookiesCallbackCppToC,
|
||||
CefDeleteCookiesCallback, cef_delete_cookies_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -78,7 +78,7 @@ template<> CefRefPtr<CefDialogHandler> CefCppToC<CefDialogHandlerCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDialogHandlerCppToC,
|
||||
CefDialogHandler, cef_dialog_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -670,7 +670,7 @@ template<> CefRefPtr<CefDictionaryValue> CefCppToC<CefDictionaryValueCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDictionaryValueCppToC,
|
||||
CefDictionaryValue, cef_dictionary_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -204,7 +204,7 @@ template<> CefRefPtr<CefDisplayHandler> CefCppToC<CefDisplayHandlerCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDisplayHandlerCppToC,
|
||||
CefDisplayHandler, cef_display_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -270,7 +270,7 @@ template<> CefRefPtr<CefDOMDocument> CefCppToC<CefDOMDocumentCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDOMDocumentCppToC, CefDOMDocument,
|
||||
cef_domdocument_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -469,7 +469,7 @@ template<> CefRefPtr<CefDOMNode> CefCppToC<CefDOMNodeCppToC, CefDOMNode,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDOMNodeCppToC, CefDOMNode,
|
||||
cef_domnode_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -51,7 +51,7 @@ template<> CefRefPtr<CefDOMVisitor> CefCppToC<CefDOMVisitorCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDOMVisitorCppToC, CefDOMVisitor,
|
||||
cef_domvisitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -102,7 +102,7 @@ template<> CefRefPtr<CefDownloadHandler> CefCppToC<CefDownloadHandlerCppToC,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDownloadHandlerCppToC,
|
||||
CefDownloadHandler, cef_download_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -56,7 +56,7 @@ template<> CefRefPtr<CefDownloadImageCallback> CefCppToC<CefDownloadImageCallbac
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDownloadImageCallbackCppToC,
|
||||
CefDownloadImageCallback, cef_download_image_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -71,7 +71,7 @@ template<> CefRefPtr<CefDownloadItemCallback> CefCppToC<CefDownloadItemCallbackC
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToC<CefDownloadItemCallbackCppToC,
|
||||
CefDownloadItemCallback, cef_download_item_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user