mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
110 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b660893c6e | ||
|
6ae6e613f8 | ||
|
ea9b6c8a6b | ||
|
3d0912d766 | ||
|
e207b1758b | ||
|
d94bfc5a98 | ||
|
c4715049d1 | ||
|
8617e7c22c | ||
|
07e6226bbf | ||
|
f6bf57b45e | ||
|
abb11589b2 | ||
|
26b3a7a5d0 | ||
|
456ea5a198 | ||
|
00b7616fdc | ||
|
ced449a0ef | ||
|
d153a2c484 | ||
|
bd97e664c4 | ||
|
3fb1b92d20 | ||
|
e7a02fe00f | ||
|
2ddbe64750 | ||
|
bc8a9b09a8 | ||
|
61f7df010a | ||
|
3b5b58fb78 | ||
|
c6855b4489 | ||
|
37b43c83e1 | ||
|
ce6efff27f | ||
|
cf20046bba | ||
|
63aa211b61 | ||
|
42f0b5218d | ||
|
f082782859 | ||
|
c32584d266 | ||
|
156dc552b9 | ||
|
bdae0bf335 | ||
|
19b61ec391 | ||
|
5033a27e58 | ||
|
efbc200b51 | ||
|
fdf3088470 | ||
|
16f8a66040 | ||
|
70ed95bcca | ||
|
3f4687a4cd | ||
|
1f21fe5412 | ||
|
f7d9457c20 | ||
|
dd0bb98c22 | ||
|
8aac23386e | ||
|
5780ea8baa | ||
|
2328b9be39 | ||
|
4149192d81 | ||
|
a33720558e | ||
|
74dfd9ad81 | ||
|
dc3aae19e8 | ||
|
846107b291 | ||
|
2c3d761ad0 | ||
|
e343da7e40 | ||
|
3640f81f01 | ||
|
4a8546efd7 | ||
|
c2086cf7c7 | ||
|
9af98fab45 | ||
|
aa72f402ba | ||
|
e6e123d503 | ||
|
9ec03906a8 | ||
|
1999a3f237 | ||
|
b543d3217d | ||
|
f4e579f1e8 | ||
|
fda35eae80 | ||
|
cd7e0eef20 | ||
|
39020fb2ea | ||
|
614e2a5b7e | ||
|
aef9fd486a | ||
|
4b491c3a77 | ||
|
a63d646e3b | ||
|
a08686e6a6 | ||
|
41669141eb | ||
|
9e0d84d94a | ||
|
2792d1bb12 | ||
|
828fe45bc1 | ||
|
560b881a2f | ||
|
6cb3be7395 | ||
|
3010ee1ce6 | ||
|
5f0720e096 | ||
|
96e116de9e | ||
|
84c7b0ad8a | ||
|
322d697169 | ||
|
c992ef9d57 | ||
|
8da8a4fbf1 | ||
|
50a9343cec | ||
|
b7a56d9343 | ||
|
aefb5ccce8 | ||
|
272ecc3047 | ||
|
ee90dc0915 | ||
|
de05577c86 | ||
|
378a64b39a | ||
|
d820080479 | ||
|
85f83680d7 | ||
|
b6e5310bce | ||
|
d02f03a71a | ||
|
373180fef2 | ||
|
c5b8b8b9c8 | ||
|
ead921a3f6 | ||
|
0d905e3744 | ||
|
2a308f2a05 | ||
|
483a841348 | ||
|
42341b40fa | ||
|
a388a69356 | ||
|
b849e7fb70 | ||
|
616fdbf3ff | ||
|
4715a1644e | ||
|
b6f09f3865 | ||
|
ab50008595 | ||
|
faafdd2cd7 | ||
|
aeb35d2f36 |
@@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/43.0.2357.130',
|
||||
'chromium_checkout': 'refs/tags/47.0.2526.80',
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@
|
||||
#
|
||||
# The below requirements must be met to build this CEF binary distribution.
|
||||
#
|
||||
# - CMake version 2.8.12.2 or newer.
|
||||
# - CMake version 2.8.12.1 or newer.
|
||||
#
|
||||
# - Linux requirements:
|
||||
# Currently supported distributions include Debian Wheezy, Ubuntu Precise, and
|
||||
@@ -121,7 +121,7 @@
|
||||
# Shared configuration.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12.2)
|
||||
cmake_minimum_required(VERSION 2.8.12.1)
|
||||
|
||||
# Only generate Debug and Release configuration types.
|
||||
set(CMAKE_CONFIGURATION_TYPES Debug Release)
|
||||
@@ -278,7 +278,6 @@ if(OS_LINUX)
|
||||
# List of CEF binary files.
|
||||
set(CEF_BINARY_FILES
|
||||
chrome-sandbox
|
||||
libffmpegsumo.so
|
||||
libcef.so
|
||||
natives_blob.bin
|
||||
snapshot_blob.bin
|
||||
@@ -289,6 +288,7 @@ if(OS_LINUX)
|
||||
cef.pak
|
||||
cef_100_percent.pak
|
||||
cef_200_percent.pak
|
||||
cef_extensions.pak
|
||||
devtools_resources.pak
|
||||
icudtl.dat
|
||||
locales
|
||||
@@ -379,12 +379,14 @@ endif()
|
||||
#
|
||||
|
||||
if(OS_WINDOWS)
|
||||
# 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")
|
||||
|
||||
# Platform-specific compiler/linker flags.
|
||||
set(CEF_LIBTYPE STATIC)
|
||||
# /MP = Multiprocess compilation
|
||||
# /Gy = Enable function-level linking
|
||||
# /GR- = Disable run-time type information
|
||||
# /Zi = Enable program database
|
||||
# /W4 = Warning level 4
|
||||
# /WX = Treat warnings as errors
|
||||
# /wd"4100" = Ignore "unreferenced formal parameter" warning
|
||||
@@ -394,7 +396,7 @@ if(OS_WINDOWS)
|
||||
# /wd"4701" = Ignore "potentially uninitialized local variable" warning
|
||||
# /wd"4702" = Ignore "unreachable code" warning
|
||||
# /wd"4996" = Ignore "function or variable may be unsafe" warning
|
||||
set(CEF_COMPILER_FLAGS "/MP /Gy /GR- /Zi /W4 /WX /wd\"4100\" /wd\"4127\" /wd\"4244\" /wd\"4512\" /wd\"4701\" /wd\"4702\" /wd\"4996\"")
|
||||
set(CEF_COMPILER_FLAGS "/MP /Gy /GR- /W4 /WX /wd\"4100\" /wd\"4127\" /wd\"4244\" /wd\"4512\" /wd\"4701\" /wd\"4702\" /wd\"4996\" ${CEF_DEBUG_INFO_FLAG}")
|
||||
# /MTd = Multithreaded debug runtime
|
||||
# /Od = Disable optimizations
|
||||
# /RTC1 = Enable basic run-time checks
|
||||
@@ -437,7 +439,6 @@ if(OS_WINDOWS)
|
||||
set(CEF_BINARY_FILES
|
||||
d3dcompiler_43.dll
|
||||
d3dcompiler_47.dll
|
||||
ffmpegsumo.dll
|
||||
libcef.dll
|
||||
libEGL.dll
|
||||
libGLESv2.dll
|
||||
@@ -457,6 +458,7 @@ if(OS_WINDOWS)
|
||||
cef.pak
|
||||
cef_100_percent.pak
|
||||
cef_200_percent.pak
|
||||
cef_extensions.pak
|
||||
devtools_resources.pak
|
||||
icudtl.dat
|
||||
locales
|
||||
|
384
cef.gyp
384
cef.gyp
@@ -7,7 +7,6 @@
|
||||
'pkg-config': 'pkg-config',
|
||||
'chromium_code': 1,
|
||||
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cef',
|
||||
'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html',
|
||||
'framework_name': 'Chromium Embedded Framework',
|
||||
'commit_number': '<!(python tools/commit_number.py)',
|
||||
'chrome_version': '<!(python ../build/util/version.py -f ../chrome/VERSION -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")',
|
||||
@@ -153,22 +152,6 @@
|
||||
'action': ['../build/mac/tweak_info_plist.py',
|
||||
'--scm=1'],
|
||||
},
|
||||
{
|
||||
# This postbuid step is responsible for creating the following
|
||||
# helpers:
|
||||
#
|
||||
# cefclient Helper EH.app and cefclient Helper NP.app are created
|
||||
# from cefclient Helper.app.
|
||||
#
|
||||
# The EH helper is marked for an executable heap. The NP helper
|
||||
# is marked for no PIE (ASLR).
|
||||
'postbuild_name': 'Make More Helpers',
|
||||
'action': [
|
||||
'../build/mac/make_more_helpers.sh',
|
||||
'Frameworks',
|
||||
'cefclient',
|
||||
],
|
||||
},
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
@@ -337,22 +320,6 @@
|
||||
'action': ['../build/mac/tweak_info_plist.py',
|
||||
'--scm=1'],
|
||||
},
|
||||
{
|
||||
# This postbuid step is responsible for creating the following
|
||||
# helpers:
|
||||
#
|
||||
# cefsimple Helper EH.app and cefsimple Helper NP.app are created
|
||||
# from cefsimple Helper.app.
|
||||
#
|
||||
# The EH helper is marked for an executable heap. The NP helper
|
||||
# is marked for no PIE (ASLR).
|
||||
'postbuild_name': 'Make More Helpers',
|
||||
'action': [
|
||||
'../build/mac/make_more_helpers.sh',
|
||||
'Frameworks',
|
||||
'cefsimple',
|
||||
],
|
||||
},
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
@@ -409,6 +376,8 @@
|
||||
'tests/cefclient/renderer/client_app_renderer.cc',
|
||||
'tests/cefclient/renderer/client_app_renderer.h',
|
||||
'tests/cefclient/resources/osr_test.html',
|
||||
'tests/cefclient/resources/pdf.html',
|
||||
'tests/cefclient/resources/pdf.pdf',
|
||||
'tests/unittests/browser_info_map_unittest.cc',
|
||||
'tests/unittests/command_line_unittest.cc',
|
||||
'tests/unittests/cookie_unittest.cc',
|
||||
@@ -425,6 +394,8 @@
|
||||
'tests/unittests/navigation_unittest.cc',
|
||||
'tests/unittests/os_rendering_unittest.cc',
|
||||
'tests/unittests/parser_unittest.cc',
|
||||
'tests/unittests/plugin_unittest.cc',
|
||||
'tests/unittests/preference_unittest.cc',
|
||||
'tests/unittests/print_unittest.cc',
|
||||
'tests/unittests/process_message_unittest.cc',
|
||||
'tests/unittests/request_context_unittest.cc',
|
||||
@@ -447,6 +418,7 @@
|
||||
'tests/unittests/test_util.cc',
|
||||
'tests/unittests/test_util.h',
|
||||
'tests/unittests/tracing_unittest.cc',
|
||||
'tests/unittests/translator_unittest.cc',
|
||||
'tests/unittests/urlrequest_unittest.cc',
|
||||
'tests/unittests/v8_unittest.cc',
|
||||
'tests/unittests/values_unittest.cc',
|
||||
@@ -456,6 +428,8 @@
|
||||
],
|
||||
'mac_bundle_resources': [
|
||||
'tests/cefclient/resources/osr_test.html',
|
||||
'tests/cefclient/resources/pdf.html',
|
||||
'tests/cefclient/resources/pdf.pdf',
|
||||
'tests/unittests/mac/unittests.icns',
|
||||
'tests/unittests/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/unittests/mac/English.lproj/MainMenu.xib',
|
||||
@@ -551,22 +525,6 @@
|
||||
'action': ['../build/mac/tweak_info_plist.py',
|
||||
'--scm=1'],
|
||||
},
|
||||
{
|
||||
# This postbuid step is responsible for creating the following
|
||||
# helpers:
|
||||
#
|
||||
# cefclient Helper EH.app and cefclient Helper NP.app are created
|
||||
# from cefclient Helper.app.
|
||||
#
|
||||
# The EH helper is marked for an executable heap. The NP helper
|
||||
# is marked for no PIE (ASLR).
|
||||
'postbuild_name': 'Make More Helpers',
|
||||
'action': [
|
||||
'../build/mac/make_more_helpers.sh',
|
||||
'Frameworks',
|
||||
'cef_unittests',
|
||||
],
|
||||
},
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
@@ -594,6 +552,8 @@
|
||||
'destination': '<(PRODUCT_DIR)/files',
|
||||
'files': [
|
||||
'tests/cefclient/resources/osr_test.html',
|
||||
'tests/cefclient/resources/pdf.html',
|
||||
'tests/cefclient/resources/pdf.pdf',
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -652,9 +612,11 @@
|
||||
'target_name': 'cef_locales',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'<(DEPTH)/ui/strings/ui_strings.gyp:ui_strings',
|
||||
'<(DEPTH)/chrome/chrome_resources.gyp:platform_locale_settings',
|
||||
'<(DEPTH)/components/components_strings.gyp:components_strings',
|
||||
'<(DEPTH)/content/app/strings/content_strings.gyp:content_strings',
|
||||
'<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
|
||||
'<(DEPTH)/ui/strings/ui_strings.gyp:ui_strings',
|
||||
'cef_strings',
|
||||
],
|
||||
'actions': [
|
||||
@@ -677,47 +639,15 @@
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'about_credits',
|
||||
'type': 'none',
|
||||
'actions': [
|
||||
{
|
||||
'variables': {
|
||||
'generator_path': '../tools/licenses.py',
|
||||
},
|
||||
'action_name': 'generate_about_credits',
|
||||
'inputs': [
|
||||
# TODO(phajdan.jr): make licenses.py print inputs too.
|
||||
'<(generator_path)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(about_credits_file)',
|
||||
],
|
||||
'hard_dependency': 1,
|
||||
'action': ['python',
|
||||
'<(generator_path)',
|
||||
'credits',
|
||||
'<(about_credits_file)',
|
||||
],
|
||||
'message': 'Generating about:credits.',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
# Create the pack file for CEF resources.
|
||||
'target_name': 'cef_resources',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'about_credits',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'cef_resources',
|
||||
'variables': {
|
||||
'grit_grd_file': 'libcef/resources/cef_resources.grd',
|
||||
'grit_additional_defines': [
|
||||
'-E', 'about_credits_file=<(about_credits_file)',
|
||||
],
|
||||
},
|
||||
'includes': [ '../build/grit_action.gypi' ],
|
||||
},
|
||||
@@ -732,6 +662,59 @@
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
# Create the pack file for component extension resources.
|
||||
'target_name': 'component_extension_resources',
|
||||
'type': 'none',
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'component_extension_resources',
|
||||
'variables': {
|
||||
'grit_grd_file': '../chrome/browser/resources/component_extension_resources.grd',
|
||||
},
|
||||
'includes': [ '../build/grit_action.gypi' ],
|
||||
},
|
||||
],
|
||||
'includes': [ '../build/grit_target.gypi' ],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)',
|
||||
'files': [
|
||||
'<(grit_out_dir)/component_extension_resources.pak'
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
# Combine all extensions-related non-localized pack file resources into a
|
||||
# single CEF pack file. Scaled resources are still in cef_pak.
|
||||
'target_name': 'cef_extensions_pak',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
|
||||
'<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
|
||||
'<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
|
||||
'component_extension_resources',
|
||||
],
|
||||
'variables': {
|
||||
'make_pack_header_path': 'tools/make_pack_header.py',
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'repack_cef_extensions_pack',
|
||||
'variables': {
|
||||
'pak_inputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_renderer_resources.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
|
||||
'<(grit_out_dir)/component_extension_resources.pak',
|
||||
],
|
||||
'pak_output': '<(PRODUCT_DIR)/cef_extensions.pak',
|
||||
},
|
||||
'includes': [ '../build/repack_action.gypi' ],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
# Combine all non-localized pack file resources into a single CEF pack file.
|
||||
'target_name': 'cef_pak',
|
||||
@@ -744,6 +727,8 @@
|
||||
'<(DEPTH)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
|
||||
'<(DEPTH)/net/net.gyp:net_resources',
|
||||
'<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
|
||||
'<(DEPTH)/ui/views/resources/views_resources.gyp:views_resources',
|
||||
'cef_extensions_pak',
|
||||
'cef_locales',
|
||||
'cef_resources',
|
||||
],
|
||||
@@ -772,7 +757,9 @@
|
||||
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources_100_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_browser_resources_100_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/views/resources/views_resources_100_percent.pak',
|
||||
],
|
||||
'pak_output': '<(PRODUCT_DIR)/cef_100_percent.pak',
|
||||
},
|
||||
@@ -785,7 +772,9 @@
|
||||
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_200_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources_200_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_200_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_browser_resources_200_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_200_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/views/resources/views_resources_200_percent.pak',
|
||||
],
|
||||
'pak_output': '<(PRODUCT_DIR)/cef_200_percent.pak',
|
||||
},
|
||||
@@ -798,9 +787,15 @@
|
||||
'<(SHARED_INTERMEDIATE_DIR)/blink/grit/devtools_resources.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/grit/blink_resources.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/content/grit/content_resources.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/grit/extensions_browser_resources.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/grit/extensions_renderer_resources.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/grit/extensions_resources.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/net/grit/net_resources.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/ui_resources.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/webui_resources.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/views/resources/grit/views_resources.h',
|
||||
'<(grit_out_dir)/grit/cef_resources.h',
|
||||
'<(grit_out_dir)/grit/component_extension_resources.h',
|
||||
],
|
||||
},
|
||||
'inputs': [
|
||||
@@ -817,8 +812,10 @@
|
||||
'action_name': 'make_pack_strings_header',
|
||||
'variables': {
|
||||
'header_inputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/chrome/grit/platform_locale_settings.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/components/strings/grit/components_strings.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/content/app/strings/grit/content_strings.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/strings/grit/extensions_strings.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/strings/grit/ui_strings.h',
|
||||
'<(grit_out_dir)/grit/cef_strings.h',
|
||||
],
|
||||
@@ -857,10 +854,12 @@
|
||||
'<(DEPTH)/third_party/WebKit/public/web',
|
||||
# CEF grit resource includes
|
||||
'<(DEPTH)/cef/libcef/resources/grit_stub',
|
||||
'<(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',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit',
|
||||
],
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/base.gyp:base',
|
||||
@@ -872,16 +871,34 @@
|
||||
# Generate chrome/common/safe_browsing/csd.pb.h required by
|
||||
# zip_analyzer_results.h via chrome_utility_messages.h
|
||||
'<(DEPTH)/chrome/chrome.gyp:safe_browsing_proto',
|
||||
'<(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_mac_to_be_deleted',
|
||||
'<(DEPTH)/components/components.gyp:crx_file',
|
||||
'<(DEPTH)/components/components.gyp:data_use_measurement_core',
|
||||
'<(DEPTH)/components/components.gyp:devtools_discovery',
|
||||
'<(DEPTH)/components/components.gyp:devtools_http_handler',
|
||||
'<(DEPTH)/components/components.gyp:keyed_service_content',
|
||||
'<(DEPTH)/components/components.gyp:keyed_service_core',
|
||||
'<(DEPTH)/components/components.gyp:navigation_interception',
|
||||
'<(DEPTH)/components/components.gyp:pdf_browser',
|
||||
'<(DEPTH)/components/components.gyp:pdf_renderer',
|
||||
'<(DEPTH)/components/components.gyp:plugins_renderer',
|
||||
'<(DEPTH)/components/components.gyp:pref_registry',
|
||||
'<(DEPTH)/components/components.gyp:printing_browser',
|
||||
'<(DEPTH)/components/components.gyp:printing_common',
|
||||
'<(DEPTH)/components/components.gyp:printing_renderer',
|
||||
'<(DEPTH)/components/components.gyp:proxy_config',
|
||||
'<(DEPTH)/components/components.gyp:update_client',
|
||||
'<(DEPTH)/components/components.gyp:user_prefs',
|
||||
'<(DEPTH)/components/components.gyp:version_info',
|
||||
'<(DEPTH)/components/components.gyp:visitedlink_browser',
|
||||
'<(DEPTH)/components/components.gyp:visitedlink_common',
|
||||
'<(DEPTH)/components/components.gyp:visitedlink_renderer',
|
||||
'<(DEPTH)/components/components.gyp:web_cache_renderer',
|
||||
'<(DEPTH)/components/url_formatter/url_formatter.gyp:url_formatter',
|
||||
'<(DEPTH)/content/content.gyp:content_app_both',
|
||||
'<(DEPTH)/content/content.gyp:content_browser',
|
||||
'<(DEPTH)/content/content.gyp:content_common',
|
||||
@@ -892,6 +909,14 @@
|
||||
'<(DEPTH)/content/content.gyp:content_resources',
|
||||
'<(DEPTH)/content/content.gyp:content_utility',
|
||||
'<(DEPTH)/crypto/crypto.gyp:crypto',
|
||||
'<(DEPTH)/device/core/core.gyp:device_core',
|
||||
'<(DEPTH)/device/hid/hid.gyp:device_hid',
|
||||
'<(DEPTH)/extensions/browser/api/api_registration.gyp:extensions_api_registration',
|
||||
'<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
|
||||
'<(DEPTH)/extensions/extensions.gyp:extensions_browser',
|
||||
'<(DEPTH)/extensions/extensions.gyp:extensions_renderer',
|
||||
'<(DEPTH)/extensions/extensions.gyp:extensions_utility',
|
||||
'<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
|
||||
'<(DEPTH)/gpu/gpu.gyp:gpu',
|
||||
'<(DEPTH)/ipc/ipc.gyp:ipc',
|
||||
'<(DEPTH)/media/blink/media_blink.gyp:media_blink',
|
||||
@@ -899,6 +924,7 @@
|
||||
'<(DEPTH)/net/net.gyp:net',
|
||||
'<(DEPTH)/net/net.gyp:net_browser_services',
|
||||
'<(DEPTH)/net/net.gyp:net_with_v8',
|
||||
'<(DEPTH)/pdf/pdf.gyp:pdf',
|
||||
'<(DEPTH)/skia/skia.gyp:skia',
|
||||
'<(DEPTH)/storage/storage_browser.gyp:storage',
|
||||
'<(DEPTH)/sync/sync.gyp:sync',
|
||||
@@ -906,6 +932,8 @@
|
||||
'<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
|
||||
'<(DEPTH)/third_party/WebKit/public/blink.gyp:blink',
|
||||
'<(DEPTH)/third_party/WebKit/Source/core/core.gyp:webcore',
|
||||
'<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter',
|
||||
'<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
|
||||
'<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
|
||||
'<(DEPTH)/ui/gl/gl.gyp:gl',
|
||||
'<(DEPTH)/ui/base/ime/ui_base_ime.gyp:ui_base_ime',
|
||||
@@ -913,6 +941,9 @@
|
||||
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
|
||||
# Necessary to generate the grit include files.
|
||||
'cef_pak',
|
||||
# Necessary to generate API bindings for extensions.
|
||||
'libcef/browser/extensions/api/api_registration.gyp:cef_api_registration',
|
||||
'libcef/common/extensions/api/api.gyp:cef_api',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
@@ -932,14 +963,12 @@
|
||||
'libcef/browser/browser_message_filter.h',
|
||||
'libcef/browser/browser_message_loop.cc',
|
||||
'libcef/browser/browser_message_loop.h',
|
||||
'libcef/browser/browser_pref_store.cc',
|
||||
'libcef/browser/browser_pref_store.h',
|
||||
'libcef/browser/browser_settings.cc',
|
||||
'libcef/browser/browser_settings.h',
|
||||
'libcef/browser/browser_urlrequest_impl.cc',
|
||||
'libcef/browser/browser_urlrequest_impl.h',
|
||||
'libcef/browser/chrome_browser_process_stub.cc',
|
||||
'libcef/browser/chrome_browser_process_stub.h',
|
||||
'libcef/browser/chrome_profile_stub.cc',
|
||||
'libcef/browser/chrome_profile_stub.h',
|
||||
'libcef/browser/chrome_scheme_handler.cc',
|
||||
'libcef/browser/chrome_scheme_handler.h',
|
||||
'libcef/browser/content_browser_client.cc',
|
||||
@@ -962,6 +991,36 @@
|
||||
'libcef/browser/download_item_impl.h',
|
||||
'libcef/browser/download_manager_delegate.cc',
|
||||
'libcef/browser/download_manager_delegate.h',
|
||||
'libcef/browser/component_updater/cef_component_updater_configurator.cc',
|
||||
'libcef/browser/component_updater/cef_component_updater_configurator.h',
|
||||
'libcef/browser/extensions/api/streams_private/streams_private_api.cc',
|
||||
'libcef/browser/extensions/api/streams_private/streams_private_api.h',
|
||||
'libcef/browser/extensions/browser_context_keyed_service_factories.cc',
|
||||
'libcef/browser/extensions/browser_context_keyed_service_factories.h',
|
||||
'libcef/browser/extensions/browser_extensions_util.cc',
|
||||
'libcef/browser/extensions/browser_extensions_util.h',
|
||||
'libcef/browser/extensions/component_extension_resource_manager.cc',
|
||||
'libcef/browser/extensions/component_extension_resource_manager.h',
|
||||
'libcef/browser/extensions/event_router_forwarder.cc',
|
||||
'libcef/browser/extensions/event_router_forwarder.h',
|
||||
'libcef/browser/extensions/extensions_api_client.cc',
|
||||
'libcef/browser/extensions/extensions_api_client.h',
|
||||
'libcef/browser/extensions/extensions_browser_client.cc',
|
||||
'libcef/browser/extensions/extensions_browser_client.h',
|
||||
'libcef/browser/extensions/extension_system.cc',
|
||||
'libcef/browser/extensions/extension_system.h',
|
||||
'libcef/browser/extensions/extension_system_factory.cc',
|
||||
'libcef/browser/extensions/extension_system_factory.h',
|
||||
'libcef/browser/extensions/extension_web_contents_observer.cc',
|
||||
'libcef/browser/extensions/extension_web_contents_observer.h',
|
||||
'libcef/browser/extensions/mime_handler_view_guest_delegate.cc',
|
||||
'libcef/browser/extensions/mime_handler_view_guest_delegate.h',
|
||||
'libcef/browser/extensions/pdf_extension_util.cc',
|
||||
'libcef/browser/extensions/pdf_extension_util.h',
|
||||
'libcef/browser/extensions/pdf_web_contents_helper_client.cc',
|
||||
'libcef/browser/extensions/pdf_web_contents_helper_client.h',
|
||||
'libcef/browser/extensions/url_request_util.cc',
|
||||
'libcef/browser/extensions/url_request_util.h',
|
||||
'libcef/browser/frame_host_impl.cc',
|
||||
'libcef/browser/frame_host_impl.h',
|
||||
'libcef/browser/geolocation_impl.cc',
|
||||
@@ -987,9 +1046,19 @@
|
||||
'libcef/browser/pepper/browser_pepper_host_factory.h',
|
||||
'libcef/browser/pepper/pepper_flash_browser_host.cc',
|
||||
'libcef/browser/pepper/pepper_flash_browser_host.h',
|
||||
'libcef/browser/pepper/pepper_isolated_file_system_message_filter.cc',
|
||||
'libcef/browser/pepper/pepper_isolated_file_system_message_filter.h',
|
||||
'libcef/browser/pepper/device_id_fetcher.cc',
|
||||
'libcef/browser/permission_manager.cc',
|
||||
'libcef/browser/permission_manager.h',
|
||||
'libcef/browser/plugins/plugin_info_message_filter.cc',
|
||||
'libcef/browser/plugins/plugin_info_message_filter.h',
|
||||
'libcef/browser/plugins/plugin_service_filter.cc',
|
||||
'libcef/browser/plugins/plugin_service_filter.h',
|
||||
'libcef/browser/prefs/browser_prefs.cc',
|
||||
'libcef/browser/prefs/browser_prefs.h',
|
||||
'libcef/browser/prefs/renderer_prefs.cc',
|
||||
'libcef/browser/prefs/renderer_prefs.h',
|
||||
'libcef/browser/print_settings_impl.cc',
|
||||
'libcef/browser/print_settings_impl.h',
|
||||
'libcef/browser/printing/printing_message_filter.cc',
|
||||
@@ -1008,6 +1077,8 @@
|
||||
'libcef/browser/resource_dispatcher_host_delegate.h',
|
||||
'libcef/browser/resource_request_job.cc',
|
||||
'libcef/browser/resource_request_job.h',
|
||||
'libcef/browser/response_filter_wrapper.cc',
|
||||
'libcef/browser/response_filter_wrapper.h',
|
||||
'libcef/browser/request_context_impl.cc',
|
||||
'libcef/browser/request_context_impl.h',
|
||||
'libcef/browser/scheme_handler.cc',
|
||||
@@ -1070,6 +1141,10 @@
|
||||
'libcef/common/crash_reporter_client.h',
|
||||
'libcef/common/drag_data_impl.cc',
|
||||
'libcef/common/drag_data_impl.h',
|
||||
'libcef/common/extensions/extensions_client.cc',
|
||||
'libcef/common/extensions/extensions_client.h',
|
||||
'libcef/common/extensions/extensions_util.cc',
|
||||
'libcef/common/extensions/extensions_util.h',
|
||||
'libcef/common/http_header_utils.cc',
|
||||
'libcef/common/http_header_utils.h',
|
||||
'libcef/common/json_impl.cc',
|
||||
@@ -1082,6 +1157,8 @@
|
||||
'libcef/common/process_message_impl.h',
|
||||
'libcef/common/request_impl.cc',
|
||||
'libcef/common/request_impl.h',
|
||||
'libcef/common/resource_bundle_impl.cc',
|
||||
'libcef/common/resource_bundle_impl.h',
|
||||
'libcef/common/response_impl.cc',
|
||||
'libcef/common/response_impl.h',
|
||||
'libcef/common/response_manager.cc',
|
||||
@@ -1097,6 +1174,7 @@
|
||||
'libcef/common/task_impl.cc',
|
||||
'libcef/common/task_runner_impl.cc',
|
||||
'libcef/common/task_runner_impl.h',
|
||||
'libcef/common/test/translator_test_impl.cc',
|
||||
'libcef/common/time_impl.cc',
|
||||
'libcef/common/time_util.h',
|
||||
'libcef/common/tracker.cc',
|
||||
@@ -1118,12 +1196,25 @@
|
||||
'libcef/renderer/dom_document_impl.h',
|
||||
'libcef/renderer/dom_node_impl.cc',
|
||||
'libcef/renderer/dom_node_impl.h',
|
||||
'libcef/renderer/extensions/extensions_dispatcher_delegate.cc',
|
||||
'libcef/renderer/extensions/extensions_dispatcher_delegate.h',
|
||||
'libcef/renderer/extensions/extensions_renderer_client.cc',
|
||||
'libcef/renderer/extensions/extensions_renderer_client.h',
|
||||
'libcef/renderer/extensions/print_web_view_helper_delegate.cc',
|
||||
'libcef/renderer/extensions/print_web_view_helper_delegate.h',
|
||||
'libcef/renderer/frame_impl.cc',
|
||||
'libcef/renderer/frame_impl.h',
|
||||
'libcef/renderer/media/cef_key_systems.cc',
|
||||
'libcef/renderer/media/cef_key_systems.h',
|
||||
'libcef/renderer/pepper/pepper_helper.cc',
|
||||
'libcef/renderer/pepper/pepper_helper.h',
|
||||
'libcef/renderer/pepper/pepper_uma_host.cc',
|
||||
'libcef/renderer/pepper/renderer_pepper_host_factory.cc',
|
||||
'libcef/renderer/pepper/renderer_pepper_host_factory.h',
|
||||
'libcef/renderer/plugins/cef_plugin_placeholder.cc',
|
||||
'libcef/renderer/plugins/cef_plugin_placeholder.h',
|
||||
'libcef/renderer/plugins/plugin_preroller.cc',
|
||||
'libcef/renderer/plugins/plugin_preroller.h',
|
||||
'libcef/renderer/render_frame_observer.cc',
|
||||
'libcef/renderer/render_frame_observer.h',
|
||||
'libcef/renderer/render_message_filter.cc',
|
||||
@@ -1142,24 +1233,10 @@
|
||||
'<(DEPTH)/chrome/common/chrome_switches.cc',
|
||||
'<(DEPTH)/chrome/common/chrome_switches.h',
|
||||
# Include sources for proxy support.
|
||||
'<(DEPTH)/base/prefs/testing_pref_store.cc',
|
||||
'<(DEPTH)/base/prefs/testing_pref_store.h',
|
||||
'<(DEPTH)/chrome/browser/net/pref_proxy_config_tracker.cc',
|
||||
'<(DEPTH)/chrome/browser/net/pref_proxy_config_tracker.h',
|
||||
'<(DEPTH)/chrome/browser/net/pref_proxy_config_tracker_impl.cc',
|
||||
'<(DEPTH)/chrome/browser/net/pref_proxy_config_tracker_impl.h',
|
||||
'<(DEPTH)/chrome/browser/net/proxy_service_factory.cc',
|
||||
'<(DEPTH)/chrome/browser/net/proxy_service_factory.h',
|
||||
'<(DEPTH)/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.cc',
|
||||
'<(DEPTH)/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h',
|
||||
'<(DEPTH)/chrome/browser/prefs/command_line_pref_store.cc',
|
||||
'<(DEPTH)/chrome/browser/prefs/command_line_pref_store.h',
|
||||
'<(DEPTH)/chrome/browser/prefs/proxy_config_dictionary.cc',
|
||||
'<(DEPTH)/chrome/browser/prefs/proxy_config_dictionary.h',
|
||||
'<(DEPTH)/chrome/browser/prefs/proxy_prefs.cc',
|
||||
'<(DEPTH)/chrome/browser/prefs/proxy_prefs.h',
|
||||
'<(DEPTH)/chrome/common/pref_names.cc',
|
||||
'<(DEPTH)/chrome/common/pref_names.h',
|
||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc',
|
||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h',
|
||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.cc',
|
||||
@@ -1180,8 +1257,6 @@
|
||||
'<(DEPTH)/chrome/browser/printing/printer_query.h',
|
||||
'<(DEPTH)/chrome/common/extensions/extension_constants.cc',
|
||||
'<(DEPTH)/chrome/common/extensions/extension_constants.h',
|
||||
'<(DEPTH)/extensions/common/constants.cc',
|
||||
'<(DEPTH)/extensions/common/constants.h',
|
||||
# Include header for stub creation (BrowserProcess) so print_job_worker can
|
||||
# determine the current locale.
|
||||
'<(DEPTH)/chrome/browser/browser_process.cc',
|
||||
@@ -1250,13 +1325,71 @@
|
||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_menu_host.h',
|
||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_renderer_host.cc',
|
||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_renderer_host.h',
|
||||
# Include sources required by chrome_utility_messages.h.
|
||||
'<(DEPTH)/chrome/common/safe_browsing/zip_analyzer_results.h',
|
||||
'<(DEPTH)/chrome/common/safe_browsing/zip_analyzer_results.cc',
|
||||
# Include sources for pepper PDF support.
|
||||
'<(DEPTH)/chrome/child/pdf_child_init.cc',
|
||||
'<(DEPTH)/chrome/child/pdf_child_init.h',
|
||||
'<(DEPTH)/chrome/renderer/pepper/chrome_pdf_print_client.cc',
|
||||
'<(DEPTH)/chrome/renderer/pepper/chrome_pdf_print_client.h',
|
||||
# Include sources for extensions support.
|
||||
'<(DEPTH)/chrome/common/extensions/chrome_manifest_url_handlers.cc',
|
||||
'<(DEPTH)/chrome/common/extensions/chrome_manifest_url_handlers.h',
|
||||
'<(DEPTH)/chrome/common/extensions/extension_process_policy.cc',
|
||||
'<(DEPTH)/chrome/common/extensions/extension_process_policy.h',
|
||||
'<(DEPTH)/chrome/common/pepper_permission_util.cc',
|
||||
'<(DEPTH)/chrome/common/pepper_permission_util.h',
|
||||
'<(DEPTH)/chrome/common/url_constants.cc',
|
||||
'<(DEPTH)/chrome/common/url_constants.h',
|
||||
'<(DEPTH)/chrome/renderer/extensions/resource_request_policy.cc',
|
||||
'<(DEPTH)/chrome/renderer/extensions/resource_request_policy.h',
|
||||
'<(DEPTH)/extensions/shell/browser/shell_display_info_provider.cc',
|
||||
'<(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',
|
||||
# Include sources for plugin placeholder support.
|
||||
'<(DEPTH)/chrome/browser/plugins/plugin_finder.cc',
|
||||
'<(DEPTH)/chrome/browser/plugins/plugin_finder.h',
|
||||
'<(DEPTH)/chrome/browser/plugins/plugin_metadata.cc',
|
||||
'<(DEPTH)/chrome/browser/plugins/plugin_metadata.h',
|
||||
'<(DEPTH)/components/nacl/common/nacl_constants.cc',
|
||||
'<(DEPTH)/components/nacl/common/nacl_constants.h',
|
||||
# Include sources for preferences support.
|
||||
'<(DEPTH)/base/prefs/testing_pref_store.cc',
|
||||
'<(DEPTH)/base/prefs/testing_pref_store.h',
|
||||
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.cc',
|
||||
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.h',
|
||||
'<(DEPTH)/chrome/browser/character_encoding.cc',
|
||||
'<(DEPTH)/chrome/browser/character_encoding.h',
|
||||
'<(DEPTH)/chrome/browser/defaults.cc',
|
||||
'<(DEPTH)/chrome/browser/defaults.h',
|
||||
'<(DEPTH)/chrome/browser/extensions/extension_webkit_preferences.cc',
|
||||
'<(DEPTH)/chrome/browser/extensions/extension_webkit_preferences.h',
|
||||
'<(DEPTH)/chrome/browser/font_family_cache.cc',
|
||||
'<(DEPTH)/chrome/browser/font_family_cache.h',
|
||||
'<(DEPTH)/chrome/browser/prefs/command_line_pref_store.cc',
|
||||
'<(DEPTH)/chrome/browser/prefs/command_line_pref_store.h',
|
||||
'<(DEPTH)/chrome/browser/renderer_preferences_util.cc',
|
||||
'<(DEPTH)/chrome/browser/renderer_preferences_util.h',
|
||||
'<(DEPTH)/chrome/browser/ui/prefs/prefs_tab_helper.cc',
|
||||
'<(DEPTH)/chrome/browser/ui/prefs/prefs_tab_helper.h',
|
||||
'<(DEPTH)/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc',
|
||||
'<(DEPTH)/chrome/browser/ui/zoom/chrome_zoom_level_prefs.h',
|
||||
'<(DEPTH)/chrome/common/pref_font_webkit_names.h',
|
||||
'<(DEPTH)/chrome/common/pref_names.cc',
|
||||
'<(DEPTH)/chrome/common/pref_names.h',
|
||||
'<(DEPTH)/chrome/common/pref_names_util.cc',
|
||||
'<(DEPTH)/chrome/common/pref_names_util.h',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
'dependencies': [
|
||||
# For printing using PDF.
|
||||
'<(DEPTH)/pdf/pdf.gyp:pdf',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_win)',
|
||||
'libcef/browser/browser_host_impl_win.cc',
|
||||
@@ -1271,13 +1404,15 @@
|
||||
'<(DEPTH)/chrome/browser/printing/pdf_to_emf_converter.cc',
|
||||
'<(DEPTH)/chrome/browser/printing/pdf_to_emf_converter.h',
|
||||
'<(DEPTH)/chrome/common/chrome_utility_printing_messages.h',
|
||||
# Include sources for font cache.
|
||||
'<(DEPTH)/chrome/utility/font_cache_handler_win.cc',
|
||||
'<(DEPTH)/chrome/utility/font_cache_handler_win.h',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="mac"', {
|
||||
'sources': [
|
||||
'<@(includes_mac)',
|
||||
'libcef/browser/browser_host_impl_mac.mm',
|
||||
'libcef/browser/browser_main_mac.mm',
|
||||
'libcef/browser/javascript_dialog_mac.mm',
|
||||
'libcef/browser/menu_creator_runner_mac.h',
|
||||
'libcef/browser/menu_creator_runner_mac.mm',
|
||||
@@ -1287,12 +1422,12 @@
|
||||
'libcef/common/util_mac.h',
|
||||
'libcef/common/util_mac.mm',
|
||||
# Include sources for spell checking support.
|
||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_mac.cc',
|
||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_mac.h',
|
||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_platform_mac.h',
|
||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_platform.h',
|
||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac.cc',
|
||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_platform.h',
|
||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_platform_mac.mm',
|
||||
'<(DEPTH)/chrome/renderer/spellchecker/cocoa_spelling_engine_mac.cc',
|
||||
'<(DEPTH)/chrome/renderer/spellchecker/cocoa_spelling_engine_mac.h',
|
||||
'<(DEPTH)/chrome/renderer/spellchecker/platform_spelling_engine.cc',
|
||||
'<(DEPTH)/chrome/renderer/spellchecker/platform_spelling_engine.h',
|
||||
# Include sources for pepper flash support.
|
||||
'<(DEPTH)/chrome/browser/renderer_host/pepper/monitor_finder_mac.h',
|
||||
'<(DEPTH)/chrome/browser/renderer_host/pepper/monitor_finder_mac.mm',
|
||||
@@ -1302,7 +1437,6 @@
|
||||
'sources': [
|
||||
'<@(includes_linux)',
|
||||
'libcef/browser/browser_host_impl_linux.cc',
|
||||
'libcef/browser/browser_main_linux.cc',
|
||||
'libcef/browser/javascript_dialog_linux.cc',
|
||||
'libcef/browser/menu_creator_runner_linux.cc',
|
||||
'libcef/browser/menu_creator_runner_linux.h',
|
||||
@@ -1313,11 +1447,16 @@
|
||||
'libcef/browser/window_x11.h',
|
||||
],
|
||||
}],
|
||||
['os_posix == 1 and OS != "mac" and android_webview_build != 1', {
|
||||
['os_posix == 1 and OS != "mac"', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/components/components.gyp:breakpad_host',
|
||||
],
|
||||
}],
|
||||
['cld_version==2', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl',
|
||||
],
|
||||
}],
|
||||
['use_aura==1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/ui/views/controls/webview/webview.gyp:webview',
|
||||
@@ -1354,10 +1493,12 @@
|
||||
'<(PRODUCT_DIR)/cef.pak',
|
||||
'<(PRODUCT_DIR)/cef_100_percent.pak',
|
||||
'<(PRODUCT_DIR)/cef_200_percent.pak',
|
||||
'<(PRODUCT_DIR)/cef_extensions.pak',
|
||||
'<(PRODUCT_DIR)/devtools_resources.pak',
|
||||
'<(PRODUCT_DIR)/icudtl.dat',
|
||||
'<(PRODUCT_DIR)/natives_blob.bin',
|
||||
'<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
'<(PRODUCT_DIR)/widevinecdmadapter.plugin',
|
||||
'libcef/resources/framework-Info.plist',
|
||||
],
|
||||
'mac_bundle_resources!': [
|
||||
@@ -1413,13 +1554,6 @@
|
||||
},
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
# Copy binaries for HTML5 audio/video support.
|
||||
'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
|
||||
'files': [
|
||||
'<(PRODUCT_DIR)/ffmpegsumo.so',
|
||||
],
|
||||
},
|
||||
{
|
||||
# Copy binaries for breakpad support.
|
||||
'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
|
||||
@@ -1604,6 +1738,9 @@
|
||||
'sources': [
|
||||
'tests/cefclient/browser/client_app_browser.cc',
|
||||
'tests/cefclient/browser/client_app_browser.h',
|
||||
'tests/cefclient/browser/resource_util.h',
|
||||
'tests/cefclient/browser/resource_util_mac.mm',
|
||||
'tests/cefclient/browser/resource_util_posix.cc',
|
||||
'tests/cefclient/common/client_app.cc',
|
||||
'tests/cefclient/common/client_app.h',
|
||||
'tests/cefclient/common/client_app_other.cc',
|
||||
@@ -1619,6 +1756,8 @@
|
||||
'tests/unittests/frame_unittest.cc',
|
||||
'tests/unittests/message_router_unittest.cc',
|
||||
'tests/unittests/navigation_unittest.cc',
|
||||
'tests/unittests/plugin_unittest.cc',
|
||||
'tests/unittests/preference_unittest.cc',
|
||||
'tests/unittests/process_message_unittest.cc',
|
||||
'tests/unittests/request_handler_unittest.cc',
|
||||
'tests/unittests/request_unittest.cc',
|
||||
@@ -1723,7 +1862,6 @@
|
||||
'<@(includes_win)',
|
||||
# TODO(cef): Remove ui_unscaled_resources.rc once custom cursor
|
||||
# resources can be loaded via ResourceBundle. See crbug.com/147663.
|
||||
'<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc',
|
||||
'libcef_dll/libcef_dll.rc',
|
||||
],
|
||||
|
9
cef.gypi
9
cef.gypi
@@ -9,6 +9,10 @@
|
||||
# Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1.
|
||||
'enable_basic_printing': 1,
|
||||
'enable_print_preview': 0,
|
||||
# Enable support for Widevine CDM.
|
||||
'enable_widevine': 1,
|
||||
# Disable support for plugin installation.
|
||||
'enable_plugin_installation': 0,
|
||||
'conditions': [
|
||||
# Directory for CEF source files.
|
||||
[ 'OS=="win"', {
|
||||
@@ -20,6 +24,11 @@
|
||||
# Strip symbols and create dSYM files for the Release target.
|
||||
'mac_strip_release': 1,
|
||||
}],
|
||||
['os_posix==1 and OS!="mac" and OS!="android"', {
|
||||
# Disable theme support on Linux so we don't need to implement
|
||||
# ThemeService[Factory] classes.
|
||||
'enable_themes': 0,
|
||||
}]
|
||||
]
|
||||
}, 'conditions': [
|
||||
['os_posix==1 and OS!="mac" and OS!="android"', {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
|
||||
# Copyright (c) 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.
|
||||
#
|
||||
@@ -52,9 +52,11 @@
|
||||
'include/cef_request_context.h',
|
||||
'include/cef_request_context_handler.h',
|
||||
'include/cef_request_handler.h',
|
||||
'include/cef_resource_bundle.h',
|
||||
'include/cef_resource_bundle_handler.h',
|
||||
'include/cef_resource_handler.h',
|
||||
'include/cef_response.h',
|
||||
'include/cef_response_filter.h',
|
||||
'include/cef_scheme.h',
|
||||
'include/cef_ssl_info.h',
|
||||
'include/cef_stream.h',
|
||||
@@ -67,6 +69,7 @@
|
||||
'include/cef_web_plugin.h',
|
||||
'include/cef_xml_reader.h',
|
||||
'include/cef_zip_reader.h',
|
||||
'include/test/cef_translator_test.h',
|
||||
],
|
||||
'autogen_capi_includes': [
|
||||
'include/capi/cef_app_capi.h',
|
||||
@@ -109,9 +112,11 @@
|
||||
'include/capi/cef_request_context_capi.h',
|
||||
'include/capi/cef_request_context_handler_capi.h',
|
||||
'include/capi/cef_request_handler_capi.h',
|
||||
'include/capi/cef_resource_bundle_capi.h',
|
||||
'include/capi/cef_resource_bundle_handler_capi.h',
|
||||
'include/capi/cef_resource_handler_capi.h',
|
||||
'include/capi/cef_response_capi.h',
|
||||
'include/capi/cef_response_filter_capi.h',
|
||||
'include/capi/cef_scheme_capi.h',
|
||||
'include/capi/cef_ssl_info_capi.h',
|
||||
'include/capi/cef_stream_capi.h',
|
||||
@@ -124,6 +129,7 @@
|
||||
'include/capi/cef_web_plugin_capi.h',
|
||||
'include/capi/cef_xml_reader_capi.h',
|
||||
'include/capi/cef_zip_reader_capi.h',
|
||||
'include/capi/test/cef_translator_test_capi.h',
|
||||
],
|
||||
'autogen_library_side': [
|
||||
'libcef_dll/ctocpp/app_ctocpp.cc',
|
||||
@@ -214,6 +220,8 @@
|
||||
'libcef_dll/cpptoc/navigation_entry_cpptoc.h',
|
||||
'libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h',
|
||||
'libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/pdf_print_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/post_data_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/post_data_cpptoc.h',
|
||||
'libcef_dll/cpptoc/post_data_element_cpptoc.cc',
|
||||
@@ -244,12 +252,18 @@
|
||||
'libcef_dll/ctocpp/request_context_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/request_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/request_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/resource_bundle_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_bundle_cpptoc.h',
|
||||
'libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/resource_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/response_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/response_cpptoc.h',
|
||||
'libcef_dll/ctocpp/response_filter_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/response_filter_ctocpp.h',
|
||||
'libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/sslcert_principal_cpptoc.cc',
|
||||
@@ -272,6 +286,18 @@
|
||||
'libcef_dll/ctocpp/task_ctocpp.h',
|
||||
'libcef_dll/cpptoc/task_runner_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/task_runner_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_cpptoc.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_handler_child_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_handler_child_ctocpp.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_object_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_object_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_object_child_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_object_child_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_object_child_child_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_object_child_child_cpptoc.h',
|
||||
'libcef_dll/cpptoc/urlrequest_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/urlrequest_cpptoc.h',
|
||||
'libcef_dll/ctocpp/urlrequest_client_ctocpp.cc',
|
||||
@@ -394,6 +420,8 @@
|
||||
'libcef_dll/ctocpp/navigation_entry_ctocpp.h',
|
||||
'libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h',
|
||||
'libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/pdf_print_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/post_data_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/post_data_ctocpp.h',
|
||||
'libcef_dll/ctocpp/post_data_element_ctocpp.cc',
|
||||
@@ -424,12 +452,18 @@
|
||||
'libcef_dll/cpptoc/request_context_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/request_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/request_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/resource_bundle_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_bundle_ctocpp.h',
|
||||
'libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/resource_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/response_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/response_ctocpp.h',
|
||||
'libcef_dll/cpptoc/response_filter_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/response_filter_cpptoc.h',
|
||||
'libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/sslcert_principal_ctocpp.cc',
|
||||
@@ -452,6 +486,18 @@
|
||||
'libcef_dll/cpptoc/task_cpptoc.h',
|
||||
'libcef_dll/ctocpp/task_runner_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/task_runner_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_ctocpp.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/test/translator_test_handler_child_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/test/translator_test_handler_child_cpptoc.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_object_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_object_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_object_child_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_object_child_ctocpp.h',
|
||||
'libcef_dll/ctocpp/test/translator_test_object_child_child_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/test/translator_test_object_child_child_ctocpp.h',
|
||||
'libcef_dll/ctocpp/urlrequest_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/urlrequest_ctocpp.h',
|
||||
'libcef_dll/cpptoc/urlrequest_client_cpptoc.cc',
|
||||
|
@@ -96,12 +96,15 @@
|
||||
],
|
||||
'libcef_sources_common': [
|
||||
'libcef_dll/cpptoc/cpptoc.h',
|
||||
'libcef_dll/ctocpp/base_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/base_ctocpp.h',
|
||||
'libcef_dll/ctocpp/ctocpp.h',
|
||||
'libcef_dll/libcef_dll.cc',
|
||||
'libcef_dll/libcef_dll2.cc',
|
||||
'libcef_dll/resource.h',
|
||||
'libcef_dll/transfer_util.cc',
|
||||
'libcef_dll/transfer_util.h',
|
||||
'libcef_dll/wrapper_types.h',
|
||||
'<@(autogen_library_side)',
|
||||
],
|
||||
'libcef_dll_wrapper_sources_common': [
|
||||
@@ -117,12 +120,13 @@
|
||||
'libcef_dll/base/cef_thread_checker_impl.cc',
|
||||
'libcef_dll/base/cef_thread_collision_warner.cc',
|
||||
'libcef_dll/base/cef_weak_ptr.cc',
|
||||
'libcef_dll/cpptoc/base_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/base_cpptoc.h',
|
||||
'libcef_dll/cpptoc/cpptoc.h',
|
||||
'libcef_dll/ctocpp/base_ctocpp.h',
|
||||
'libcef_dll/ctocpp/ctocpp.h',
|
||||
'libcef_dll/transfer_util.cc',
|
||||
'libcef_dll/transfer_util.h',
|
||||
'libcef_dll/wrapper_types.h',
|
||||
'libcef_dll/wrapper/cef_browser_info_map.h',
|
||||
'libcef_dll/wrapper/cef_byte_read_handler.cc',
|
||||
'libcef_dll/wrapper/cef_closure_task.cc',
|
||||
@@ -154,6 +158,8 @@
|
||||
'tests/cefclient/browser/client_types.h',
|
||||
'tests/cefclient/browser/dialog_test.cc',
|
||||
'tests/cefclient/browser/dialog_test.h',
|
||||
'tests/cefclient/browser/geometry_util.cc',
|
||||
'tests/cefclient/browser/geometry_util.h',
|
||||
'tests/cefclient/browser/main_context.cc',
|
||||
'tests/cefclient/browser/main_context.h',
|
||||
'tests/cefclient/browser/main_context_impl.cc',
|
||||
@@ -165,8 +171,12 @@
|
||||
'tests/cefclient/browser/osr_dragdrop_events.h',
|
||||
'tests/cefclient/browser/osr_renderer.h',
|
||||
'tests/cefclient/browser/osr_renderer.cc',
|
||||
'tests/cefclient/browser/preferences_test.cc',
|
||||
'tests/cefclient/browser/preferences_test.h',
|
||||
'tests/cefclient/browser/resource.h',
|
||||
'tests/cefclient/browser/resource_util.h',
|
||||
'tests/cefclient/browser/response_filter_test.cc',
|
||||
'tests/cefclient/browser/response_filter_test.h',
|
||||
'tests/cefclient/browser/root_window.cc',
|
||||
'tests/cefclient/browser/root_window.h',
|
||||
'tests/cefclient/browser/root_window_manager.cc',
|
||||
@@ -210,8 +220,12 @@
|
||||
'tests/cefclient/resources/logo.png',
|
||||
'tests/cefclient/resources/osr_test.html',
|
||||
'tests/cefclient/resources/other_tests.html',
|
||||
'tests/cefclient/resources/pdf.html',
|
||||
'tests/cefclient/resources/pdf.pdf',
|
||||
'tests/cefclient/resources/performance.html',
|
||||
'tests/cefclient/resources/performance2.html',
|
||||
'tests/cefclient/resources/preferences.html',
|
||||
'tests/cefclient/resources/response_filter.html',
|
||||
'tests/cefclient/resources/transparency.html',
|
||||
'tests/cefclient/resources/urlrequest.html',
|
||||
'tests/cefclient/resources/window.html',
|
||||
|
@@ -72,15 +72,16 @@ typedef int int32;
|
||||
typedef unsigned int uint32;
|
||||
#endif
|
||||
|
||||
// UTF-16 character type
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
// UTF-16 character type.
|
||||
// This should be kept synchronized with base/strings/string16.h
|
||||
#ifndef char16
|
||||
#if defined(WIN32)
|
||||
#if defined(WCHAR_T_IS_UTF16)
|
||||
typedef wchar_t char16;
|
||||
#else
|
||||
#elif defined(WCHAR_T_IS_UTF32)
|
||||
typedef unsigned short char16;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
|
||||
|
@@ -175,7 +175,10 @@
|
||||
// C++11 support may not be enabled in client applications. CEF internal classes
|
||||
// should use the `override` keyword directly.
|
||||
#ifndef OVERRIDE
|
||||
#if defined(__clang__) || defined(COMPILER_MSVC)
|
||||
#if defined(__clang__)
|
||||
#define OVERRIDE override
|
||||
#elif defined(COMPILER_MSVC) && _MSC_VER >= 1600
|
||||
// Visual Studio 2010 and later support override.
|
||||
#define OVERRIDE override
|
||||
#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \
|
||||
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700
|
||||
|
@@ -141,6 +141,14 @@
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
|
||||
// Always define the DCHECK_IS_ON macro which is used from other CEF headers.
|
||||
#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
|
||||
#define DCHECK_IS_ON() 0
|
||||
#else
|
||||
#define DCHECK_IS_ON() 1
|
||||
#endif
|
||||
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/logging.h"
|
||||
@@ -419,9 +427,9 @@ DEFINE_CHECK_OP_IMPL(GT, > )
|
||||
#endif
|
||||
|
||||
#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
|
||||
#define DCHECK_IS_ON 0
|
||||
#define DCHECK_IS_ON() 0
|
||||
#else
|
||||
#define DCHECK_IS_ON 1
|
||||
#define DCHECK_IS_ON() 1
|
||||
#endif
|
||||
|
||||
// Definitions for DLOG et al.
|
||||
@@ -475,14 +483,14 @@ enum { DEBUG_MODE = ENABLE_DLOG };
|
||||
|
||||
// Definitions for DCHECK et al.
|
||||
|
||||
#if DCHECK_IS_ON
|
||||
#if DCHECK_IS_ON()
|
||||
|
||||
#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
|
||||
COMPACT_GOOGLE_LOG_EX_FATAL(ClassName , ##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_FATAL
|
||||
const LogSeverity LOG_DCHECK = LOG_FATAL;
|
||||
|
||||
#else // DCHECK_IS_ON
|
||||
#else // DCHECK_IS_ON()
|
||||
|
||||
// These are just dummy values.
|
||||
#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
|
||||
@@ -490,31 +498,29 @@ const LogSeverity LOG_DCHECK = LOG_FATAL;
|
||||
#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_INFO
|
||||
const LogSeverity LOG_DCHECK = LOG_INFO;
|
||||
|
||||
#endif // DCHECK_IS_ON
|
||||
#endif // DCHECK_IS_ON()
|
||||
|
||||
// DCHECK et al. make sure to reference |condition| regardless of
|
||||
// whether DCHECKs are enabled; this is so that we don't get unused
|
||||
// variable warnings if the only use of a variable is in a DCHECK.
|
||||
// This behavior is different from DLOG_IF et al.
|
||||
|
||||
#define DCHECK(condition) \
|
||||
LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON && !(condition)) \
|
||||
<< "Check failed: " #condition ". "
|
||||
#define DCHECK(condition) \
|
||||
LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \
|
||||
<< "Check failed: " #condition ". "
|
||||
|
||||
#define DPCHECK(condition) \
|
||||
LAZY_STREAM(PLOG_STREAM(DCHECK), DCHECK_IS_ON && !(condition)) \
|
||||
<< "Check failed: " #condition ". "
|
||||
#define DPCHECK(condition) \
|
||||
LAZY_STREAM(PLOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \
|
||||
<< "Check failed: " #condition ". "
|
||||
|
||||
// Helper macro for binary operators.
|
||||
// Don't use this macro directly in your code, use DCHECK_EQ et al below.
|
||||
#define DCHECK_OP(name, op, val1, val2) \
|
||||
if (DCHECK_IS_ON) \
|
||||
if (std::string* _result = \
|
||||
cef::logging::Check##name##Impl((val1), (val2), \
|
||||
#val1 " " #op " " #val2)) \
|
||||
cef::logging::LogMessage( \
|
||||
__FILE__, __LINE__, ::cef::logging::LOG_DCHECK, \
|
||||
_result).stream()
|
||||
#define DCHECK_OP(name, op, val1, val2) \
|
||||
if (DCHECK_IS_ON()) \
|
||||
if (std::string* _result = cef::logging::Check##name##Impl( \
|
||||
(val1), (val2), #val1 " " #op " " #val2)) \
|
||||
cef::logging::LogMessage(__FILE__, __LINE__, \
|
||||
::cef::logging::LOG_DCHECK, _result).stream()
|
||||
|
||||
// Equality/Inequality checks - compare two values, and log a
|
||||
// LOG_DCHECK message including the two values when the result is not
|
||||
|
@@ -41,6 +41,7 @@
|
||||
// updated to match.
|
||||
|
||||
#include <stddef.h> // For size_t.
|
||||
#include "include/base/cef_build.h" // For COMPILER_MSVC
|
||||
|
||||
#if !defined(ALLOW_THIS_IN_INITIALIZER_LIST)
|
||||
#if defined(COMPILER_MSVC)
|
||||
|
@@ -57,7 +57,7 @@
|
||||
|
||||
namespace base {
|
||||
|
||||
namespace subtle {
|
||||
namespace cef_subtle {
|
||||
|
||||
class RefCountedBase {
|
||||
public:
|
||||
@@ -141,7 +141,7 @@ class RefCountedThreadSafeBase {
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafeBase);
|
||||
};
|
||||
|
||||
} // namespace subtle
|
||||
} // namespace cef_subtle
|
||||
|
||||
//
|
||||
// A base class for reference counted classes. Otherwise, known as a cheap
|
||||
@@ -158,16 +158,16 @@ class RefCountedThreadSafeBase {
|
||||
// You should always make your destructor private, to avoid any code deleting
|
||||
// the object accidently while there are references to it.
|
||||
template <class T>
|
||||
class RefCounted : public subtle::RefCountedBase {
|
||||
class RefCounted : public cef_subtle::RefCountedBase {
|
||||
public:
|
||||
RefCounted() {}
|
||||
|
||||
void AddRef() const {
|
||||
subtle::RefCountedBase::AddRef();
|
||||
cef_subtle::RefCountedBase::AddRef();
|
||||
}
|
||||
|
||||
void Release() const {
|
||||
if (subtle::RefCountedBase::Release()) {
|
||||
if (cef_subtle::RefCountedBase::Release()) {
|
||||
delete static_cast<const T*>(this);
|
||||
}
|
||||
}
|
||||
@@ -208,16 +208,16 @@ struct DefaultRefCountedThreadSafeTraits {
|
||||
// friend class base::RefCountedThreadSafe<MyFoo>;
|
||||
// ~MyFoo();
|
||||
template <class T, typename Traits = DefaultRefCountedThreadSafeTraits<T> >
|
||||
class RefCountedThreadSafe : public subtle::RefCountedThreadSafeBase {
|
||||
class RefCountedThreadSafe : public cef_subtle::RefCountedThreadSafeBase {
|
||||
public:
|
||||
RefCountedThreadSafe() {}
|
||||
|
||||
void AddRef() const {
|
||||
subtle::RefCountedThreadSafeBase::AddRef();
|
||||
cef_subtle::RefCountedThreadSafeBase::AddRef();
|
||||
}
|
||||
|
||||
void Release() const {
|
||||
if (subtle::RefCountedThreadSafeBase::Release()) {
|
||||
if (cef_subtle::RefCountedThreadSafeBase::Release()) {
|
||||
Traits::Destruct(static_cast<const T*>(this));
|
||||
}
|
||||
}
|
||||
|
@@ -45,25 +45,24 @@
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/internal/cef_thread_checker_impl.h"
|
||||
|
||||
// Apart from debug builds, we also enable the thread checker in
|
||||
// builds with DCHECK_ALWAYS_ON so that trybots and waterfall bots
|
||||
// with this define will get the same level of thread checking as
|
||||
// debug bots.
|
||||
//
|
||||
// Note that this does not perfectly match situations where DCHECK is
|
||||
// enabled. For example a non-official release build may have
|
||||
// DCHECK_ALWAYS_ON undefined (and therefore ThreadChecker would be
|
||||
// disabled) but have DCHECKs enabled at runtime.
|
||||
#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
|
||||
#if DCHECK_IS_ON()
|
||||
#define ENABLE_THREAD_CHECKER 1
|
||||
#else
|
||||
#define ENABLE_THREAD_CHECKER 0
|
||||
#endif
|
||||
|
||||
#include "include/base/internal/cef_thread_checker_impl.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
namespace cef_internal {
|
||||
|
||||
// Do nothing implementation, for use in release mode.
|
||||
//
|
||||
// Note: You should almost always use the ThreadChecker class to get the
|
||||
@@ -77,6 +76,8 @@ class ThreadCheckerDoNothing {
|
||||
void DetachFromThread() {}
|
||||
};
|
||||
|
||||
} // namespace cef_internal
|
||||
|
||||
// ThreadChecker is a helper class used to help verify that some methods of a
|
||||
// class are called from the same thread. It provides identical functionality to
|
||||
// base::NonThreadSafe, but it is meant to be held as a member variable, rather
|
||||
@@ -109,10 +110,10 @@ class ThreadCheckerDoNothing {
|
||||
//
|
||||
// In Release mode, CalledOnValidThread will always return true.
|
||||
#if ENABLE_THREAD_CHECKER
|
||||
class ThreadChecker : public ThreadCheckerImpl {
|
||||
class ThreadChecker : public cef_internal::ThreadCheckerImpl {
|
||||
};
|
||||
#else
|
||||
class ThreadChecker : public ThreadCheckerDoNothing {
|
||||
class ThreadChecker : public cef_internal::ThreadCheckerDoNothing {
|
||||
};
|
||||
#endif // ENABLE_THREAD_CHECKER
|
||||
|
||||
|
@@ -56,7 +56,7 @@
|
||||
#define CEF_INCLUDE_BASE_CEF_TUPLE_H_
|
||||
#pragma once
|
||||
|
||||
#if defined(BASE_TUPLE_H__)
|
||||
#if defined(BASE_TUPLE_H_)
|
||||
// The Chromium header has already been included.
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
@@ -65,6 +65,8 @@
|
||||
// For legacy compatibility, we name the first 8 tuple elements "a", "b", ...
|
||||
// TODO(cef): Remove this code when cef_runnable.h is deleted.
|
||||
|
||||
namespace base {
|
||||
|
||||
#define DEFINE_TUPLE_LEAF(N, x) \
|
||||
template <typename T> \
|
||||
struct TupleLeaf<N, T> { \
|
||||
@@ -127,6 +129,8 @@ template <typename A,
|
||||
typename H>
|
||||
using Tuple8 = Tuple<A, B, C, D, E, F, G, H>;
|
||||
|
||||
} // namespace base
|
||||
|
||||
#elif defined(BUILDING_CEF_SHARED)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/tuple.h"
|
||||
@@ -137,6 +141,8 @@ using Tuple8 = Tuple<A, B, C, D, E, F, G, H>;
|
||||
|
||||
#include "include/base/cef_bind_helpers.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
// Traits ----------------------------------------------------------------------
|
||||
//
|
||||
// A simple traits class for tuple arguments.
|
||||
@@ -1394,6 +1400,8 @@ inline void DispatchToMethod(ObjT* obj, Method method,
|
||||
&out->e);
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_TUPLE_H_
|
||||
|
@@ -42,6 +42,7 @@
|
||||
//
|
||||
// class Controller {
|
||||
// public:
|
||||
// Controller() : weak_factory_(this) {}
|
||||
// void SpawnWorker() { Worker::StartNew(weak_factory_.GetWeakPtr()); }
|
||||
// void WorkComplete(const Result& result) { ... }
|
||||
// private:
|
||||
@@ -83,8 +84,13 @@
|
||||
// WeakPtrs can still be handed off to other threads, e.g. to use to post tasks
|
||||
// back to object on the bound thread.
|
||||
//
|
||||
// Invalidating the factory's WeakPtrs un-binds it from the thread, allowing it
|
||||
// to be passed for a different thread to use or delete it.
|
||||
// If all WeakPtr objects are destroyed or invalidated then the factory is
|
||||
// unbound from the SequencedTaskRunner/Thread. The WeakPtrFactory may then be
|
||||
// destroyed, or new WeakPtr objects may be used, from a different sequence.
|
||||
//
|
||||
// Thus, at least one WeakPtr object must exist and have been dereferenced on
|
||||
// the correct thread to enforce that other WeakPtr objects will enforce they
|
||||
// are used on the desired thread.
|
||||
|
||||
#ifndef CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_
|
||||
#define CEF_INCLUDE_BASE_CEF_WEAK_PTR_H_
|
||||
|
@@ -2560,10 +2560,15 @@ struct BindState<Runnable, RunType, void()> : public BindStateBase {
|
||||
typedef Invoker<0, BindState, RunType> InvokerType;
|
||||
typedef typename InvokerType::UnboundRunType UnboundRunType;
|
||||
explicit BindState(const Runnable& runnable)
|
||||
: runnable_(runnable) {
|
||||
: BindStateBase(&Destroy),
|
||||
runnable_(runnable) {
|
||||
}
|
||||
|
||||
virtual ~BindState() { }
|
||||
~BindState() { }
|
||||
|
||||
static void Destroy(BindStateBase* self) {
|
||||
delete static_cast<BindState*>(self);
|
||||
}
|
||||
|
||||
RunnableType runnable_;
|
||||
};
|
||||
@@ -2579,14 +2584,19 @@ struct BindState<Runnable, RunType, void(P1)> : public BindStateBase {
|
||||
typedef UnwrapTraits<P1> Bound1UnwrapTraits;
|
||||
|
||||
BindState(const Runnable& runnable, const P1& p1)
|
||||
: runnable_(runnable),
|
||||
: BindStateBase(&Destroy),
|
||||
runnable_(runnable),
|
||||
p1_(p1) {
|
||||
MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
|
||||
}
|
||||
|
||||
virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
P1>::Release(p1_); }
|
||||
|
||||
static void Destroy(BindStateBase* self) {
|
||||
delete static_cast<BindState*>(self);
|
||||
}
|
||||
|
||||
RunnableType runnable_;
|
||||
P1 p1_;
|
||||
};
|
||||
@@ -2603,15 +2613,20 @@ struct BindState<Runnable, RunType, void(P1, P2)> : public BindStateBase {
|
||||
typedef UnwrapTraits<P2> Bound2UnwrapTraits;
|
||||
|
||||
BindState(const Runnable& runnable, const P1& p1, const P2& p2)
|
||||
: runnable_(runnable),
|
||||
: BindStateBase(&Destroy),
|
||||
runnable_(runnable),
|
||||
p1_(p1),
|
||||
p2_(p2) {
|
||||
MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
|
||||
}
|
||||
|
||||
virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
P1>::Release(p1_); }
|
||||
|
||||
static void Destroy(BindStateBase* self) {
|
||||
delete static_cast<BindState*>(self);
|
||||
}
|
||||
|
||||
RunnableType runnable_;
|
||||
P1 p1_;
|
||||
P2 p2_;
|
||||
@@ -2619,7 +2634,8 @@ struct BindState<Runnable, RunType, void(P1, P2)> : public BindStateBase {
|
||||
|
||||
template <typename Runnable, typename RunType, typename P1, typename P2,
|
||||
typename P3>
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3)> : public BindStateBase {
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3)>
|
||||
: public BindStateBase {
|
||||
typedef Runnable RunnableType;
|
||||
typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
|
||||
typedef Invoker<3, BindState, RunType> InvokerType;
|
||||
@@ -2631,16 +2647,21 @@ struct BindState<Runnable, RunType, void(P1, P2, P3)> : public BindStateBase {
|
||||
typedef UnwrapTraits<P3> Bound3UnwrapTraits;
|
||||
|
||||
BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3)
|
||||
: runnable_(runnable),
|
||||
: BindStateBase(&Destroy),
|
||||
runnable_(runnable),
|
||||
p1_(p1),
|
||||
p2_(p2),
|
||||
p3_(p3) {
|
||||
MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
|
||||
}
|
||||
|
||||
virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
P1>::Release(p1_); }
|
||||
|
||||
static void Destroy(BindStateBase* self) {
|
||||
delete static_cast<BindState*>(self);
|
||||
}
|
||||
|
||||
RunnableType runnable_;
|
||||
P1 p1_;
|
||||
P2 p2_;
|
||||
@@ -2649,8 +2670,8 @@ struct BindState<Runnable, RunType, void(P1, P2, P3)> : public BindStateBase {
|
||||
|
||||
template <typename Runnable, typename RunType, typename P1, typename P2,
|
||||
typename P3, typename P4>
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3,
|
||||
P4)> : public BindStateBase {
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3, P4)>
|
||||
: public BindStateBase {
|
||||
typedef Runnable RunnableType;
|
||||
typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
|
||||
typedef Invoker<4, BindState, RunType> InvokerType;
|
||||
@@ -2664,7 +2685,8 @@ struct BindState<Runnable, RunType, void(P1, P2, P3,
|
||||
|
||||
BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
|
||||
const P4& p4)
|
||||
: runnable_(runnable),
|
||||
: BindStateBase(&Destroy),
|
||||
runnable_(runnable),
|
||||
p1_(p1),
|
||||
p2_(p2),
|
||||
p3_(p3),
|
||||
@@ -2672,9 +2694,13 @@ struct BindState<Runnable, RunType, void(P1, P2, P3,
|
||||
MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
|
||||
}
|
||||
|
||||
virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
P1>::Release(p1_); }
|
||||
|
||||
static void Destroy(BindStateBase* self) {
|
||||
delete static_cast<BindState*>(self);
|
||||
}
|
||||
|
||||
RunnableType runnable_;
|
||||
P1 p1_;
|
||||
P2 p2_;
|
||||
@@ -2684,8 +2710,8 @@ struct BindState<Runnable, RunType, void(P1, P2, P3,
|
||||
|
||||
template <typename Runnable, typename RunType, typename P1, typename P2,
|
||||
typename P3, typename P4, typename P5>
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3, P4,
|
||||
P5)> : public BindStateBase {
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5)>
|
||||
: public BindStateBase {
|
||||
typedef Runnable RunnableType;
|
||||
typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
|
||||
typedef Invoker<5, BindState, RunType> InvokerType;
|
||||
@@ -2700,7 +2726,8 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4,
|
||||
|
||||
BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
|
||||
const P4& p4, const P5& p5)
|
||||
: runnable_(runnable),
|
||||
: BindStateBase(&Destroy),
|
||||
runnable_(runnable),
|
||||
p1_(p1),
|
||||
p2_(p2),
|
||||
p3_(p3),
|
||||
@@ -2709,9 +2736,13 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4,
|
||||
MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
|
||||
}
|
||||
|
||||
virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
P1>::Release(p1_); }
|
||||
|
||||
static void Destroy(BindStateBase* self) {
|
||||
delete static_cast<BindState*>(self);
|
||||
}
|
||||
|
||||
RunnableType runnable_;
|
||||
P1 p1_;
|
||||
P2 p2_;
|
||||
@@ -2722,8 +2753,8 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4,
|
||||
|
||||
template <typename Runnable, typename RunType, typename P1, typename P2,
|
||||
typename P3, typename P4, typename P5, typename P6>
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5,
|
||||
P6)> : public BindStateBase {
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6)>
|
||||
: public BindStateBase {
|
||||
typedef Runnable RunnableType;
|
||||
typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
|
||||
typedef Invoker<6, BindState, RunType> InvokerType;
|
||||
@@ -2739,7 +2770,8 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5,
|
||||
|
||||
BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
|
||||
const P4& p4, const P5& p5, const P6& p6)
|
||||
: runnable_(runnable),
|
||||
: BindStateBase(&Destroy),
|
||||
runnable_(runnable),
|
||||
p1_(p1),
|
||||
p2_(p2),
|
||||
p3_(p3),
|
||||
@@ -2749,9 +2781,13 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5,
|
||||
MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
|
||||
}
|
||||
|
||||
virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
P1>::Release(p1_); }
|
||||
|
||||
static void Destroy(BindStateBase* self) {
|
||||
delete static_cast<BindState*>(self);
|
||||
}
|
||||
|
||||
RunnableType runnable_;
|
||||
P1 p1_;
|
||||
P2 p2_;
|
||||
@@ -2763,8 +2799,8 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5,
|
||||
|
||||
template <typename Runnable, typename RunType, typename P1, typename P2,
|
||||
typename P3, typename P4, typename P5, typename P6, typename P7>
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6,
|
||||
P7)> : public BindStateBase {
|
||||
struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6, P7)>
|
||||
: public BindStateBase {
|
||||
typedef Runnable RunnableType;
|
||||
typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
|
||||
typedef Invoker<7, BindState, RunType> InvokerType;
|
||||
@@ -2781,7 +2817,8 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6,
|
||||
|
||||
BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
|
||||
const P4& p4, const P5& p5, const P6& p6, const P7& p7)
|
||||
: runnable_(runnable),
|
||||
: BindStateBase(&Destroy),
|
||||
runnable_(runnable),
|
||||
p1_(p1),
|
||||
p2_(p2),
|
||||
p3_(p3),
|
||||
@@ -2792,9 +2829,13 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6,
|
||||
MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
|
||||
}
|
||||
|
||||
virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
|
||||
P1>::Release(p1_); }
|
||||
|
||||
static void Destroy(BindStateBase* self) {
|
||||
delete static_cast<BindState*>(self);
|
||||
}
|
||||
|
||||
RunnableType runnable_;
|
||||
P1 p1_;
|
||||
P2 p2_;
|
||||
|
@@ -38,25 +38,43 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "include/base/cef_atomic_ref_count.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_ref_counted.h"
|
||||
#include "include/base/cef_scoped_ptr.h"
|
||||
#include "include/base/cef_template_util.h"
|
||||
|
||||
template <typename T>
|
||||
class ScopedVector;
|
||||
|
||||
namespace base {
|
||||
namespace cef_internal {
|
||||
class CallbackBase;
|
||||
|
||||
// BindStateBase is used to provide an opaque handle that the Callback
|
||||
// class can use to represent a function object with bound arguments. It
|
||||
// behaves as an existential type that is used by a corresponding
|
||||
// DoInvoke function to perform the function execution. This allows
|
||||
// us to shield the Callback class from the types of the bound argument via
|
||||
// "type erasure."
|
||||
class BindStateBase : public RefCountedThreadSafe<BindStateBase> {
|
||||
// At the base level, the only task is to add reference counting data. Don't use
|
||||
// RefCountedThreadSafe since it requires the destructor to be a virtual method.
|
||||
// Creating a vtable for every BindState template instantiation results in a lot
|
||||
// of bloat. Its only task is to call the destructor which can be done with a
|
||||
// function pointer.
|
||||
class BindStateBase {
|
||||
protected:
|
||||
friend class RefCountedThreadSafe<BindStateBase>;
|
||||
virtual ~BindStateBase() {}
|
||||
explicit BindStateBase(void (*destructor)(BindStateBase*))
|
||||
: ref_count_(0), destructor_(destructor) {}
|
||||
~BindStateBase() {}
|
||||
|
||||
private:
|
||||
friend class scoped_refptr<BindStateBase>;
|
||||
friend class CallbackBase;
|
||||
|
||||
void AddRef();
|
||||
void Release();
|
||||
|
||||
AtomicRefCount ref_count_;
|
||||
|
||||
// Pointer to a function that will properly destroy |this|.
|
||||
void (*destructor_)(BindStateBase*);
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BindStateBase);
|
||||
};
|
||||
|
||||
// Holds the Callback methods that don't require specialization to reduce
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#include "include/base/cef_platform_thread.h"
|
||||
|
||||
namespace base {
|
||||
namespace cef_internal {
|
||||
|
||||
// Real implementation of ThreadChecker, for use in debug mode, or
|
||||
// for temporary use in release mode (e.g. to CHECK on a threading issue
|
||||
@@ -65,6 +66,7 @@ class ThreadCheckerImpl {
|
||||
mutable PlatformThreadRef valid_thread_id_;
|
||||
};
|
||||
|
||||
} // namespace cef_internal
|
||||
} // namespace base
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -77,7 +77,8 @@ typedef struct _cef_base_t {
|
||||
// Check that the structure |s|, which is defined with a cef_base_t member named
|
||||
// |base|, is large enough to contain the specified member |f|.
|
||||
#define CEF_MEMBER_EXISTS(s, f) \
|
||||
((intptr_t)&((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= (s)->base.size)
|
||||
((intptr_t)&((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= \
|
||||
reinterpret_cast<cef_base_t*>(s)->size)
|
||||
|
||||
#define CEF_MEMBER_MISSING(s, f) (!CEF_MEMBER_EXISTS(s, f) || !((s)->f))
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -230,6 +230,27 @@ typedef struct _cef_navigation_entry_visitor_t {
|
||||
} cef_navigation_entry_visitor_t;
|
||||
|
||||
|
||||
///
|
||||
// Callback structure for cef_browser_host_t::PrintToPDF. The functions of this
|
||||
// structure will be called on the browser process UI thread.
|
||||
///
|
||||
typedef struct _cef_pdf_print_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Method that will be executed when the PDF printing has completed. |path| is
|
||||
// the output path. |ok| will be true (1) if the printing completed
|
||||
// successfully or false (0) otherwise.
|
||||
///
|
||||
void (CEF_CALLBACK *on_pdf_print_finished)(
|
||||
struct _cef_pdf_print_callback_t* self, const cef_string_t* path,
|
||||
int ok);
|
||||
} cef_pdf_print_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent the browser process aspects of a browser window.
|
||||
// The functions of this structure can only be called in the browser process.
|
||||
@@ -346,6 +367,17 @@ typedef struct _cef_browser_host_t {
|
||||
///
|
||||
void (CEF_CALLBACK *print)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Print the current browser contents to the PDF file specified by |path| and
|
||||
// execute |callback| on completion. The caller is responsible for deleting
|
||||
// |path| when done. For PDF printing to work on Linux you must implement the
|
||||
// cef_print_handler_t::GetPdfPaperSize function.
|
||||
///
|
||||
void (CEF_CALLBACK *print_to_pdf)(struct _cef_browser_host_t* self,
|
||||
const cef_string_t* path,
|
||||
const struct _cef_pdf_print_settings_t* settings,
|
||||
struct _cef_pdf_print_callback_t* callback);
|
||||
|
||||
///
|
||||
// Search for |searchText|. |identifier| can be used to have multiple searches
|
||||
// running simultaniously. |forward| indicates whether to search forward or
|
||||
@@ -505,6 +537,26 @@ typedef struct _cef_browser_host_t {
|
||||
void (CEF_CALLBACK *notify_move_or_resize_started)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Returns the maximum rate in frames per second (fps) that
|
||||
// cef_render_handler_t:: OnPaint will be called for a windowless browser. The
|
||||
// actual fps may be lower if the browser cannot generate frames at the
|
||||
// requested rate. The minimum value is 1 and the maximum value is 60 (default
|
||||
// 30). This function can only be called on the UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *get_windowless_frame_rate)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Set the maximum rate in frames per second (fps) that cef_render_handler_t::
|
||||
// OnPaint will be called for a windowless browser. The actual fps may be
|
||||
// lower if the browser cannot generate frames at the requested rate. The
|
||||
// minimum value is 1 and the maximum value is 60 (default 30). Can also be
|
||||
// set at browser creation via cef_browser_tSettings.windowless_frame_rate.
|
||||
///
|
||||
void (CEF_CALLBACK *set_windowless_frame_rate)(
|
||||
struct _cef_browser_host_t* self, int frame_rate);
|
||||
|
||||
///
|
||||
// Get the NSTextInputContext implementation for enabling IME on Mac when
|
||||
// window rendering is disabled.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -49,6 +49,29 @@ extern "C" {
|
||||
|
||||
struct _cef_context_menu_params_t;
|
||||
|
||||
///
|
||||
// Callback structure used for continuation of custom context menu display.
|
||||
///
|
||||
typedef struct _cef_run_context_menu_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Complete context menu display by selecting the specified |command_id| and
|
||||
// |event_flags|.
|
||||
///
|
||||
void (CEF_CALLBACK *cont)(struct _cef_run_context_menu_callback_t* self,
|
||||
int command_id, cef_event_flags_t event_flags);
|
||||
|
||||
///
|
||||
// Cancel context menu display.
|
||||
///
|
||||
void (CEF_CALLBACK *cancel)(struct _cef_run_context_menu_callback_t* self);
|
||||
} cef_run_context_menu_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle context menu events. The functions of this
|
||||
// structure will be called on the UI thread.
|
||||
@@ -71,6 +94,20 @@ typedef struct _cef_context_menu_handler_t {
|
||||
struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params,
|
||||
struct _cef_menu_model_t* model);
|
||||
|
||||
///
|
||||
// Called to allow custom display of the context menu. |params| provides
|
||||
// information about the context menu state. |model| contains the context menu
|
||||
// model resulting from OnBeforeContextMenu. For custom display return true
|
||||
// (1) and execute |callback| either synchronously or asynchronously with the
|
||||
// selected command ID. For default display return false (0). Do not keep
|
||||
// references to |params| or |model| outside of this callback.
|
||||
///
|
||||
int (CEF_CALLBACK *run_context_menu)(struct _cef_context_menu_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
struct _cef_context_menu_params_t* params,
|
||||
struct _cef_menu_model_t* model,
|
||||
struct _cef_run_context_menu_callback_t* callback);
|
||||
|
||||
///
|
||||
// Called to execute a command selected from the context menu. Return true (1)
|
||||
// if the command was handled or false (0) for the default implementation. See
|
||||
@@ -232,6 +269,18 @@ typedef struct _cef_context_menu_params_t {
|
||||
///
|
||||
cef_context_menu_edit_state_flags_t (CEF_CALLBACK *get_edit_state_flags)(
|
||||
struct _cef_context_menu_params_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the context menu contains items specified by the
|
||||
// renderer process (for example, plugin placeholder or pepper plugin menu
|
||||
// items).
|
||||
///
|
||||
int (CEF_CALLBACK *is_custom_menu)(struct _cef_context_menu_params_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the context menu was invoked from a pepper plugin.
|
||||
///
|
||||
int (CEF_CALLBACK *is_pepper_menu)(struct _cef_context_menu_params_t* self);
|
||||
} cef_context_menu_params_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -60,10 +60,10 @@ typedef struct _cef_cookie_manager_t {
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Set the schemes supported by this manager. By default only "http" and
|
||||
// "https" schemes are supported. If |callback| is non-NULL it will be
|
||||
// executed asnychronously on the IO thread after the change has been applied.
|
||||
// Must be called before any cookies are accessed.
|
||||
// Set the schemes supported by this manager. The default schemes ("http",
|
||||
// "https", "ws" and "wss") will always be supported. If |callback| is non-
|
||||
// NULL it will be executed asnychronously on the IO thread after the change
|
||||
// has been applied. Must be called before any cookies are accessed.
|
||||
///
|
||||
void (CEF_CALLBACK *set_supported_schemes)(struct _cef_cookie_manager_t* self,
|
||||
cef_string_list_t schemes, struct _cef_completion_callback_t* callback);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -76,6 +76,17 @@ typedef struct _cef_display_handler_t {
|
||||
void (CEF_CALLBACK *on_favicon_urlchange)(struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser, cef_string_list_t icon_urls);
|
||||
|
||||
///
|
||||
// Called when web content in the page has toggled fullscreen mode. If
|
||||
// |fullscreen| is true (1) the content will automatically be sized to fill
|
||||
// the browser content area. If |fullscreen| is false (0) the content will
|
||||
// automatically return to its original size and position. The client is
|
||||
// responsible for resizing the browser if desired.
|
||||
///
|
||||
void (CEF_CALLBACK *on_fullscreen_mode_change)(
|
||||
struct _cef_display_handler_t* self, struct _cef_browser_t* browser,
|
||||
int fullscreen);
|
||||
|
||||
///
|
||||
// Called when the browser is about to display a tooltip. |text| contains the
|
||||
// text that will be displayed in the tooltip. To handle the display of the
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -176,7 +176,8 @@ typedef struct _cef_frame_t {
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the globally unique identifier for this frame.
|
||||
// Returns the globally unique identifier for this frame or < 0 if the
|
||||
// underlying frame does not yet exist.
|
||||
///
|
||||
int64 (CEF_CALLBACK *get_identifier)(struct _cef_frame_t* self);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -76,19 +76,21 @@ typedef struct _cef_jsdialog_handler_t {
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to run a JavaScript dialog. The |default_prompt_text| value will be
|
||||
// specified for prompt dialogs only. Set |suppress_message| to true (1) and
|
||||
// return false (0) to suppress the message (suppressing messages is
|
||||
// preferable to immediately executing the callback as this is used to detect
|
||||
// presumably malicious behavior like spamming alert messages in
|
||||
// onbeforeunload). Set |suppress_message| to false (0) and return false (0)
|
||||
// to use the default implementation (the default implementation will show one
|
||||
// modal dialog at a time and suppress any additional dialog requests until
|
||||
// the displayed dialog is dismissed). Return true (1) if the application will
|
||||
// use a custom dialog or if the callback has been executed immediately.
|
||||
// Custom dialogs may be either modal or modeless. If a custom dialog is used
|
||||
// the application must execute |callback| once the custom dialog is
|
||||
// dismissed.
|
||||
// Called to run a JavaScript dialog. If |origin_url| and |accept_lang| are
|
||||
// non-NULL they can be passed to the CefFormatUrlForSecurityDisplay function
|
||||
// to retrieve a secure and user-friendly display string. The
|
||||
// |default_prompt_text| value will be specified for prompt dialogs only. Set
|
||||
// |suppress_message| to true (1) and return false (0) to suppress the message
|
||||
// (suppressing messages is preferable to immediately executing the callback
|
||||
// as this is used to detect presumably malicious behavior like spamming alert
|
||||
// messages in onbeforeunload). Set |suppress_message| to false (0) and return
|
||||
// false (0) to use the default implementation (the default implementation
|
||||
// will show one modal dialog at a time and suppress any additional dialog
|
||||
// requests until the displayed dialog is dismissed). Return true (1) if the
|
||||
// application will use a custom dialog or if the callback has been executed
|
||||
// immediately. Custom dialogs may be either modal or modeless. If a custom
|
||||
// dialog is used the application must execute |callback| once the custom
|
||||
// dialog is dismissed.
|
||||
///
|
||||
int (CEF_CALLBACK *on_jsdialog)(struct _cef_jsdialog_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* origin_url,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -101,14 +101,6 @@ typedef struct _cef_navigation_entry_t {
|
||||
///
|
||||
int (CEF_CALLBACK *has_post_data)(struct _cef_navigation_entry_t* self);
|
||||
|
||||
///
|
||||
// Returns the name of the sub-frame that navigated or an NULL value if the
|
||||
// main frame navigated.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_frame_name)(
|
||||
struct _cef_navigation_entry_t* self);
|
||||
|
||||
///
|
||||
// Returns the time for the last known successful navigation completion. A
|
||||
// navigation may be completed more than once if the page is reloaded. May be
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -60,6 +60,20 @@ CEF_EXPORT int cef_parse_url(const cef_string_t* url,
|
||||
CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
|
||||
cef_string_t* url);
|
||||
|
||||
///
|
||||
// This is a convenience function for formatting a URL in a concise and human-
|
||||
// friendly way to help users make security-related decisions (or in other
|
||||
// circumstances when people need to distinguish sites, origins, or otherwise-
|
||||
// simplified URLs from each other). Internationalized domain names (IDN) may be
|
||||
// presented in Unicode if |languages| accepts the Unicode representation. The
|
||||
// returned value will (a) omit the path for standard schemes, excepting file
|
||||
// and filesystem, and (b) omit the port if it is the default for the scheme. Do
|
||||
// not use this for URLs which will be parsed or sent to other applications.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
CEF_EXPORT cef_string_userfree_t cef_format_url_for_security_display(
|
||||
const cef_string_t* origin_url, const cef_string_t* languages);
|
||||
|
||||
///
|
||||
// Returns the mime type for the specified file extension or an NULL string if
|
||||
// unknown.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -95,6 +95,15 @@ typedef struct _cef_print_handler_t {
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called when printing has started for the specified |browser|. This function
|
||||
// will be called before the other OnPrint*() functions and irrespective of
|
||||
// how printing was initiated (e.g. cef_browser_host_t::print(), JavaScript
|
||||
// window.print() or PDF extension print button).
|
||||
///
|
||||
void (CEF_CALLBACK *on_print_start)(struct _cef_print_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
// Synchronize |settings| with client state. If |get_defaults| is true (1)
|
||||
// then populate |settings| with the default print settings. Do not keep a
|
||||
@@ -124,6 +133,13 @@ typedef struct _cef_print_handler_t {
|
||||
// Reset client state related to printing.
|
||||
///
|
||||
void (CEF_CALLBACK *on_print_reset)(struct _cef_print_handler_t* self);
|
||||
|
||||
///
|
||||
// Return the PDF paper size in device units. Used in combination with
|
||||
// cef_browser_host_t::print_to_pdf().
|
||||
///
|
||||
cef_size_t (CEF_CALLBACK *get_pdf_paper_size)(
|
||||
struct _cef_print_handler_t* self, int device_units_per_inch);
|
||||
} cef_print_handler_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -87,6 +87,27 @@ typedef struct _cef_request_t {
|
||||
void (CEF_CALLBACK *set_method)(struct _cef_request_t* self,
|
||||
const cef_string_t* method);
|
||||
|
||||
///
|
||||
// Set the referrer URL and policy. If non-NULL the referrer URL must be fully
|
||||
// qualified with an HTTP or HTTPS scheme component. Any username, password or
|
||||
// ref component will be removed.
|
||||
///
|
||||
void (CEF_CALLBACK *set_referrer)(struct _cef_request_t* self,
|
||||
const cef_string_t* referrer_url, cef_referrer_policy_t policy);
|
||||
|
||||
///
|
||||
// Get the referrer URL.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_referrer_url)(
|
||||
struct _cef_request_t* self);
|
||||
|
||||
///
|
||||
// Get the referrer policy.
|
||||
///
|
||||
cef_referrer_policy_t (CEF_CALLBACK *get_referrer_policy)(
|
||||
struct _cef_request_t* self);
|
||||
|
||||
///
|
||||
// Get the post data.
|
||||
///
|
||||
@@ -100,13 +121,14 @@ typedef struct _cef_request_t {
|
||||
struct _cef_post_data_t* postData);
|
||||
|
||||
///
|
||||
// Get the header values.
|
||||
// Get the header values. Will not include the Referer value if any.
|
||||
///
|
||||
void (CEF_CALLBACK *get_header_map)(struct _cef_request_t* self,
|
||||
cef_string_multimap_t headerMap);
|
||||
|
||||
///
|
||||
// Set the header values.
|
||||
// Set the header values. If a Referer value exists in the header map it will
|
||||
// be removed and ignored.
|
||||
///
|
||||
void (CEF_CALLBACK *set_header_map)(struct _cef_request_t* self,
|
||||
cef_string_multimap_t headerMap);
|
||||
@@ -190,6 +212,14 @@ typedef struct _cef_post_data_t {
|
||||
///
|
||||
int (CEF_CALLBACK *is_read_only)(struct _cef_post_data_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the underlying POST data includes elements that are not
|
||||
// represented by this cef_post_data_t object (for example, multi-part file
|
||||
// upload data). Modifying cef_post_data_t objects with excluded elements may
|
||||
// result in the request failing.
|
||||
///
|
||||
int (CEF_CALLBACK *has_excluded_elements)(struct _cef_post_data_t* self);
|
||||
|
||||
///
|
||||
// Returns the number of existing post data elements.
|
||||
///
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
#include "include/capi/cef_cookie_capi.h"
|
||||
#include "include/capi/cef_request_context_handler_capi.h"
|
||||
#include "include/capi/cef_values_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -140,6 +141,64 @@ typedef struct _cef_request_context_t {
|
||||
///
|
||||
int (CEF_CALLBACK *clear_scheme_handler_factories)(
|
||||
struct _cef_request_context_t* self);
|
||||
|
||||
///
|
||||
// Tells all renderer processes associated with this context to throw away
|
||||
// their plugin list cache. If |reload_pages| is true (1) they will also
|
||||
// reload all pages with plugins.
|
||||
// cef_request_tContextHandler::OnBeforePluginLoad may be called to rebuild
|
||||
// the plugin list cache.
|
||||
///
|
||||
void (CEF_CALLBACK *purge_plugin_list_cache)(
|
||||
struct _cef_request_context_t* self, int reload_pages);
|
||||
|
||||
///
|
||||
// Returns true (1) if a preference with the specified |name| exists. This
|
||||
// function must be called on the browser process UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *has_preference)(struct _cef_request_context_t* self,
|
||||
const cef_string_t* name);
|
||||
|
||||
///
|
||||
// Returns the value for the preference with the specified |name|. Returns
|
||||
// NULL if the preference does not exist. The returned object contains a copy
|
||||
// of the underlying preference value and modifications to the returned object
|
||||
// will not modify the underlying preference value. This function must be
|
||||
// called on the browser process UI thread.
|
||||
///
|
||||
struct _cef_value_t* (CEF_CALLBACK *get_preference)(
|
||||
struct _cef_request_context_t* self, const cef_string_t* name);
|
||||
|
||||
///
|
||||
// Returns all preferences as a dictionary. If |include_defaults| is true (1)
|
||||
// then preferences currently at their default value will be included. The
|
||||
// returned object contains a copy of the underlying preference values and
|
||||
// modifications to the returned object will not modify the underlying
|
||||
// preference values. This function must be called on the browser process UI
|
||||
// thread.
|
||||
///
|
||||
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_all_preferences)(
|
||||
struct _cef_request_context_t* self, int include_defaults);
|
||||
|
||||
///
|
||||
// Returns true (1) if the preference with the specified |name| can be
|
||||
// modified using SetPreference. As one example preferences set via the
|
||||
// command-line usually cannot be modified. This function must be called on
|
||||
// the browser process UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *can_set_preference)(struct _cef_request_context_t* self,
|
||||
const cef_string_t* name);
|
||||
|
||||
///
|
||||
// Set the |value| associated with preference |name|. Returns true (1) if the
|
||||
// value is set successfully and false (0) otherwise. If |value| is NULL the
|
||||
// preference will be restored to its default value. If setting the preference
|
||||
// fails then |error| will be populated with a detailed description of the
|
||||
// problem. This function must be called on the browser process UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *set_preference)(struct _cef_request_context_t* self,
|
||||
const cef_string_t* name, struct _cef_value_t* value,
|
||||
cef_string_t* error);
|
||||
} cef_request_context_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_cookie_capi.h"
|
||||
#include "include/capi/cef_web_plugin_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -58,12 +59,36 @@ typedef struct _cef_request_context_handler_t {
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called on the IO thread to retrieve the cookie manager. If this function
|
||||
// returns NULL the default cookie manager retrievable via
|
||||
// Called on the browser process IO thread to retrieve the cookie manager. If
|
||||
// this function returns NULL the default cookie manager retrievable via
|
||||
// cef_request_tContext::get_default_cookie_manager() will be used.
|
||||
///
|
||||
struct _cef_cookie_manager_t* (CEF_CALLBACK *get_cookie_manager)(
|
||||
struct _cef_request_context_handler_t* self);
|
||||
|
||||
///
|
||||
// Called on multiple browser process threads before a plugin instance is
|
||||
// loaded. |mime_type| is the mime type of the plugin that will be loaded.
|
||||
// |plugin_url| is the content URL that the plugin will load and may be NULL.
|
||||
// |top_origin_url| is the URL for the top-level frame that contains the
|
||||
// plugin when loading a specific plugin instance or NULL when building the
|
||||
// initial list of enabled plugins for 'navigator.plugins' JavaScript state.
|
||||
// |plugin_info| includes additional information about the plugin that will be
|
||||
// loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy|
|
||||
// and return true (1) to change the policy. Return false (0) to use the
|
||||
// recommended policy. The default plugin policy can be set at runtime using
|
||||
// the `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to
|
||||
// mark a plugin as disabled by setting |plugin_policy| to
|
||||
// PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is NULL. To
|
||||
// purge the plugin list cache and potentially trigger new calls to this
|
||||
// function call cef_request_tContext::PurgePluginListCache.
|
||||
///
|
||||
int (CEF_CALLBACK *on_before_plugin_load)(
|
||||
struct _cef_request_context_handler_t* self,
|
||||
const cef_string_t* mime_type, const cef_string_t* plugin_url,
|
||||
const cef_string_t* top_origin_url,
|
||||
struct _cef_web_plugin_info_t* plugin_info,
|
||||
cef_plugin_policy_t* plugin_policy);
|
||||
} cef_request_context_handler_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -45,8 +45,8 @@
|
||||
#include "include/capi/cef_request_capi.h"
|
||||
#include "include/capi/cef_resource_handler_capi.h"
|
||||
#include "include/capi/cef_response_capi.h"
|
||||
#include "include/capi/cef_response_filter_capi.h"
|
||||
#include "include/capi/cef_ssl_info_capi.h"
|
||||
#include "include/capi/cef_web_plugin_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -163,13 +163,38 @@ typedef struct _cef_request_handler_t {
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
struct _cef_request_t* request, struct _cef_response_t* response);
|
||||
|
||||
///
|
||||
// Called on the IO thread to optionally filter resource response content.
|
||||
// |request| and |response| represent the request and response respectively
|
||||
// and cannot be modified in this callback.
|
||||
///
|
||||
struct _cef_response_filter_t* (CEF_CALLBACK *get_resource_response_filter)(
|
||||
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, struct _cef_request_t* request,
|
||||
struct _cef_response_t* response);
|
||||
|
||||
///
|
||||
// Called on the IO thread when a resource load has completed. |request| and
|
||||
// |response| represent the request and response respectively and cannot be
|
||||
// modified in this callback. |status| indicates the load completion status.
|
||||
// |received_content_length| is the number of response bytes actually read.
|
||||
///
|
||||
void (CEF_CALLBACK *on_resource_load_complete)(
|
||||
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, struct _cef_request_t* request,
|
||||
struct _cef_response_t* response, cef_urlrequest_status_t status,
|
||||
int64 received_content_length);
|
||||
|
||||
///
|
||||
// Called on the IO thread when the browser needs credentials from the user.
|
||||
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
||||
// hostname and |port| contains the port number. Return true (1) to continue
|
||||
// the request and call cef_auth_callback_t::cont() either in this function or
|
||||
// at a later time when the authentication information is available. Return
|
||||
// false (0) to cancel the request immediately.
|
||||
// hostname and |port| contains the port number. |realm| is the realm of the
|
||||
// challenge and may be NULL. |scheme| is the authentication scheme used, such
|
||||
// as "basic" or "digest", and will be NULL if the source of the request is an
|
||||
// FTP server. Return true (1) to continue the request and call
|
||||
// cef_auth_callback_t::cont() either in this function or at a later time when
|
||||
// the authentication information is available. Return false (0) to cancel the
|
||||
// request immediately.
|
||||
///
|
||||
int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy,
|
||||
@@ -204,24 +229,15 @@ typedef struct _cef_request_handler_t {
|
||||
// Called on the UI thread to handle requests for URLs with an invalid SSL
|
||||
// certificate. Return true (1) and call cef_request_tCallback::cont() either
|
||||
// in this function or at a later time to continue or cancel the request.
|
||||
// Return false (0) to cancel the request immediately. If |callback| is NULL
|
||||
// the error cannot be recovered from and the request will be canceled
|
||||
// automatically. If CefSettings.ignore_certificate_errors is set all invalid
|
||||
// certificates will be accepted without calling this function.
|
||||
// Return false (0) to cancel the request immediately. If
|
||||
// CefSettings.ignore_certificate_errors is set all invalid certificates will
|
||||
// be accepted without calling this function.
|
||||
///
|
||||
int (CEF_CALLBACK *on_certificate_error)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, cef_errorcode_t cert_error,
|
||||
const cef_string_t* request_url, struct _cef_sslinfo_t* ssl_info,
|
||||
struct _cef_request_callback_t* callback);
|
||||
|
||||
///
|
||||
// Called on the browser process IO thread before a plugin is loaded. Return
|
||||
// true (1) to block loading of the plugin.
|
||||
///
|
||||
int (CEF_CALLBACK *on_before_plugin_load)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* url,
|
||||
const cef_string_t* policy_url, struct _cef_web_plugin_info_t* info);
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread when a plugin has crashed.
|
||||
// |plugin_path| is the path of the plugin that crashed.
|
||||
|
107
include/capi/cef_resource_bundle_capi.h
Normal file
107
include/capi/cef_resource_bundle_capi.h
Normal file
@@ -0,0 +1,107 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Structure used for retrieving resources from the resource bundle (*.pak)
|
||||
// files loaded by CEF during startup or via the cef_resource_bundle_tHandler
|
||||
// returned from cef_app_t::GetResourceBundleHandler. See CefSettings for
|
||||
// additional options related to resource bundle loading. The functions of this
|
||||
// structure may be called on any thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_resource_bundle_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the localized string for the specified |string_id| or an NULL
|
||||
// string if the value is not found. Include cef_pack_strings.h for a listing
|
||||
// of valid string ID values.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_localized_string)(
|
||||
struct _cef_resource_bundle_t* self, int string_id);
|
||||
|
||||
///
|
||||
// Retrieves the contents of the specified scale independent |resource_id|. If
|
||||
// the value is found then |data| and |data_size| will be populated and this
|
||||
// function will return true (1). If the value is not found then this function
|
||||
// will return false (0). The returned |data| pointer will remain resident in
|
||||
// memory and should not be freed. Include cef_pack_resources.h for a listing
|
||||
// of valid resource ID values.
|
||||
///
|
||||
int (CEF_CALLBACK *get_data_resource)(struct _cef_resource_bundle_t* self,
|
||||
int resource_id, void** data, size_t* data_size);
|
||||
|
||||
///
|
||||
// Retrieves the contents of the specified |resource_id| nearest the scale
|
||||
// factor |scale_factor|. Use a |scale_factor| value of SCALE_FACTOR_NONE for
|
||||
// scale independent resources or call GetDataResource instead. If the value
|
||||
// is found then |data| and |data_size| will be populated and this function
|
||||
// will return true (1). If the value is not found then this function will
|
||||
// return false (0). The returned |data| pointer will remain resident in
|
||||
// memory and should not be freed. Include cef_pack_resources.h for a listing
|
||||
// of valid resource ID values.
|
||||
///
|
||||
int (CEF_CALLBACK *get_data_resource_for_scale)(
|
||||
struct _cef_resource_bundle_t* self, int resource_id,
|
||||
cef_scale_factor_t scale_factor, void** data, size_t* data_size);
|
||||
} cef_resource_bundle_t;
|
||||
|
||||
|
||||
///
|
||||
// Returns the global resource bundle instance.
|
||||
///
|
||||
CEF_EXPORT cef_resource_bundle_t* cef_resource_bundle_get_global();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -46,8 +46,9 @@ extern "C" {
|
||||
|
||||
|
||||
///
|
||||
// Structure used to implement a custom resource bundle structure. The functions
|
||||
// of this structure may be called on multiple threads.
|
||||
// Structure used to implement a custom resource bundle structure. See
|
||||
// CefSettings for additional options related to resource bundle loading. The
|
||||
// functions of this structure may be called on multiple threads.
|
||||
///
|
||||
typedef struct _cef_resource_bundle_handler_t {
|
||||
///
|
||||
@@ -56,26 +57,38 @@ typedef struct _cef_resource_bundle_handler_t {
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to retrieve a localized translation for the string specified by
|
||||
// |message_id|. To provide the translation set |string| to the translation
|
||||
// string and return true (1). To use the default translation return false
|
||||
// (0). Supported message IDs are listed in cef_pack_strings.h.
|
||||
// Called to retrieve a localized translation for the specified |string_id|.
|
||||
// To provide the translation set |string| to the translation string and
|
||||
// return true (1). To use the default translation return false (0). Include
|
||||
// cef_pack_strings.h for a listing of valid string ID values.
|
||||
///
|
||||
int (CEF_CALLBACK *get_localized_string)(
|
||||
struct _cef_resource_bundle_handler_t* self, int message_id,
|
||||
struct _cef_resource_bundle_handler_t* self, int string_id,
|
||||
cef_string_t* string);
|
||||
|
||||
///
|
||||
// Called to retrieve data for the resource specified by |resource_id|. To
|
||||
// provide the resource data set |data| and |data_size| to the data pointer
|
||||
// Called to retrieve data for the specified scale independent |resource_id|.
|
||||
// To provide the resource data set |data| and |data_size| to the data pointer
|
||||
// and size respectively and return true (1). To use the default resource data
|
||||
// return false (0). The resource data will not be copied and must remain
|
||||
// resident in memory. Supported resource IDs are listed in
|
||||
// cef_pack_resources.h.
|
||||
// resident in memory. Include cef_pack_resources.h for a listing of valid
|
||||
// resource ID values.
|
||||
///
|
||||
int (CEF_CALLBACK *get_data_resource)(
|
||||
struct _cef_resource_bundle_handler_t* self, int resource_id, void** data,
|
||||
size_t* data_size);
|
||||
|
||||
///
|
||||
// Called to retrieve data for the specified |resource_id| nearest the scale
|
||||
// factor |scale_factor|. To provide the resource data set |data| and
|
||||
// |data_size| to the data pointer and size respectively and return true (1).
|
||||
// To use the default resource data return false (0). The resource data will
|
||||
// not be copied and must remain resident in memory. Include
|
||||
// cef_pack_resources.h for a listing of valid resource ID values.
|
||||
///
|
||||
int (CEF_CALLBACK *get_data_resource_for_scale)(
|
||||
struct _cef_resource_bundle_handler_t* self, int resource_id,
|
||||
cef_scale_factor_t scale_factor, void** data, size_t* data_size);
|
||||
} cef_resource_bundle_handler_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
91
include/capi/cef_response_filter_capi.h
Normal file
91
include/capi/cef_response_filter_capi.h
Normal file
@@ -0,0 +1,91 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to filter resource response content. The functions
|
||||
// of this structure will be called on the browser process IO thread.
|
||||
///
|
||||
typedef struct _cef_response_filter_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Initialize the response filter. Will only be called a single time. The
|
||||
// filter will not be installed if this function returns false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *init_filter)(struct _cef_response_filter_t* self);
|
||||
|
||||
// Called to filter a chunk of data. |data_in| is the input buffer containing
|
||||
// |data_in_size| bytes of pre-filter data (|data_in| will be NULL if
|
||||
// |data_in_size| is zero). |data_out| is the output buffer that can accept up
|
||||
// to |data_out_size| bytes of filtered output data. Set |data_in_read| to the
|
||||
// number of bytes that were read from |data_in|. Set |data_out_written| to
|
||||
// the number of bytes that were written into |data_out|. If some or all of
|
||||
// the pre-filter data was read successfully but more data is needed in order
|
||||
// to continue filtering (filtered output is pending) return
|
||||
// RESPONSE_FILTER_NEED_MORE_DATA. If some or all of the pre-filter data was
|
||||
// read successfully and all available filtered output has been written return
|
||||
// RESPONSE_FILTER_DONE. If an error occurs during filtering return
|
||||
// RESPONSE_FILTER_ERROR. This function will be called repeatedly until there
|
||||
// is no more data to filter (resource response is complete), |data_in_read|
|
||||
// matches |data_in_size| (all available pre-filter bytes have been read), and
|
||||
// the function returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not
|
||||
// keep a reference to the buffers passed to this function.
|
||||
cef_response_filter_status_t (CEF_CALLBACK *filter)(
|
||||
struct _cef_response_filter_t* self, void* data_in, size_t data_in_size,
|
||||
size_t* data_in_read, void* data_out, size_t data_out_size,
|
||||
size_t* data_out_written);
|
||||
} cef_response_filter_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -126,6 +126,24 @@ typedef struct _cef_sslinfo_t {
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns a bitmask containing any and all problems verifying the server
|
||||
// certificate.
|
||||
///
|
||||
cef_cert_status_t (CEF_CALLBACK *get_cert_status)(
|
||||
struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the certificate status has any error, major or minor.
|
||||
///
|
||||
int (CEF_CALLBACK *is_cert_status_error)(struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the certificate status represents only minor errors
|
||||
// (e.g. failure to verify certificate revocation).
|
||||
///
|
||||
int (CEF_CALLBACK *is_cert_status_minor_error)(struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the subject of the X.509 certificate. For HTTPS server certificates
|
||||
// this represents the web server. The common name of the subject should
|
||||
@@ -170,6 +188,28 @@ typedef struct _cef_sslinfo_t {
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_pemencoded)(
|
||||
struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the number of certificates in the issuer chain. If 0, the
|
||||
// certificate is self-signed.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_issuer_chain_size)(struct _cef_sslinfo_t* self);
|
||||
|
||||
///
|
||||
// Returns the DER encoded data for the certificate issuer chain. If we failed
|
||||
// to encode a certificate in the chain it is still present in the array but
|
||||
// is an NULL string.
|
||||
///
|
||||
void (CEF_CALLBACK *get_derencoded_issuer_chain)(struct _cef_sslinfo_t* self,
|
||||
size_t* chainCount, struct _cef_binary_value_t** chain);
|
||||
|
||||
///
|
||||
// Returns the PEM encoded data for the certificate issuer chain. If we failed
|
||||
// to encode a certificate in the chain it is still present in the array but
|
||||
// is an NULL string.
|
||||
///
|
||||
void (CEF_CALLBACK *get_pemencoded_issuer_chain)(struct _cef_sslinfo_t* self,
|
||||
size_t* chainCount, struct _cef_binary_value_t** chain);
|
||||
} cef_sslinfo_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -39,12 +39,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_browser_t;
|
||||
|
||||
///
|
||||
// Information about a specific web plugin.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
@@ -101,7 +101,8 @@ typedef struct _cef_zip_reader_t {
|
||||
///
|
||||
// Returns the last modified timestamp for the file.
|
||||
///
|
||||
time_t (CEF_CALLBACK *get_file_last_modified)(struct _cef_zip_reader_t* self);
|
||||
cef_time_t (CEF_CALLBACK *get_file_last_modified)(
|
||||
struct _cef_zip_reader_t* self);
|
||||
|
||||
///
|
||||
// Opens the file for reading of uncompressed data. A read password may
|
||||
|
493
include/capi/test/cef_translator_test_capi.h
Normal file
493
include/capi/test/cef_translator_test_capi.h
Normal file
@@ -0,0 +1,493 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_TEST_CEF_TRANSLATOR_TEST_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_TEST_CEF_TRANSLATOR_TEST_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_translator_test_handler_child_t;
|
||||
struct _cef_translator_test_handler_t;
|
||||
struct _cef_translator_test_object_child_t;
|
||||
struct _cef_translator_test_object_t;
|
||||
|
||||
///
|
||||
// Structure for testing all of the possible data transfer types.
|
||||
///
|
||||
typedef struct _cef_translator_test_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
|
||||
// PRIMITIVE VALUES
|
||||
|
||||
///
|
||||
// Return a void value.
|
||||
///
|
||||
void (CEF_CALLBACK *get_void)(struct _cef_translator_test_t* self);
|
||||
|
||||
///
|
||||
// Return a bool value.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_translator_test_t* self);
|
||||
|
||||
///
|
||||
// Return an int value.
|
||||
///
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_translator_test_t* self);
|
||||
|
||||
///
|
||||
// Return a double value.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_translator_test_t* self);
|
||||
|
||||
///
|
||||
// Return a long value.
|
||||
///
|
||||
long (CEF_CALLBACK *get_long)(struct _cef_translator_test_t* self);
|
||||
|
||||
///
|
||||
// Return a size_t value.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_sizet)(struct _cef_translator_test_t* self);
|
||||
|
||||
///
|
||||
// Set a void value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_void)(struct _cef_translator_test_t* self);
|
||||
|
||||
///
|
||||
// Set a bool value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_translator_test_t* self, int val);
|
||||
|
||||
///
|
||||
// Set an int value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_translator_test_t* self, int val);
|
||||
|
||||
///
|
||||
// Set a double value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_translator_test_t* self,
|
||||
double val);
|
||||
|
||||
///
|
||||
// Set a long value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_long)(struct _cef_translator_test_t* self, long val);
|
||||
|
||||
///
|
||||
// Set a size_t value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_sizet)(struct _cef_translator_test_t* self,
|
||||
size_t val);
|
||||
|
||||
///
|
||||
// Set a int list value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_int_list)(struct _cef_translator_test_t* self,
|
||||
size_t valCount, int const* val);
|
||||
|
||||
///
|
||||
// Return an int list value by out-param.
|
||||
///
|
||||
int (CEF_CALLBACK *get_int_list_by_ref)(struct _cef_translator_test_t* self,
|
||||
size_t* valCount, int* val);
|
||||
|
||||
///
|
||||
// Return the number of points that will be output above.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_int_list_size)(struct _cef_translator_test_t* self);
|
||||
|
||||
|
||||
// STRING VALUES
|
||||
|
||||
///
|
||||
// Return a string value.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string)(
|
||||
struct _cef_translator_test_t* self);
|
||||
|
||||
///
|
||||
// Set a string value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_translator_test_t* self,
|
||||
const cef_string_t* val);
|
||||
|
||||
///
|
||||
// Return a string value by out-param.
|
||||
///
|
||||
void (CEF_CALLBACK *get_string_by_ref)(struct _cef_translator_test_t* self,
|
||||
cef_string_t* val);
|
||||
|
||||
///
|
||||
// Set a string list value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string_list)(struct _cef_translator_test_t* self,
|
||||
cef_string_list_t val);
|
||||
|
||||
///
|
||||
// Return a string list value by out-param.
|
||||
///
|
||||
int (CEF_CALLBACK *get_string_list_by_ref)(
|
||||
struct _cef_translator_test_t* self, cef_string_list_t val);
|
||||
|
||||
///
|
||||
// Set a string map value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string_map)(struct _cef_translator_test_t* self,
|
||||
cef_string_map_t val);
|
||||
|
||||
///
|
||||
// Return a string map value by out-param.
|
||||
///
|
||||
int (CEF_CALLBACK *get_string_map_by_ref)(struct _cef_translator_test_t* self,
|
||||
cef_string_map_t val);
|
||||
|
||||
///
|
||||
// Set a string multimap value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string_multimap)(struct _cef_translator_test_t* self,
|
||||
cef_string_multimap_t val);
|
||||
|
||||
///
|
||||
// Return a string multimap value by out-param.
|
||||
///
|
||||
int (CEF_CALLBACK *get_string_multimap_by_ref)(
|
||||
struct _cef_translator_test_t* self, cef_string_multimap_t val);
|
||||
|
||||
|
||||
// STRUCT VALUES
|
||||
|
||||
///
|
||||
// Return a point value.
|
||||
///
|
||||
cef_point_t (CEF_CALLBACK *get_point)(struct _cef_translator_test_t* self);
|
||||
|
||||
///
|
||||
// Set a point value.
|
||||
///
|
||||
int (CEF_CALLBACK *set_point)(struct _cef_translator_test_t* self,
|
||||
const cef_point_t* val);
|
||||
|
||||
///
|
||||
// Return a point value by out-param.
|
||||
///
|
||||
void (CEF_CALLBACK *get_point_by_ref)(struct _cef_translator_test_t* self,
|
||||
cef_point_t* val);
|
||||
|
||||
///
|
||||
// Set a point list vlaue.
|
||||
///
|
||||
int (CEF_CALLBACK *set_point_list)(struct _cef_translator_test_t* self,
|
||||
size_t valCount, cef_point_t const* val);
|
||||
|
||||
///
|
||||
// Return a point list value by out-param.
|
||||
///
|
||||
int (CEF_CALLBACK *get_point_list_by_ref)(struct _cef_translator_test_t* self,
|
||||
size_t* valCount, cef_point_t* val);
|
||||
|
||||
///
|
||||
// Return the number of points that will be output above.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_point_list_size)(
|
||||
struct _cef_translator_test_t* self);
|
||||
|
||||
|
||||
// LIBRARY-SIDE OBJECT VALUES
|
||||
|
||||
///
|
||||
// Return an new library-side object.
|
||||
///
|
||||
struct _cef_translator_test_object_t* (CEF_CALLBACK *get_object)(
|
||||
struct _cef_translator_test_t* self, int val);
|
||||
|
||||
///
|
||||
// Set an object. Returns the value from
|
||||
// cef_translator_test_object_t::get_value(). This tests input and execution
|
||||
// of a library-side object type.
|
||||
///
|
||||
int (CEF_CALLBACK *set_object)(struct _cef_translator_test_t* self,
|
||||
struct _cef_translator_test_object_t* val);
|
||||
|
||||
///
|
||||
// Set an object. Returns the object passed in. This tests input and output of
|
||||
// a library-side object type.
|
||||
///
|
||||
struct _cef_translator_test_object_t* (CEF_CALLBACK *set_object_and_return)(
|
||||
struct _cef_translator_test_t* self,
|
||||
struct _cef_translator_test_object_t* val);
|
||||
|
||||
///
|
||||
// Set a child object. Returns the value from
|
||||
// cef_translator_test_object_t::get_value(). This tests input of a library-
|
||||
// side child object type and execution as the parent type.
|
||||
///
|
||||
int (CEF_CALLBACK *set_child_object)(struct _cef_translator_test_t* self,
|
||||
struct _cef_translator_test_object_child_t* val);
|
||||
|
||||
///
|
||||
// Set a child object. Returns the object as the parent type. This tests input
|
||||
// of a library-side child object type and return as the parent type.
|
||||
///
|
||||
struct _cef_translator_test_object_t* (
|
||||
CEF_CALLBACK *set_child_object_and_return_parent)(
|
||||
struct _cef_translator_test_t* self,
|
||||
struct _cef_translator_test_object_child_t* val);
|
||||
|
||||
///
|
||||
// Set an object list vlaue.
|
||||
///
|
||||
int (CEF_CALLBACK *set_object_list)(struct _cef_translator_test_t* self,
|
||||
size_t valCount, struct _cef_translator_test_object_t* const* val,
|
||||
int val1, int val2);
|
||||
|
||||
///
|
||||
// Return an object list value by out-param.
|
||||
///
|
||||
int (CEF_CALLBACK *get_object_list_by_ref)(
|
||||
struct _cef_translator_test_t* self, size_t* valCount,
|
||||
struct _cef_translator_test_object_t** val, int val1, int val2);
|
||||
|
||||
///
|
||||
// Return the number of object that will be output above.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_object_list_size)(
|
||||
struct _cef_translator_test_t* self);
|
||||
|
||||
|
||||
// CLIENT-SIDE OBJECT VALUES
|
||||
|
||||
///
|
||||
// Set an object. Returns the value from
|
||||
// cef_translator_test_handler_t::get_value(). This tests input and execution
|
||||
// of a client-side object type.
|
||||
///
|
||||
int (CEF_CALLBACK *set_handler)(struct _cef_translator_test_t* self,
|
||||
struct _cef_translator_test_handler_t* val);
|
||||
|
||||
///
|
||||
// Set an object. Returns the handler passed in. This tests input and output
|
||||
// of a client-side object type.
|
||||
///
|
||||
struct _cef_translator_test_handler_t* (CEF_CALLBACK *set_handler_and_return)(
|
||||
struct _cef_translator_test_t* self,
|
||||
struct _cef_translator_test_handler_t* val);
|
||||
|
||||
///
|
||||
// Set a child object. Returns the value from
|
||||
// cef_translator_test_handler_t::get_value(). This tests input of a client-
|
||||
// side child object type and execution as the parent type.
|
||||
///
|
||||
int (CEF_CALLBACK *set_child_handler)(struct _cef_translator_test_t* self,
|
||||
struct _cef_translator_test_handler_child_t* val);
|
||||
|
||||
///
|
||||
// Set a child object. Returns the object as the parent type. This tests input
|
||||
// of a client-side child object type and return as the parent type.
|
||||
///
|
||||
struct _cef_translator_test_handler_t* (
|
||||
CEF_CALLBACK *set_child_handler_and_return_parent)(
|
||||
struct _cef_translator_test_t* self,
|
||||
struct _cef_translator_test_handler_child_t* val);
|
||||
|
||||
///
|
||||
// Set an object list vlaue.
|
||||
///
|
||||
int (CEF_CALLBACK *set_handler_list)(struct _cef_translator_test_t* self,
|
||||
size_t valCount, struct _cef_translator_test_handler_t* const* val,
|
||||
int val1, int val2);
|
||||
|
||||
///
|
||||
// Return an object list value by out-param.
|
||||
///
|
||||
int (CEF_CALLBACK *get_handler_list_by_ref)(
|
||||
struct _cef_translator_test_t* self, size_t* valCount,
|
||||
struct _cef_translator_test_handler_t** val,
|
||||
struct _cef_translator_test_handler_t* val1,
|
||||
struct _cef_translator_test_handler_t* val2);
|
||||
|
||||
///
|
||||
// Return the number of object that will be output above.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_handler_list_size)(
|
||||
struct _cef_translator_test_t* self);
|
||||
} cef_translator_test_t;
|
||||
|
||||
|
||||
///
|
||||
// Create the test object.
|
||||
///
|
||||
CEF_EXPORT cef_translator_test_t* cef_translator_test_create();
|
||||
|
||||
|
||||
///
|
||||
// Library-side test object.
|
||||
///
|
||||
typedef struct _cef_translator_test_object_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Return a value.
|
||||
///
|
||||
int (CEF_CALLBACK *get_value)(struct _cef_translator_test_object_t* self);
|
||||
|
||||
///
|
||||
// Set a value.
|
||||
///
|
||||
void (CEF_CALLBACK *set_value)(struct _cef_translator_test_object_t* self,
|
||||
int value);
|
||||
} cef_translator_test_object_t;
|
||||
|
||||
|
||||
///
|
||||
// Create the test object.
|
||||
///
|
||||
CEF_EXPORT cef_translator_test_object_t* cef_translator_test_object_create(
|
||||
int value);
|
||||
|
||||
|
||||
///
|
||||
// Library-side child test object.
|
||||
///
|
||||
typedef struct _cef_translator_test_object_child_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_translator_test_object_t base;
|
||||
|
||||
///
|
||||
// Return a value.
|
||||
///
|
||||
int (CEF_CALLBACK *get_other_value)(
|
||||
struct _cef_translator_test_object_child_t* self);
|
||||
|
||||
///
|
||||
// Set a value.
|
||||
///
|
||||
void (CEF_CALLBACK *set_other_value)(
|
||||
struct _cef_translator_test_object_child_t* self, int value);
|
||||
} cef_translator_test_object_child_t;
|
||||
|
||||
|
||||
///
|
||||
// Create the test object.
|
||||
///
|
||||
CEF_EXPORT cef_translator_test_object_child_t* cef_translator_test_object_child_create(
|
||||
int value, int other_value);
|
||||
|
||||
|
||||
///
|
||||
// Another library-side child test object.
|
||||
///
|
||||
typedef struct _cef_translator_test_object_child_child_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_translator_test_object_child_t base;
|
||||
|
||||
///
|
||||
// Return a value.
|
||||
///
|
||||
int (CEF_CALLBACK *get_other_other_value)(
|
||||
struct _cef_translator_test_object_child_child_t* self);
|
||||
|
||||
///
|
||||
// Set a value.
|
||||
///
|
||||
void (CEF_CALLBACK *set_other_other_value)(
|
||||
struct _cef_translator_test_object_child_child_t* self, int value);
|
||||
} cef_translator_test_object_child_child_t;
|
||||
|
||||
|
||||
///
|
||||
// Create the test object.
|
||||
///
|
||||
CEF_EXPORT cef_translator_test_object_child_child_t* cef_translator_test_object_child_child_create(
|
||||
int value, int other_value, int other_other_value);
|
||||
|
||||
|
||||
///
|
||||
// Client-side test object.
|
||||
///
|
||||
typedef struct _cef_translator_test_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Return a value.
|
||||
///
|
||||
int (CEF_CALLBACK *get_value)(struct _cef_translator_test_handler_t* self);
|
||||
} cef_translator_test_handler_t;
|
||||
|
||||
|
||||
///
|
||||
// Client-side child test object.
|
||||
///
|
||||
typedef struct _cef_translator_test_handler_child_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_translator_test_handler_t base;
|
||||
|
||||
///
|
||||
// Return a value.
|
||||
///
|
||||
int (CEF_CALLBACK *get_other_value)(
|
||||
struct _cef_translator_test_handler_child_t* self);
|
||||
} cef_translator_test_handler_child_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_TEST_CEF_TRANSLATOR_TEST_CAPI_H_
|
@@ -234,6 +234,23 @@ class CefNavigationEntryVisitor : public virtual CefBase {
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Callback interface for CefBrowserHost::PrintToPDF. The methods of this class
|
||||
// will be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefPdfPrintCallback : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Method that will be executed when the PDF printing has completed. |path|
|
||||
// is the output path. |ok| will be true if the printing completed
|
||||
// successfully or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPdfPrintFinished(const CefString& path, bool ok) =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class used to represent the browser process aspects of a browser window. The
|
||||
// methods of this class can only be called in the browser process. They may be
|
||||
@@ -389,6 +406,17 @@ class CefBrowserHost : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual void Print() =0;
|
||||
|
||||
///
|
||||
// Print the current browser contents to the PDF file specified by |path| and
|
||||
// execute |callback| on completion. The caller is responsible for deleting
|
||||
// |path| when done. For PDF printing to work on Linux you must implement the
|
||||
// CefPrintHandler::GetPdfPaperSize method.
|
||||
///
|
||||
/*--cef(optional_param=callback)--*/
|
||||
virtual void PrintToPDF(const CefString& path,
|
||||
const CefPdfPrintSettings& settings,
|
||||
CefRefPtr<CefPdfPrintCallback> callback) =0;
|
||||
|
||||
///
|
||||
// Search for |searchText|. |identifier| can be used to have multiple searches
|
||||
// running simultaniously. |forward| indicates whether to search forward or
|
||||
@@ -555,6 +583,26 @@ class CefBrowserHost : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual void NotifyMoveOrResizeStarted() =0;
|
||||
|
||||
///
|
||||
// Returns the maximum rate in frames per second (fps) that CefRenderHandler::
|
||||
// OnPaint will be called for a windowless browser. The actual fps may be
|
||||
// lower if the browser cannot generate frames at the requested rate. The
|
||||
// minimum value is 1 and the maximum value is 60 (default 30). This method
|
||||
// can only be called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetWindowlessFrameRate() =0;
|
||||
|
||||
///
|
||||
// Set the maximum rate in frames per second (fps) that CefRenderHandler::
|
||||
// OnPaint will be called for a windowless browser. The actual fps may be
|
||||
// lower if the browser cannot generate frames at the requested rate. The
|
||||
// minimum value is 1 and the maximum value is 60 (default 30). Can also be
|
||||
// set at browser creation via CefBrowserSettings.windowless_frame_rate.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetWindowlessFrameRate(int frame_rate) =0;
|
||||
|
||||
///
|
||||
// Get the NSTextInputContext implementation for enabling IME on Mac when
|
||||
// window rendering is disabled.
|
||||
|
@@ -45,6 +45,30 @@
|
||||
|
||||
class CefContextMenuParams;
|
||||
|
||||
|
||||
///
|
||||
// Callback interface used for continuation of custom context menu display.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefRunContextMenuCallback : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_event_flags_t EventFlags;
|
||||
|
||||
///
|
||||
// Complete context menu display by selecting the specified |command_id| and
|
||||
// |event_flags|.
|
||||
///
|
||||
/*--cef(capi_name=cont)--*/
|
||||
virtual void Continue(int command_id, EventFlags event_flags) =0;
|
||||
|
||||
///
|
||||
// Cancel context menu display.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Cancel() =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Implement this interface to handle context menu events. The methods of this
|
||||
// class will be called on the UI thread.
|
||||
@@ -67,6 +91,23 @@ class CefContextMenuHandler : public virtual CefBase {
|
||||
CefRefPtr<CefContextMenuParams> params,
|
||||
CefRefPtr<CefMenuModel> model) {}
|
||||
|
||||
///
|
||||
// Called to allow custom display of the context menu. |params| provides
|
||||
// information about the context menu state. |model| contains the context menu
|
||||
// model resulting from OnBeforeContextMenu. For custom display return true
|
||||
// and execute |callback| either synchronously or asynchronously with the
|
||||
// selected command ID. For default display return false. Do not keep
|
||||
// references to |params| or |model| outside of this callback.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool RunContextMenu(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefContextMenuParams> params,
|
||||
CefRefPtr<CefMenuModel> model,
|
||||
CefRefPtr<CefRunContextMenuCallback> callback) {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called to execute a command selected from the context menu. Return true if
|
||||
// the command was handled or false for the default implementation. See
|
||||
@@ -226,6 +267,19 @@ class CefContextMenuParams : public virtual CefBase {
|
||||
///
|
||||
/*--cef(default_retval=CM_EDITFLAG_NONE)--*/
|
||||
virtual EditStateFlags GetEditStateFlags() =0;
|
||||
|
||||
///
|
||||
// Returns true if the context menu contains items specified by the renderer
|
||||
// process (for example, plugin placeholder or pepper plugin menu items).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsCustomMenu() =0;
|
||||
|
||||
///
|
||||
// Returns true if the context menu was invoked from a pepper plugin.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsPepperMenu() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_CONTEXT_MENU_HANDLER_H_
|
||||
|
@@ -80,10 +80,10 @@ class CefCookieManager : public virtual CefBase {
|
||||
CefRefPtr<CefCompletionCallback> callback);
|
||||
|
||||
///
|
||||
// Set the schemes supported by this manager. By default only "http" and
|
||||
// "https" schemes are supported. If |callback| is non-NULL it will be
|
||||
// executed asnychronously on the IO thread after the change has been applied.
|
||||
// Must be called before any cookies are accessed.
|
||||
// Set the schemes supported by this manager. The default schemes ("http",
|
||||
// "https", "ws" and "wss") will always be supported. If |callback| is non-
|
||||
// NULL it will be executed asnychronously on the IO thread after the change
|
||||
// has been applied. Must be called before any cookies are accessed.
|
||||
///
|
||||
/*--cef(optional_param=callback)--*/
|
||||
virtual void SetSupportedSchemes(
|
||||
|
@@ -71,6 +71,17 @@ class CefDisplayHandler : public virtual CefBase {
|
||||
virtual void OnFaviconURLChange(CefRefPtr<CefBrowser> browser,
|
||||
const std::vector<CefString>& icon_urls) {}
|
||||
|
||||
///
|
||||
// Called when web content in the page has toggled fullscreen mode. If
|
||||
// |fullscreen| is true the content will automatically be sized to fill the
|
||||
// browser content area. If |fullscreen| is false the content will
|
||||
// automatically return to its original size and position. The client is
|
||||
// responsible for resizing the browser if desired.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnFullscreenModeChange(CefRefPtr<CefBrowser> browser,
|
||||
bool fullscreen) {}
|
||||
|
||||
///
|
||||
// Called when the browser is about to display a tooltip. |text| contains the
|
||||
// text that will be displayed in the tooltip. To handle the display of the
|
||||
|
@@ -182,7 +182,8 @@ class CefFrame : public virtual CefBase {
|
||||
virtual CefString GetName() =0;
|
||||
|
||||
///
|
||||
// Returns the globally unique identifier for this frame.
|
||||
// Returns the globally unique identifier for this frame or < 0 if the
|
||||
// underlying frame does not yet exist.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 GetIdentifier() =0;
|
||||
|
@@ -68,18 +68,21 @@ class CefJSDialogHandler : public virtual CefBase {
|
||||
typedef cef_jsdialog_type_t JSDialogType;
|
||||
|
||||
///
|
||||
// Called to run a JavaScript dialog. The |default_prompt_text| value will be
|
||||
// specified for prompt dialogs only. Set |suppress_message| to true and
|
||||
// return false to suppress the message (suppressing messages is preferable
|
||||
// to immediately executing the callback as this is used to detect presumably
|
||||
// malicious behavior like spamming alert messages in onbeforeunload). Set
|
||||
// |suppress_message| to false and return false to use the default
|
||||
// implementation (the default implementation will show one modal dialog at a
|
||||
// time and suppress any additional dialog requests until the displayed dialog
|
||||
// is dismissed). Return true if the application will use a custom dialog or
|
||||
// if the callback has been executed immediately. Custom dialogs may be either
|
||||
// modal or modeless. If a custom dialog is used the application must execute
|
||||
// |callback| once the custom dialog is dismissed.
|
||||
// Called to run a JavaScript dialog. If |origin_url| and |accept_lang| are
|
||||
// non-empty they can be passed to the CefFormatUrlForSecurityDisplay function
|
||||
// to retrieve a secure and user-friendly display string. The
|
||||
// |default_prompt_text| value will be specified for prompt dialogs only. Set
|
||||
// |suppress_message| to true and return false to suppress the message
|
||||
// (suppressing messages is preferable to immediately executing the callback
|
||||
// as this is used to detect presumably malicious behavior like spamming alert
|
||||
// messages in onbeforeunload). Set |suppress_message| to false and return
|
||||
// false to use the default implementation (the default implementation will
|
||||
// show one modal dialog at a time and suppress any additional dialog requests
|
||||
// until the displayed dialog is dismissed). Return true if the application
|
||||
// will use a custom dialog or if the callback has been executed immediately.
|
||||
// Custom dialogs may be either modal or modeless. If a custom dialog is used
|
||||
// the application must execute |callback| once the custom dialog is
|
||||
// dismissed.
|
||||
///
|
||||
/*--cef(optional_param=origin_url,optional_param=accept_lang,
|
||||
optional_param=message_text,optional_param=default_prompt_text)--*/
|
||||
|
@@ -93,13 +93,6 @@ class CefNavigationEntry : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual bool HasPostData() =0;
|
||||
|
||||
///
|
||||
// Returns the name of the sub-frame that navigated or an empty value if the
|
||||
// main frame navigated.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFrameName() =0;
|
||||
|
||||
///
|
||||
// Returns the time for the last known successful navigation completion. A
|
||||
// navigation may be completed more than once if the page is reloaded. May be
|
||||
|
@@ -60,6 +60,20 @@ bool CefParseURL(const CefString& url,
|
||||
bool CefCreateURL(const CefURLParts& parts,
|
||||
CefString& url);
|
||||
|
||||
///
|
||||
// This is a convenience function for formatting a URL in a concise and human-
|
||||
// friendly way to help users make security-related decisions (or in other
|
||||
// circumstances when people need to distinguish sites, origins, or otherwise-
|
||||
// simplified URLs from each other). Internationalized domain names (IDN) may be
|
||||
// presented in Unicode if |languages| accepts the Unicode representation. The
|
||||
// returned value will (a) omit the path for standard schemes, excepting file
|
||||
// and filesystem, and (b) omit the port if it is the default for the scheme. Do
|
||||
// not use this for URLs which will be parsed or sent to other applications.
|
||||
///
|
||||
/*--cef(optional_param=languages)--*/
|
||||
CefString CefFormatUrlForSecurityDisplay(const CefString& origin_url,
|
||||
const CefString& languages);
|
||||
|
||||
///
|
||||
// Returns the mime type for the specified file extension or an empty string if
|
||||
// unknown.
|
||||
|
@@ -82,6 +82,15 @@ class CefPrintJobCallback : public virtual CefBase {
|
||||
/*--cef(source=client)--*/
|
||||
class CefPrintHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called when printing has started for the specified |browser|. This method
|
||||
// will be called before the other OnPrint*() methods and irrespective of how
|
||||
// printing was initiated (e.g. CefBrowserHost::Print(), JavaScript
|
||||
// window.print() or PDF extension print button).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPrintStart(CefRefPtr<CefBrowser> browser) =0;
|
||||
|
||||
///
|
||||
// Synchronize |settings| with client state. If |get_defaults| is true then
|
||||
// populate |settings| with the default print settings. Do not keep a
|
||||
@@ -115,6 +124,15 @@ class CefPrintHandler : public virtual CefBase {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPrintReset() =0;
|
||||
|
||||
///
|
||||
// Return the PDF paper size in device units. Used in combination with
|
||||
// CefBrowserHost::PrintToPDF().
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefSize GetPdfPaperSize(int device_units_per_inch) {
|
||||
return CefSize();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_PRINT_HANDLER_H_
|
||||
|
@@ -53,6 +53,7 @@ class CefPostDataElement;
|
||||
class CefRequest : public virtual CefBase {
|
||||
public:
|
||||
typedef std::multimap<CefString, CefString> HeaderMap;
|
||||
typedef cef_referrer_policy_t ReferrerPolicy;
|
||||
typedef cef_resource_type_t ResourceType;
|
||||
typedef cef_transition_type_t TransitionType;
|
||||
|
||||
@@ -93,6 +94,27 @@ class CefRequest : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual void SetMethod(const CefString& method) =0;
|
||||
|
||||
///
|
||||
// Set the referrer URL and policy. If non-empty the referrer URL must be
|
||||
// fully qualified with an HTTP or HTTPS scheme component. Any username,
|
||||
// password or ref component will be removed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetReferrer(const CefString& referrer_url,
|
||||
ReferrerPolicy policy) =0;
|
||||
|
||||
///
|
||||
// Get the referrer URL.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetReferrerURL() =0;
|
||||
|
||||
///
|
||||
// Get the referrer policy.
|
||||
///
|
||||
/*--cef(default_retval=REFERRER_POLICY_DEFAULT)--*/
|
||||
virtual ReferrerPolicy GetReferrerPolicy() =0;
|
||||
|
||||
///
|
||||
// Get the post data.
|
||||
///
|
||||
@@ -106,13 +128,14 @@ class CefRequest : public virtual CefBase {
|
||||
virtual void SetPostData(CefRefPtr<CefPostData> postData) =0;
|
||||
|
||||
///
|
||||
// Get the header values.
|
||||
// Get the header values. Will not include the Referer value if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetHeaderMap(HeaderMap& headerMap) =0;
|
||||
|
||||
///
|
||||
// Set the header values.
|
||||
// Set the header values. If a Referer value exists in the header map it will
|
||||
// be removed and ignored.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetHeaderMap(const HeaderMap& headerMap) =0;
|
||||
@@ -200,6 +223,15 @@ class CefPostData : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual bool IsReadOnly() =0;
|
||||
|
||||
///
|
||||
// Returns true if the underlying POST data includes elements that are not
|
||||
// represented by this CefPostData object (for example, multi-part file upload
|
||||
// data). Modifying CefPostData objects with excluded elements may result in
|
||||
// the request failing.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasExcludedElements() = 0;
|
||||
|
||||
///
|
||||
// Returns the number of existing post data elements.
|
||||
///
|
||||
|
@@ -40,6 +40,7 @@
|
||||
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/cef_request_context_handler.h"
|
||||
#include "include/cef_values.h"
|
||||
|
||||
class CefSchemeHandlerFactory;
|
||||
|
||||
@@ -157,6 +158,65 @@ class CefRequestContext : public virtual CefBase {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ClearSchemeHandlerFactories() =0;
|
||||
|
||||
///
|
||||
// Tells all renderer processes associated with this context to throw away
|
||||
// their plugin list cache. If |reload_pages| is true they will also reload
|
||||
// all pages with plugins. CefRequestContextHandler::OnBeforePluginLoad may
|
||||
// be called to rebuild the plugin list cache.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void PurgePluginListCache(bool reload_pages) =0;
|
||||
|
||||
///
|
||||
// Returns true if a preference with the specified |name| exists. This method
|
||||
// must be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasPreference(const CefString& name) =0;
|
||||
|
||||
///
|
||||
// Returns the value for the preference with the specified |name|. Returns
|
||||
// NULL if the preference does not exist. The returned object contains a copy
|
||||
// of the underlying preference value and modifications to the returned object
|
||||
// will not modify the underlying preference value. This method must be called
|
||||
// on the browser process UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefValue> GetPreference(const CefString& name) =0;
|
||||
|
||||
///
|
||||
// Returns all preferences as a dictionary. If |include_defaults| is true then
|
||||
// preferences currently at their default value will be included. The returned
|
||||
// object contains a copy of the underlying preference values and
|
||||
// modifications to the returned object will not modify the underlying
|
||||
// preference values. This method must be called on the browser process UI
|
||||
// thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDictionaryValue> GetAllPreferences(
|
||||
bool include_defaults) =0;
|
||||
|
||||
///
|
||||
// Returns true if the preference with the specified |name| can be modified
|
||||
// using SetPreference. As one example preferences set via the command-line
|
||||
// usually cannot be modified. This method must be called on the browser
|
||||
// process UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanSetPreference(const CefString& name) =0;
|
||||
|
||||
///
|
||||
// Set the |value| associated with preference |name|. Returns true if the
|
||||
// value is set successfully and false otherwise. If |value| is NULL the
|
||||
// preference will be restored to its default value. If setting the preference
|
||||
// fails then |error| will be populated with a detailed description of the
|
||||
// problem. This method must be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(optional_param=value)--*/
|
||||
virtual bool SetPreference(const CefString& name,
|
||||
CefRefPtr<CefValue> value,
|
||||
CefString& error) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_
|
||||
|
@@ -40,6 +40,7 @@
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/cef_web_plugin.h"
|
||||
|
||||
///
|
||||
// Implement this interface to provide handler implementations. The handler
|
||||
@@ -49,13 +50,41 @@
|
||||
/*--cef(source=client,no_debugct_check)--*/
|
||||
class CefRequestContextHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_plugin_policy_t PluginPolicy;
|
||||
|
||||
///
|
||||
// Called on the IO thread to retrieve the cookie manager. If this method
|
||||
// returns NULL the default cookie manager retrievable via
|
||||
// Called on the browser process IO thread to retrieve the cookie manager. If
|
||||
// this method returns NULL the default cookie manager retrievable via
|
||||
// CefRequestContext::GetDefaultCookieManager() will be used.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefCookieManager> GetCookieManager() { return NULL; }
|
||||
|
||||
///
|
||||
// Called on multiple browser process threads before a plugin instance is
|
||||
// loaded. |mime_type| is the mime type of the plugin that will be loaded.
|
||||
// |plugin_url| is the content URL that the plugin will load and may be empty.
|
||||
// |top_origin_url| is the URL for the top-level frame that contains the
|
||||
// plugin when loading a specific plugin instance or empty when building the
|
||||
// initial list of enabled plugins for 'navigator.plugins' JavaScript state.
|
||||
// |plugin_info| includes additional information about the plugin that will be
|
||||
// loaded. |plugin_policy| is the recommended policy. Modify |plugin_policy|
|
||||
// and return true to change the policy. Return false to use the recommended
|
||||
// policy. The default plugin policy can be set at runtime using the
|
||||
// `--plugin-policy=[allow|detect|block]` command-line flag. Decisions to mark
|
||||
// a plugin as disabled by setting |plugin_policy| to PLUGIN_POLICY_DISABLED
|
||||
// may be cached when |top_origin_url| is empty. To purge the plugin list
|
||||
// cache and potentially trigger new calls to this method call
|
||||
// CefRequestContext::PurgePluginListCache.
|
||||
///
|
||||
/*--cef(optional_param=plugin_url,optional_param=top_origin_url)--*/
|
||||
virtual bool OnBeforePluginLoad(const CefString& mime_type,
|
||||
const CefString& plugin_url,
|
||||
const CefString& top_origin_url,
|
||||
CefRefPtr<CefWebPluginInfo> plugin_info,
|
||||
PluginPolicy* plugin_policy) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_REQUEST_CONTEXT_HANDLER_H_
|
||||
|
@@ -44,9 +44,9 @@
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/cef_resource_handler.h"
|
||||
#include "include/cef_response.h"
|
||||
#include "include/cef_response_filter.h"
|
||||
#include "include/cef_request.h"
|
||||
#include "include/cef_ssl_info.h"
|
||||
#include "include/cef_web_plugin.h"
|
||||
|
||||
|
||||
///
|
||||
@@ -79,6 +79,7 @@ class CefRequestHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_return_value_t ReturnValue;
|
||||
typedef cef_termination_status_t TerminationStatus;
|
||||
typedef cef_urlrequest_status_t URLRequestStatus;
|
||||
typedef cef_window_open_disposition_t WindowOpenDisposition;
|
||||
|
||||
///
|
||||
@@ -181,15 +182,46 @@ class CefRequestHandler : public virtual CefBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the IO thread to optionally filter resource response content.
|
||||
// |request| and |response| represent the request and response respectively
|
||||
// and cannot be modified in this callback.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefResponseFilter> GetResourceResponseFilter(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefResponse> response) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the IO thread when a resource load has completed. |request| and
|
||||
// |response| represent the request and response respectively and cannot be
|
||||
// modified in this callback. |status| indicates the load completion status.
|
||||
// |received_content_length| is the number of response bytes actually read.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnResourceLoadComplete(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefResponse> response,
|
||||
URLRequestStatus status,
|
||||
int64 received_content_length) {}
|
||||
|
||||
///
|
||||
// Called on the IO thread when the browser needs credentials from the user.
|
||||
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
||||
// hostname and |port| contains the port number. Return true to continue the
|
||||
// request and call CefAuthCallback::Continue() either in this method or
|
||||
// at a later time when the authentication information is available. Return
|
||||
// false to cancel the request immediately.
|
||||
// hostname and |port| contains the port number. |realm| is the realm of the
|
||||
// challenge and may be empty. |scheme| is the authentication scheme used,
|
||||
// such as "basic" or "digest", and will be empty if the source of the request
|
||||
// is an FTP server. Return true to continue the request and call
|
||||
// CefAuthCallback::Continue() either in this method or at a later time when
|
||||
// the authentication information is available. Return false to cancel the
|
||||
// request immediately.
|
||||
///
|
||||
/*--cef(optional_param=realm)--*/
|
||||
/*--cef(optional_param=realm,optional_param=scheme)--*/
|
||||
virtual bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
bool isProxy,
|
||||
@@ -233,10 +265,9 @@ class CefRequestHandler : public virtual CefBase {
|
||||
// Called on the UI thread to handle requests for URLs with an invalid
|
||||
// SSL certificate. Return true and call CefRequestCallback::Continue() either
|
||||
// in this method or at a later time to continue or cancel the request. Return
|
||||
// false to cancel the request immediately. If |callback| is empty the error
|
||||
// cannot be recovered from and the request will be canceled automatically.
|
||||
// If CefSettings.ignore_certificate_errors is set all invalid certificates
|
||||
// will be accepted without calling this method.
|
||||
// false to cancel the request immediately. If
|
||||
// CefSettings.ignore_certificate_errors is set all invalid certificates will
|
||||
// be accepted without calling this method.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnCertificateError(
|
||||
@@ -248,18 +279,6 @@ class CefRequestHandler : public virtual CefBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the browser process IO thread before a plugin is loaded. Return
|
||||
// true to block loading of the plugin.
|
||||
///
|
||||
/*--cef(optional_param=url,optional_param=policy_url)--*/
|
||||
virtual bool OnBeforePluginLoad(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url,
|
||||
const CefString& policy_url,
|
||||
CefRefPtr<CefWebPluginInfo> info) {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread when a plugin has crashed.
|
||||
// |plugin_path| is the path of the plugin that crashed.
|
||||
|
99
include/cef_resource_bundle.h
Normal file
99
include/cef_resource_bundle.h
Normal file
@@ -0,0 +1,99 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_RESOURCE_BUNDLE_H_
|
||||
#define CEF_INCLUDE_CEF_RESOURCE_BUNDLE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Class used for retrieving resources from the resource bundle (*.pak) files
|
||||
// loaded by CEF during startup or via the CefResourceBundleHandler returned
|
||||
// from CefApp::GetResourceBundleHandler. See CefSettings for additional options
|
||||
// related to resource bundle loading. The methods of this class may be called
|
||||
// on any thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library,no_debugct_check)--*/
|
||||
class CefResourceBundle : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_scale_factor_t ScaleFactor;
|
||||
|
||||
///
|
||||
// Returns the global resource bundle instance.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefResourceBundle> GetGlobal();
|
||||
|
||||
///
|
||||
// Returns the localized string for the specified |string_id| or an empty
|
||||
// string if the value is not found. Include cef_pack_strings.h for a listing
|
||||
// of valid string ID values.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetLocalizedString(int string_id) =0;
|
||||
|
||||
///
|
||||
// Retrieves the contents of the specified scale independent |resource_id|.
|
||||
// If the value is found then |data| and |data_size| will be populated and
|
||||
// this method will return true. If the value is not found then this method
|
||||
// will return false. The returned |data| pointer will remain resident in
|
||||
// memory and should not be freed. Include cef_pack_resources.h for a listing
|
||||
// of valid resource ID values.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetDataResource(int resource_id,
|
||||
void*& data,
|
||||
size_t& data_size) =0;
|
||||
|
||||
///
|
||||
// Retrieves the contents of the specified |resource_id| nearest the scale
|
||||
// factor |scale_factor|. Use a |scale_factor| value of SCALE_FACTOR_NONE for
|
||||
// scale independent resources or call GetDataResource instead. If the value
|
||||
// is found then |data| and |data_size| will be populated and this method will
|
||||
// return true. If the value is not found then this method will return false.
|
||||
// The returned |data| pointer will remain resident in memory and should not
|
||||
// be freed. Include cef_pack_resources.h for a listing of valid resource ID
|
||||
// values.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetDataResourceForScale(int resource_id,
|
||||
ScaleFactor scale_factor,
|
||||
void*& data,
|
||||
size_t& data_size) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_RESOURCE_BUNDLE_H_
|
@@ -41,33 +41,51 @@
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Class used to implement a custom resource bundle interface. The methods of
|
||||
// Class used to implement a custom resource bundle interface. See CefSettings
|
||||
// for additional options related to resource bundle loading. The methods of
|
||||
// this class may be called on multiple threads.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefResourceBundleHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_scale_factor_t ScaleFactor;
|
||||
|
||||
///
|
||||
// Called to retrieve a localized translation for the string specified by
|
||||
// |message_id|. To provide the translation set |string| to the translation
|
||||
// string and return true. To use the default translation return false.
|
||||
// Supported message IDs are listed in cef_pack_strings.h.
|
||||
// Called to retrieve a localized translation for the specified |string_id|.
|
||||
// To provide the translation set |string| to the translation string and
|
||||
// return true. To use the default translation return false. Include
|
||||
// cef_pack_strings.h for a listing of valid string ID values.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetLocalizedString(int message_id,
|
||||
virtual bool GetLocalizedString(int string_id,
|
||||
CefString& string) =0;
|
||||
|
||||
///
|
||||
// Called to retrieve data for the resource specified by |resource_id|. To
|
||||
// provide the resource data set |data| and |data_size| to the data pointer
|
||||
// Called to retrieve data for the specified scale independent |resource_id|.
|
||||
// To provide the resource data set |data| and |data_size| to the data pointer
|
||||
// and size respectively and return true. To use the default resource data
|
||||
// return false. The resource data will not be copied and must remain resident
|
||||
// in memory. Supported resource IDs are listed in cef_pack_resources.h.
|
||||
// in memory. Include cef_pack_resources.h for a listing of valid resource ID
|
||||
// values.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetDataResource(int resource_id,
|
||||
void*& data,
|
||||
size_t& data_size) =0;
|
||||
|
||||
///
|
||||
// Called to retrieve data for the specified |resource_id| nearest the scale
|
||||
// factor |scale_factor|. To provide the resource data set |data| and
|
||||
// |data_size| to the data pointer and size respectively and return true. To
|
||||
// use the default resource data return false. The resource data will not be
|
||||
// copied and must remain resident in memory. Include cef_pack_resources.h for
|
||||
// a listing of valid resource ID values.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetDataResourceForScale(int resource_id,
|
||||
ScaleFactor scale_factor,
|
||||
void*& data,
|
||||
size_t& data_size) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_
|
||||
|
84
include/cef_response_filter.h
Normal file
84
include/cef_response_filter.h
Normal file
@@ -0,0 +1,84 @@
|
||||
// Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_RESPONSE_FILTER_H_
|
||||
#define CEF_INCLUDE_CEF_RESPONSE_FILTER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Implement this interface to filter resource response content. The methods of
|
||||
// this class will be called on the browser process IO thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefResponseFilter : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_response_filter_status_t FilterStatus;
|
||||
|
||||
///
|
||||
// Initialize the response filter. Will only be called a single time. The
|
||||
// filter will not be installed if this method returns false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool InitFilter() =0;
|
||||
|
||||
// Called to filter a chunk of data. |data_in| is the input buffer containing
|
||||
// |data_in_size| bytes of pre-filter data (|data_in| will be NULL if
|
||||
// |data_in_size| is zero). |data_out| is the output buffer that can accept up
|
||||
// to |data_out_size| bytes of filtered output data. Set |data_in_read| to the
|
||||
// number of bytes that were read from |data_in|. Set |data_out_written| to
|
||||
// the number of bytes that were written into |data_out|. If some or all of
|
||||
// the pre-filter data was read successfully but more data is needed in order
|
||||
// to continue filtering (filtered output is pending) return
|
||||
// RESPONSE_FILTER_NEED_MORE_DATA. If some or all of the pre-filter data was
|
||||
// read successfully and all available filtered output has been written return
|
||||
// RESPONSE_FILTER_DONE. If an error occurs during filtering return
|
||||
// RESPONSE_FILTER_ERROR. This method will be called repeatedly until there is
|
||||
// no more data to filter (resource response is complete), |data_in_read|
|
||||
// matches |data_in_size| (all available pre-filter bytes have been read), and
|
||||
// the method returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not
|
||||
// keep a reference to the buffers passed to this method.
|
||||
/*--cef(optional_param=data_in,default_retval=RESPONSE_FILTER_ERROR)--*/
|
||||
virtual FilterStatus Filter(void* data_in,
|
||||
size_t data_in_size,
|
||||
size_t& data_in_read,
|
||||
void* data_out,
|
||||
size_t data_out_size,
|
||||
size_t& data_out_written) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_RESPONSE_FILTER_H_
|
@@ -164,41 +164,38 @@ class CefRunnableMethod : public CefTask {
|
||||
|
||||
template <class T, class Method>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method) {
|
||||
return new CefRunnableMethod<T, Method, Tuple0>(object, method, MakeTuple());
|
||||
return new CefRunnableMethod<T, Method, base::Tuple0>(
|
||||
object, method, base::MakeTuple());
|
||||
}
|
||||
|
||||
template <class T, class Method, class A>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a) {
|
||||
return new CefRunnableMethod<T, Method, Tuple1<A> >(object,
|
||||
method,
|
||||
MakeTuple(a));
|
||||
return new CefRunnableMethod<T, Method, base::Tuple1<A> >(
|
||||
object, method, base::MakeTuple(a));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b) {
|
||||
return new CefRunnableMethod<T, Method, Tuple2<A, B> >(object, method,
|
||||
MakeTuple(a, b));
|
||||
return new CefRunnableMethod<T, Method, base::Tuple2<A, B> >(
|
||||
object, method, base::MakeTuple(a, b));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c) {
|
||||
return new CefRunnableMethod<T, Method, Tuple3<A, B, C> >(object, method,
|
||||
MakeTuple(a, b,
|
||||
c));
|
||||
return new CefRunnableMethod<T, Method, base::Tuple3<A, B, C> >(
|
||||
object, method, base::MakeTuple(a, b, c));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d) {
|
||||
return new CefRunnableMethod<T, Method, Tuple4<A, B, C, D> >(object, method,
|
||||
MakeTuple(a, b,
|
||||
c,
|
||||
d));
|
||||
return new CefRunnableMethod<T, Method, base::Tuple4<A, B, C, D> >(
|
||||
object, method, base::MakeTuple(a, b, c, d));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D, class E>
|
||||
@@ -206,12 +203,8 @@ inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e) {
|
||||
return new CefRunnableMethod<T,
|
||||
Method,
|
||||
Tuple5<A, B, C, D, E> >(object,
|
||||
method,
|
||||
MakeTuple(a, b, c, d,
|
||||
e));
|
||||
return new CefRunnableMethod<T, Method, base::Tuple5<A, B, C, D, E> >(
|
||||
object, method, base::MakeTuple(a, b, c, d, e));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D, class E,
|
||||
@@ -220,12 +213,8 @@ inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f) {
|
||||
return new CefRunnableMethod<T,
|
||||
Method,
|
||||
Tuple6<A, B, C, D, E, F> >(object,
|
||||
method,
|
||||
MakeTuple(a, b, c, d,
|
||||
e, f));
|
||||
return new CefRunnableMethod<T, Method, base::Tuple6<A, B, C, D, E, F> >(
|
||||
object, method, base::MakeTuple(a, b, c, d, e, f));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D, class E,
|
||||
@@ -235,13 +224,8 @@ inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f,
|
||||
const G& g) {
|
||||
return new CefRunnableMethod<T,
|
||||
Method,
|
||||
Tuple7<A, B, C, D, E, F, G> >(object,
|
||||
method,
|
||||
MakeTuple(a, b, c,
|
||||
d, e, f,
|
||||
g));
|
||||
return new CefRunnableMethod<T, Method, base::Tuple7<A, B, C, D, E, F, G> >(
|
||||
object, method, base::MakeTuple(a, b, c, d, e, f, g));
|
||||
}
|
||||
|
||||
// CefRunnableFunction and NewCefRunnableFunction implementation --------------
|
||||
@@ -270,39 +254,38 @@ class CefRunnableFunction : public CefTask {
|
||||
|
||||
template <class Function>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function) {
|
||||
return new CefRunnableFunction<Function, Tuple0>(function, MakeTuple());
|
||||
return new CefRunnableFunction<Function, base::Tuple0>(
|
||||
function, base::MakeTuple());
|
||||
}
|
||||
|
||||
template <class Function, class A>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a) {
|
||||
return new CefRunnableFunction<Function, Tuple1<A> >(function, MakeTuple(a));
|
||||
return new CefRunnableFunction<Function, base::Tuple1<A> >(
|
||||
function, base::MakeTuple(a));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b) {
|
||||
return new CefRunnableFunction<Function, Tuple2<A, B> >(function,
|
||||
MakeTuple(a, b));
|
||||
return new CefRunnableFunction<Function, base::Tuple2<A, B> >(
|
||||
function, base::MakeTuple(a, b));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c) {
|
||||
return new CefRunnableFunction<Function, Tuple3<A, B, C> >(function,
|
||||
MakeTuple(a, b,
|
||||
c));
|
||||
return new CefRunnableFunction<Function, base::Tuple3<A, B, C> >(
|
||||
function, base::MakeTuple(a, b, c));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d) {
|
||||
return new CefRunnableFunction<Function, Tuple4<A, B, C, D> >(function,
|
||||
MakeTuple(a, b,
|
||||
c,
|
||||
d));
|
||||
return new CefRunnableFunction<Function, base::Tuple4<A, B, C, D> >(
|
||||
function, base::MakeTuple(a, b, c, d));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E>
|
||||
@@ -310,8 +293,8 @@ inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e) {
|
||||
return new CefRunnableFunction<Function, Tuple5<A, B, C, D, E> >(function,
|
||||
MakeTuple(a, b, c, d, e));
|
||||
return new CefRunnableFunction<Function, base::Tuple5<A, B, C, D, E> >(
|
||||
function, base::MakeTuple(a, b, c, d, e));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E,
|
||||
@@ -320,8 +303,8 @@ inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f) {
|
||||
return new CefRunnableFunction<Function, Tuple6<A, B, C, D, E, F> >(function,
|
||||
MakeTuple(a, b, c, d, e, f));
|
||||
return new CefRunnableFunction<Function, base::Tuple6<A, B, C, D, E, F> >(
|
||||
function, base::MakeTuple(a, b, c, d, e, f));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E,
|
||||
@@ -331,8 +314,8 @@ inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f,
|
||||
const G& g) {
|
||||
return new CefRunnableFunction<Function, Tuple7<A, B, C, D, E, F, G> >(
|
||||
function, MakeTuple(a, b, c, d, e, f, g));
|
||||
return new CefRunnableFunction<Function, base::Tuple7<A, B, C, D, E, F, G> >(
|
||||
function, base::MakeTuple(a, b, c, d, e, f, g));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E,
|
||||
@@ -342,8 +325,9 @@ inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f,
|
||||
const G& g, const H& h) {
|
||||
return new CefRunnableFunction<Function, Tuple8<A, B, C, D, E, F, G, H> >(
|
||||
function, MakeTuple(a, b, c, d, e, f, g, h));
|
||||
return new CefRunnableFunction<Function,
|
||||
base::Tuple8<A, B, C, D, E, F, G, H> >(
|
||||
function, base::MakeTuple(a, b, c, d, e, f, g, h));
|
||||
}
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_RUNNABLE_H_
|
||||
|
@@ -111,6 +111,28 @@ class CefSSLCertPrincipal : public virtual CefBase {
|
||||
/*--cef(source=library)--*/
|
||||
class CefSSLInfo : public virtual CefBase {
|
||||
public:
|
||||
typedef std::vector<CefRefPtr<CefBinaryValue> > IssuerChainBinaryList;
|
||||
|
||||
///
|
||||
// Returns a bitmask containing any and all problems verifying the server
|
||||
// certificate.
|
||||
///
|
||||
/*--cef(default_retval=CERT_STATUS_NONE)--*/
|
||||
virtual cef_cert_status_t GetCertStatus() =0;
|
||||
|
||||
///
|
||||
// Returns true if the certificate status has any error, major or minor.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsCertStatusError() =0;
|
||||
|
||||
///
|
||||
// Returns true if the certificate status represents only minor errors
|
||||
// (e.g. failure to verify certificate revocation).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsCertStatusMinorError() =0;
|
||||
|
||||
///
|
||||
// Returns the subject of the X.509 certificate. For HTTPS server
|
||||
// certificates this represents the web server. The common name of the
|
||||
@@ -157,6 +179,29 @@ class CefSSLInfo : public virtual CefBase {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBinaryValue> GetPEMEncoded() =0;
|
||||
|
||||
///
|
||||
// Returns the number of certificates in the issuer chain.
|
||||
// If 0, the certificate is self-signed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetIssuerChainSize() =0;
|
||||
|
||||
///
|
||||
// Returns the DER encoded data for the certificate issuer chain.
|
||||
// If we failed to encode a certificate in the chain it is still
|
||||
// present in the array but is an empty string.
|
||||
///
|
||||
/*--cef(count_func=chain:GetIssuerChainSize)--*/
|
||||
virtual void GetDEREncodedIssuerChain(IssuerChainBinaryList& chain) =0;
|
||||
|
||||
///
|
||||
// Returns the PEM encoded data for the certificate issuer chain.
|
||||
// If we failed to encode a certificate in the chain it is still
|
||||
// present in the array but is an empty string.
|
||||
///
|
||||
/*--cef(count_func=chain:GetIssuerChainSize)--*/
|
||||
virtual void GetPEMEncodedIssuerChain(IssuerChainBinaryList& chain) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_SSL_INFO_H_
|
||||
|
@@ -38,7 +38,8 @@
|
||||
#define CEF_INCLUDE_CEF_WEB_PLUGIN_H_
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
|
||||
class CefBrowser;
|
||||
|
||||
///
|
||||
// Information about a specific web plugin.
|
||||
|
@@ -103,7 +103,7 @@ class CefZipReader : public virtual CefBase {
|
||||
// Returns the last modified timestamp for the file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual time_t GetFileLastModified() =0;
|
||||
virtual CefTime GetFileLastModified() =0;
|
||||
|
||||
///
|
||||
// Opens the file for reading of uncompressed data. A read password may
|
||||
|
@@ -38,26 +38,13 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_basictypes.h"
|
||||
#include "include/internal/cef_export.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// CEF character type definitions. wchar_t is 2 bytes on Windows and 4 bytes on
|
||||
// most other platforms.
|
||||
|
||||
#if defined(OS_WIN)
|
||||
typedef wchar_t char16;
|
||||
#else // !OS_WIN
|
||||
typedef unsigned short char16; // NOLINT (runtime/int)
|
||||
#ifndef WCHAR_T_IS_UTF32
|
||||
#define WCHAR_T_IS_UTF32
|
||||
#endif // WCHAR_T_IS_UTF32
|
||||
#endif // !OS_WIN
|
||||
|
||||
|
||||
// CEF string type definitions. Whomever allocates |str| is responsible for
|
||||
// providing an appropriate |dtor| implementation that will free the string in
|
||||
// the same memory space. When reusing an existing string structure make sure
|
||||
|
@@ -37,6 +37,10 @@
|
||||
#include "include/base/cef_string16.h"
|
||||
#include "include/internal/cef_string_types.h"
|
||||
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
#include "base/files/file_path.h"
|
||||
#endif
|
||||
|
||||
///
|
||||
// Traits implementation for wide character strings.
|
||||
///
|
||||
@@ -692,6 +696,17 @@ class CefStringBase {
|
||||
return *this;
|
||||
}
|
||||
#endif // WCHAR_T_IS_UTF32
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
// The base::FilePath constructor is marked as explicit so provide the
|
||||
// conversion here for convenience.
|
||||
operator base::FilePath() const {
|
||||
#if defined(OS_WIN)
|
||||
return base::FilePath(ToWString());
|
||||
#else
|
||||
return base::FilePath(ToString());
|
||||
#endif
|
||||
}
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
|
||||
private:
|
||||
// Allocate the string structure if it doesn't already exist.
|
||||
|
@@ -32,7 +32,7 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_basictypes.h"
|
||||
#include "include/internal/cef_string.h"
|
||||
#include "include/internal/cef_string_list.h"
|
||||
#include "include/internal/cef_time.h"
|
||||
@@ -46,45 +46,6 @@
|
||||
#include "include/internal/cef_types_linux.h"
|
||||
#endif
|
||||
|
||||
#include <limits.h> // For UINT_MAX
|
||||
#include <stddef.h> // For size_t
|
||||
|
||||
// The NSPR system headers define 64-bit as |long| when possible, except on
|
||||
// Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
|
||||
//
|
||||
// On Mac OS X, |long long| is used for 64-bit types for compatibility with
|
||||
// <inttypes.h> format macros even in the LP64 model.
|
||||
#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
|
||||
typedef long int64; // NOLINT(runtime/int)
|
||||
typedef unsigned long uint64; // NOLINT(runtime/int)
|
||||
#else
|
||||
typedef long long int64; // NOLINT(runtime/int)
|
||||
typedef unsigned long long uint64; // NOLINT(runtime/int)
|
||||
#endif
|
||||
|
||||
// TODO: Remove these type guards. These are to avoid conflicts with
|
||||
// obsolete/protypes.h in the Gecko SDK.
|
||||
#ifndef _INT32
|
||||
#define _INT32
|
||||
typedef int int32;
|
||||
#endif
|
||||
|
||||
// TODO: Remove these type guards. These are to avoid conflicts with
|
||||
// obsolete/protypes.h in the Gecko SDK.
|
||||
#ifndef _UINT32
|
||||
#define _UINT32
|
||||
typedef unsigned int uint32;
|
||||
#endif
|
||||
|
||||
// UTF-16 character type
|
||||
#ifndef char16
|
||||
#if defined(WIN32)
|
||||
typedef wchar_t char16;
|
||||
#else
|
||||
typedef unsigned short char16;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// 32-bit ARGB color value, not premultiplied. The color components are always
|
||||
// in a known order. Equivalent to the SkColor type.
|
||||
typedef uint32 cef_color_t;
|
||||
@@ -214,7 +175,8 @@ typedef struct _cef_settings_t {
|
||||
///
|
||||
// Set to true (1) to have the browser process message loop run in a separate
|
||||
// thread. If false (0) than the CefDoMessageLoopWork() function must be
|
||||
// called from your application message loop.
|
||||
// called from your application message loop. This option is only supported on
|
||||
// Windows.
|
||||
///
|
||||
int multi_threaded_message_loop;
|
||||
|
||||
@@ -256,15 +218,25 @@ typedef struct _cef_settings_t {
|
||||
///
|
||||
// To persist session cookies (cookies without an expiry date or validity
|
||||
// interval) by default when using the global cookie manager set this value to
|
||||
// true. Session cookies are generally intended to be transient and most Web
|
||||
// browsers do not persist them. A |cache_path| value must also be specified
|
||||
// to enable this feature. Also configurable using the
|
||||
// true (1). Session cookies are generally intended to be transient and most
|
||||
// Web browsers do not persist them. A |cache_path| value must also be
|
||||
// specified to enable this feature. Also configurable using the
|
||||
// "persist-session-cookies" command-line switch. Can be overridden for
|
||||
// individual CefRequestContext instances via the
|
||||
// CefRequestContextSettings.persist_session_cookies value.
|
||||
///
|
||||
int persist_session_cookies;
|
||||
|
||||
///
|
||||
// To persist user preferences as a JSON file in the cache path directory set
|
||||
// this value to true (1). A |cache_path| value must also be specified
|
||||
// to enable this feature. Also configurable using the
|
||||
// "persist-user-preferences" command-line switch. Can be overridden for
|
||||
// individual CefRequestContext instances via the
|
||||
// CefRequestContextSettings.persist_user_preferences value.
|
||||
///
|
||||
int persist_user_preferences;
|
||||
|
||||
///
|
||||
// Value that will be returned as the User-Agent HTTP header. If empty the
|
||||
// default User-Agent string will be used. Also configurable using the
|
||||
@@ -290,10 +262,12 @@ typedef struct _cef_settings_t {
|
||||
cef_string_t locale;
|
||||
|
||||
///
|
||||
// The directory and file name to use for the debug log. If empty, the
|
||||
// default name of "debug.log" will be used and the file will be written
|
||||
// to the application directory. Also configurable using the "log-file"
|
||||
// command-line switch.
|
||||
// The directory and file name to use for the debug log. If empty a default
|
||||
// log file name and location will be used. On Windows and Linux a "debug.log"
|
||||
// file will be written in the main executable directory. On Mac OS X a
|
||||
// "~/Library/Logs/<app name>_debug.log" file will be written where <app name>
|
||||
// is the name of the main app executable. Also configurable using the
|
||||
// "log-file" command-line switch.
|
||||
///
|
||||
cef_string_t log_file;
|
||||
|
||||
@@ -432,13 +406,21 @@ typedef struct _cef_request_context_settings_t {
|
||||
///
|
||||
// To persist session cookies (cookies without an expiry date or validity
|
||||
// interval) by default when using the global cookie manager set this value to
|
||||
// true. Session cookies are generally intended to be transient and most Web
|
||||
// browsers do not persist them. Can be set globally using the
|
||||
// true (1). Session cookies are generally intended to be transient and most
|
||||
// Web browsers do not persist them. Can be set globally using the
|
||||
// CefSettings.persist_session_cookies value. This value will be ignored if
|
||||
// |cache_path| is empty or if it matches the CefSettings.cache_path value.
|
||||
///
|
||||
int persist_session_cookies;
|
||||
|
||||
///
|
||||
// To persist user preferences as a JSON file in the cache path directory set
|
||||
// this value to true (1). Can be set globally using the
|
||||
// CefSettings.persist_user_preferences value. This value will be ignored if
|
||||
// |cache_path| is empty or if it matches the CefSettings.cache_path value.
|
||||
///
|
||||
int persist_user_preferences;
|
||||
|
||||
///
|
||||
// Set to true (1) to ignore errors related to invalid SSL certificates.
|
||||
// Enabling this setting can lead to potential security vulnerabilities like
|
||||
@@ -476,7 +458,8 @@ typedef struct _cef_browser_settings_t {
|
||||
// The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
|
||||
// will be called for a windowless browser. The actual fps may be lower if
|
||||
// the browser cannot generate frames at the requested rate. The minimum
|
||||
// value is 1 and the maximum value is 60 (default 30).
|
||||
// value is 1 and the maximum value is 60 (default 30). This value can also be
|
||||
// changed dynamically via CefBrowserHost::SetWindowlessFrameRate.
|
||||
///
|
||||
int windowless_frame_rate;
|
||||
|
||||
@@ -550,12 +533,6 @@ typedef struct _cef_browser_settings_t {
|
||||
///
|
||||
cef_state_t caret_browsing;
|
||||
|
||||
///
|
||||
// Controls whether the Java plugin will be loaded. Also configurable using
|
||||
// the "disable-java" command-line switch.
|
||||
///
|
||||
cef_state_t java;
|
||||
|
||||
///
|
||||
// Controls whether any plugins will be loaded. Also configurable using the
|
||||
// "disable-plugins" command-line switch.
|
||||
@@ -889,6 +866,7 @@ typedef enum {
|
||||
ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,
|
||||
ERR_SSL_RENEGOTIATION_REQUESTED = -114,
|
||||
ERR_CERT_COMMON_NAME_INVALID = -200,
|
||||
ERR_CERT_BEGIN = ERR_CERT_COMMON_NAME_INVALID,
|
||||
ERR_CERT_DATE_INVALID = -201,
|
||||
ERR_CERT_AUTHORITY_INVALID = -202,
|
||||
ERR_CERT_CONTAINS_ERRORS = -203,
|
||||
@@ -896,7 +874,13 @@ typedef enum {
|
||||
ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,
|
||||
ERR_CERT_REVOKED = -206,
|
||||
ERR_CERT_INVALID = -207,
|
||||
ERR_CERT_END = -208,
|
||||
ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208,
|
||||
// -209 is available: was ERR_CERT_NOT_IN_DNS.
|
||||
ERR_CERT_NON_UNIQUE_NAME = -210,
|
||||
ERR_CERT_WEAK_KEY = -211,
|
||||
ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212,
|
||||
ERR_CERT_VALIDITY_TOO_LONG = -213,
|
||||
ERR_CERT_END = ERR_CERT_VALIDITY_TOO_LONG,
|
||||
ERR_INVALID_URL = -300,
|
||||
ERR_DISALLOWED_URL_SCHEME = -301,
|
||||
ERR_UNKNOWN_URL_SCHEME = -302,
|
||||
@@ -913,6 +897,38 @@ typedef enum {
|
||||
ERR_INSECURE_RESPONSE = -501,
|
||||
} cef_errorcode_t;
|
||||
|
||||
///
|
||||
// Supported certificate status code values. See net\cert\cert_status_flags.h
|
||||
// for more information. CERT_STATUS_NONE is new in CEF because we use an
|
||||
// enum while cert_status_flags.h uses a typedef and static const variables.
|
||||
///
|
||||
typedef enum {
|
||||
CERT_STATUS_NONE = 0,
|
||||
CERT_STATUS_COMMON_NAME_INVALID = 1 << 0,
|
||||
CERT_STATUS_DATE_INVALID = 1 << 1,
|
||||
CERT_STATUS_AUTHORITY_INVALID = 1 << 2,
|
||||
// 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP).
|
||||
CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4,
|
||||
CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5,
|
||||
CERT_STATUS_REVOKED = 1 << 6,
|
||||
CERT_STATUS_INVALID = 1 << 7,
|
||||
CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8,
|
||||
// 1 << 9 was used for CERT_STATUS_NOT_IN_DNS
|
||||
CERT_STATUS_NON_UNIQUE_NAME = 1 << 10,
|
||||
CERT_STATUS_WEAK_KEY = 1 << 11,
|
||||
// 1 << 12 was used for CERT_STATUS_WEAK_DH_KEY
|
||||
CERT_STATUS_PINNED_KEY_MISSING = 1 << 13,
|
||||
CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 1 << 14,
|
||||
CERT_STATUS_VALIDITY_TOO_LONG = 1 << 15,
|
||||
|
||||
// Bits 16 to 31 are for non-error statuses.
|
||||
CERT_STATUS_IS_EV = 1 << 16,
|
||||
CERT_STATUS_REV_CHECKING_ENABLED = 1 << 17,
|
||||
// Bit 18 was CERT_STATUS_IS_DNSSEC
|
||||
CERT_STATUS_SHA1_SIGNATURE_PRESENT = 1 << 19,
|
||||
CERT_STATUS_CT_COMPLIANCE_FAILED = 1 << 20,
|
||||
} cef_cert_status_t;
|
||||
|
||||
///
|
||||
// The manner in which a link click should be opened.
|
||||
///
|
||||
@@ -1188,11 +1204,6 @@ typedef enum {
|
||||
///
|
||||
UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 3,
|
||||
|
||||
///
|
||||
// If set the headers sent and received for the request will be recorded.
|
||||
///
|
||||
UR_FLAG_REPORT_RAW_HEADERS = 1 << 5,
|
||||
|
||||
///
|
||||
// If set the CefURLRequestClient::OnDownloadData method will not be called.
|
||||
///
|
||||
@@ -1460,6 +1471,11 @@ typedef enum {
|
||||
MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
|
||||
MENU_ID_ADD_TO_DICTIONARY = 206,
|
||||
|
||||
// Custom menu items originating from the renderer process. For example,
|
||||
// plugin placeholder menu items or Flash menu items.
|
||||
MENU_ID_CUSTOM_FIRST = 220,
|
||||
MENU_ID_CUSTOM_LAST = 250,
|
||||
|
||||
// All user-defined menu IDs should come between MENU_ID_USER_FIRST and
|
||||
// MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges
|
||||
// defined in the tools/gritsettings/resource_ids file.
|
||||
@@ -2192,6 +2208,200 @@ typedef enum {
|
||||
JSON_WRITER_PRETTY_PRINT = 1 << 2,
|
||||
} cef_json_writer_options_t;
|
||||
|
||||
///
|
||||
// Margin type for PDF printing.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Default margins.
|
||||
///
|
||||
PDF_PRINT_MARGIN_DEFAULT,
|
||||
|
||||
///
|
||||
// No margins.
|
||||
///
|
||||
PDF_PRINT_MARGIN_NONE,
|
||||
|
||||
///
|
||||
// Minimum margins.
|
||||
///
|
||||
PDF_PRINT_MARGIN_MINIMUM,
|
||||
|
||||
///
|
||||
// Custom margins using the |margin_*| values from cef_pdf_print_settings_t.
|
||||
///
|
||||
PDF_PRINT_MARGIN_CUSTOM,
|
||||
} cef_pdf_print_margin_type_t;
|
||||
|
||||
///
|
||||
// Structure representing PDF print settings.
|
||||
///
|
||||
typedef struct _cef_pdf_print_settings_t {
|
||||
///
|
||||
// Page title to display in the header. Only used if |header_footer_enabled|
|
||||
// is set to true (1).
|
||||
///
|
||||
cef_string_t header_footer_title;
|
||||
|
||||
///
|
||||
// URL to display in the footer. Only used if |header_footer_enabled| is set
|
||||
// to true (1).
|
||||
///
|
||||
cef_string_t header_footer_url;
|
||||
|
||||
///
|
||||
// Output page size in microns. If either of these values is less than or
|
||||
// equal to zero then the default paper size (A4) will be used.
|
||||
///
|
||||
int page_width;
|
||||
int page_height;
|
||||
|
||||
///
|
||||
// Margins in millimeters. Only used if |margin_type| is set to
|
||||
// PDF_PRINT_MARGIN_CUSTOM.
|
||||
///
|
||||
double margin_top;
|
||||
double margin_right;
|
||||
double margin_bottom;
|
||||
double margin_left;
|
||||
|
||||
///
|
||||
// Margin type.
|
||||
///
|
||||
cef_pdf_print_margin_type_t margin_type;
|
||||
|
||||
///
|
||||
// Set to true (1) to print headers and footers or false (0) to not print
|
||||
// headers and footers.
|
||||
///
|
||||
int header_footer_enabled;
|
||||
|
||||
///
|
||||
// Set to true (1) to print the selection only or false (0) to print all.
|
||||
///
|
||||
int selection_only;
|
||||
|
||||
///
|
||||
// Set to true (1) for landscape mode or false (0) for portrait mode.
|
||||
///
|
||||
int landscape;
|
||||
|
||||
///
|
||||
// Set to true (1) to print background graphics or false (0) to not print
|
||||
// background graphics.
|
||||
///
|
||||
int backgrounds_enabled;
|
||||
|
||||
} cef_pdf_print_settings_t;
|
||||
|
||||
///
|
||||
// Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for
|
||||
// density independent resources such as string, html/js files or an image that
|
||||
// can be used for any scale factors (such as wallpapers).
|
||||
///
|
||||
typedef enum {
|
||||
SCALE_FACTOR_NONE = 0,
|
||||
SCALE_FACTOR_100P,
|
||||
SCALE_FACTOR_125P,
|
||||
SCALE_FACTOR_133P,
|
||||
SCALE_FACTOR_140P,
|
||||
SCALE_FACTOR_150P,
|
||||
SCALE_FACTOR_180P,
|
||||
SCALE_FACTOR_200P,
|
||||
SCALE_FACTOR_250P,
|
||||
SCALE_FACTOR_300P,
|
||||
} cef_scale_factor_t;
|
||||
|
||||
///
|
||||
// Plugin policies supported by CefRequestContextHandler::OnBeforePluginLoad.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Allow the content.
|
||||
///
|
||||
PLUGIN_POLICY_ALLOW,
|
||||
|
||||
///
|
||||
// Allow important content and block unimportant content based on heuristics.
|
||||
// The user can manually load blocked content.
|
||||
///
|
||||
PLUGIN_POLICY_DETECT_IMPORTANT,
|
||||
|
||||
///
|
||||
// Block the content. The user can manually load blocked content.
|
||||
///
|
||||
PLUGIN_POLICY_BLOCK,
|
||||
|
||||
///
|
||||
// Disable the content. The user cannot load disabled content.
|
||||
///
|
||||
PLUGIN_POLICY_DISABLE,
|
||||
} cef_plugin_policy_t;
|
||||
|
||||
///
|
||||
// Policy for how the Referrer HTTP header value will be sent during navigation.
|
||||
// If the `--no-referrers` command-line flag is specified then the policy value
|
||||
// will be ignored and the Referrer value will never be sent.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Always send the complete Referrer value.
|
||||
///
|
||||
REFERRER_POLICY_ALWAYS,
|
||||
|
||||
///
|
||||
// Use the default policy. This is REFERRER_POLICY_ORIGIN_WHEN_CROSS_ORIGIN
|
||||
// when the `--reduced-referrer-granularity` command-line flag is specified
|
||||
// and REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE otherwise.
|
||||
//
|
||||
///
|
||||
REFERRER_POLICY_DEFAULT,
|
||||
|
||||
///
|
||||
// When navigating from HTTPS to HTTP do not send the Referrer value.
|
||||
// Otherwise, send the complete Referrer value.
|
||||
///
|
||||
REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE,
|
||||
|
||||
///
|
||||
// Never send the Referrer value.
|
||||
///
|
||||
REFERRER_POLICY_NEVER,
|
||||
|
||||
///
|
||||
// Only send the origin component of the Referrer value.
|
||||
///
|
||||
REFERRER_POLICY_ORIGIN,
|
||||
|
||||
///
|
||||
// When navigating cross-origin only send the origin component of the Referrer
|
||||
// value. Otherwise, send the complete Referrer value.
|
||||
///
|
||||
REFERRER_POLICY_ORIGIN_WHEN_CROSS_ORIGIN,
|
||||
} cef_referrer_policy_t;
|
||||
|
||||
///
|
||||
// Return values for CefResponseFilter::Filter().
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Some or all of the pre-filter data was read successfully but more data is
|
||||
// needed in order to continue filtering (filtered output is pending).
|
||||
///
|
||||
RESPONSE_FILTER_NEED_MORE_DATA,
|
||||
|
||||
///
|
||||
// Some or all of the pre-filter data was read successfully and all available
|
||||
// filtered output has been written.
|
||||
///
|
||||
RESPONSE_FILTER_DONE,
|
||||
|
||||
///
|
||||
// An error occurred during filtering.
|
||||
///
|
||||
RESPONSE_FILTER_ERROR
|
||||
} cef_response_filter_status_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -161,8 +161,8 @@ class CefPoint : public CefStructBase<CefPointTraits> {
|
||||
}
|
||||
|
||||
bool IsEmpty() const { return x <= 0 && y <= 0; }
|
||||
void Set(int x, int y) {
|
||||
this->x = x, this->y = y;
|
||||
void Set(int x_val, int y_val) {
|
||||
x = x_val, y = y_val;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -202,8 +202,8 @@ class CefRect : public CefStructBase<CefRectTraits> {
|
||||
}
|
||||
|
||||
bool IsEmpty() const { return width <= 0 || height <= 0; }
|
||||
void Set(int x, int y, int width, int height) {
|
||||
this->x = x, this->y = y, this->width = width, this->height = height;
|
||||
void Set(int x_val, int y_val, int width_val, int height_val) {
|
||||
x = x_val, y = y_val, width = width_val, height = height_val;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -243,8 +243,8 @@ class CefSize : public CefStructBase<CefSizeTraits> {
|
||||
}
|
||||
|
||||
bool IsEmpty() const { return width <= 0 || height <= 0; }
|
||||
void Set(int width, int height) {
|
||||
this->width = width, this->height = height;
|
||||
void Set(int width_val, int height_val) {
|
||||
width = width_val, height = height_val;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -285,8 +285,8 @@ class CefDraggableRegion : public CefStructBase<CefDraggableRegionTraits> {
|
||||
Set(bounds, draggable);
|
||||
}
|
||||
|
||||
void Set(const CefRect& bounds, bool draggable) {
|
||||
this->bounds = bounds, this->draggable = draggable;
|
||||
void Set(const CefRect& bounds_val, bool draggable_val) {
|
||||
bounds = bounds_val, draggable = draggable_val;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -340,18 +340,18 @@ class CefScreenInfo : public CefStructBase<CefScreenInfoTraits> {
|
||||
is_monochrome, rect, available_rect);
|
||||
}
|
||||
|
||||
void Set(float device_scale_factor,
|
||||
int depth,
|
||||
int depth_per_component,
|
||||
bool is_monochrome,
|
||||
const CefRect& rect,
|
||||
const CefRect& available_rect) {
|
||||
this->device_scale_factor = device_scale_factor;
|
||||
this->depth = depth;
|
||||
this->depth_per_component = depth_per_component;
|
||||
this->is_monochrome = is_monochrome;
|
||||
this->rect = rect;
|
||||
this->available_rect = available_rect;
|
||||
void Set(float device_scale_factor_val,
|
||||
int depth_val,
|
||||
int depth_per_component_val,
|
||||
bool is_monochrome_val,
|
||||
const CefRect& rect_val,
|
||||
const CefRect& available_rect_val) {
|
||||
device_scale_factor = device_scale_factor_val;
|
||||
depth = depth_val;
|
||||
depth_per_component = depth_per_component_val;
|
||||
is_monochrome = is_monochrome_val;
|
||||
rect = rect_val;
|
||||
available_rect = available_rect_val;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -489,6 +489,7 @@ struct CefSettingsTraits {
|
||||
cef_string_set(src->user_data_path.str, src->user_data_path.length,
|
||||
&target->user_data_path, copy);
|
||||
target->persist_session_cookies = src->persist_session_cookies;
|
||||
target->persist_user_preferences = src->persist_user_preferences;
|
||||
|
||||
cef_string_set(src->user_agent.str, src->user_agent.length,
|
||||
&target->user_agent, copy);
|
||||
@@ -541,6 +542,7 @@ struct CefRequestContextSettingsTraits {
|
||||
cef_string_set(src->cache_path.str, src->cache_path.length,
|
||||
&target->cache_path, copy);
|
||||
target->persist_session_cookies = src->persist_session_cookies;
|
||||
target->persist_user_preferences = src->persist_user_preferences;
|
||||
target->ignore_certificate_errors = src->ignore_certificate_errors;
|
||||
cef_string_set(src->accept_language_list.str,
|
||||
src->accept_language_list.length, &target->accept_language_list, copy);
|
||||
@@ -605,7 +607,6 @@ struct CefBrowserSettingsTraits {
|
||||
target->javascript_access_clipboard = src->javascript_access_clipboard;
|
||||
target->javascript_dom_paste = src->javascript_dom_paste;
|
||||
target->caret_browsing = src->caret_browsing;
|
||||
target->java = src->java;
|
||||
target->plugins = src->plugins;
|
||||
target->universal_access_from_file_urls =
|
||||
src->universal_access_from_file_urls;
|
||||
@@ -822,13 +823,13 @@ class CefPageRange : public CefStructBase<CefPageRangeTraits> {
|
||||
CefPageRange(const cef_page_range_t& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
CefPageRange(const CefPageRange& r) // NOLINT(runtime/explicit)
|
||||
: parent(r) {}
|
||||
: parent(r) {}
|
||||
CefPageRange(int from, int to) : parent() {
|
||||
Set(from, to);
|
||||
}
|
||||
|
||||
void Set(int from, int to) {
|
||||
this->from = from, this->to = to;
|
||||
void Set(int from_val, int to_val) {
|
||||
from = from_val, to = to_val;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -862,4 +863,44 @@ struct CefCursorInfoTraits {
|
||||
///
|
||||
typedef CefStructBase<CefCursorInfoTraits> CefCursorInfo;
|
||||
|
||||
|
||||
struct CefPdfPrintSettingsTraits {
|
||||
typedef cef_pdf_print_settings_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {}
|
||||
|
||||
static inline void clear(struct_type* s) {
|
||||
cef_string_clear(&s->header_footer_title);
|
||||
cef_string_clear(&s->header_footer_url);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
|
||||
cef_string_set(src->header_footer_title.str,
|
||||
src->header_footer_title.length, &target->header_footer_title, copy);
|
||||
cef_string_set(src->header_footer_url.str, src->header_footer_url.length,
|
||||
&target->header_footer_url, copy);
|
||||
|
||||
target->page_width = src->page_width;
|
||||
target->page_height = src->page_height;
|
||||
|
||||
target->margin_top = src->margin_top;
|
||||
target->margin_right = src->margin_right;
|
||||
target->margin_bottom = src->margin_bottom;
|
||||
target->margin_left = src->margin_left;
|
||||
target->margin_type = src->margin_type;
|
||||
|
||||
target->header_footer_enabled = src->header_footer_enabled;
|
||||
target->selection_only = src->selection_only;
|
||||
target->landscape = src->landscape;
|
||||
target->backgrounds_enabled = src->backgrounds_enabled;
|
||||
}
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing PDF print settings
|
||||
///
|
||||
typedef CefStructBase<CefPdfPrintSettingsTraits> CefPdfPrintSettings;
|
||||
|
||||
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user