mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
60 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f984155b3f | ||
|
80bd6062d7 | ||
|
88ff29a56a | ||
|
beccb2dd1b | ||
|
6b8ef03a2b | ||
|
c8ee0ae2ca | ||
|
d6fc4a4c16 | ||
|
8b2618a72a | ||
|
4fdfc02858 | ||
|
d685d27313 | ||
|
fd774d81ad | ||
|
6e0baff75c | ||
|
f264ab9620 | ||
|
c993bcadc3 | ||
|
edbfb207b8 | ||
|
d7f087e766 | ||
|
7f76148993 | ||
|
7843d6cdff | ||
|
a8ecb191da | ||
|
6064e023ff | ||
|
a841c0a319 | ||
|
fbe14a56a8 | ||
|
a76670a3ed | ||
|
fe419c09ec | ||
|
0187add5ae | ||
|
9610905541 | ||
|
ac9d105c5d | ||
|
9c76128317 | ||
|
b462c19db1 | ||
|
53b3f1c274 | ||
|
cc0e7d207c | ||
|
648b7b243f | ||
|
b099f8cb79 | ||
|
aeeb51361b | ||
|
7a2765f89c | ||
|
3beb937bcb | ||
|
d59682018c | ||
|
5cea4e312b | ||
|
f7014becfa | ||
|
e30a588a4c | ||
|
6e2177b6fa | ||
|
666341d24e | ||
|
afbd288efa | ||
|
814fe1e069 | ||
|
ebddf7c5f3 | ||
|
713ddcc96d | ||
|
ed84471e8a | ||
|
99e95ca434 | ||
|
a6c42a74b1 | ||
|
67eba55c79 | ||
|
97fe56d30c | ||
|
f3598b5ab0 | ||
|
dd8daeb8c9 | ||
|
8fc370c9be | ||
|
499813b294 | ||
|
3a77b243a3 | ||
|
0ad5d2918b | ||
|
37753febf5 | ||
|
5cd77e8491 | ||
|
287664d85f |
@@ -29,3 +29,5 @@ Felix Bruns <felixbruns@spotify.com>
|
||||
YuTeh Shen <shenyute@gmail.com>
|
||||
Andrei Kurushin <ajax16384@gmail.com>
|
||||
Gonzo Berman <gberman@factset.com>
|
||||
Jakub Trzebiatowski <kuba.trzebiatowski@gmail.com>
|
||||
Nishant Kaushik <nishantk@adobe.com>
|
||||
|
405
BUILD.gn
405
BUILD.gn
@@ -81,7 +81,7 @@
|
||||
# 2. Run Ninja from the command-line to build. If the build configuration has
|
||||
# changed it will automatically re-run `gn gen` with the same arguments.
|
||||
#
|
||||
# > ninja -C out/<build_dir> cefclient cefsimple cef_unittests
|
||||
# > ninja -C out/<build_dir> cefclient cefsimple ceftests
|
||||
#
|
||||
# GN Manual Packaging:
|
||||
#
|
||||
@@ -148,6 +148,12 @@ if (is_clang) {
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/1617
|
||||
assert(!is_component_build)
|
||||
|
||||
if (is_mac) {
|
||||
# Always generate dSYM files. The make_distrib script will fail if
|
||||
# enable_dsyms=true is not explicitly set when is_official_build=false.
|
||||
assert(enable_dsyms)
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Local variables.
|
||||
@@ -180,7 +186,7 @@ group("cef") {
|
||||
deps = [
|
||||
":cefclient",
|
||||
":cefsimple",
|
||||
":cef_unittests",
|
||||
":ceftests",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -192,6 +198,7 @@ group("cef") {
|
||||
# Configuration that will be applied to all targets that depend on
|
||||
# libcef_static.
|
||||
config("libcef_static_config") {
|
||||
# CEF targets use includes relative to the CEF root directory.
|
||||
include_dirs = [ "." ]
|
||||
defines = [
|
||||
"BUILDING_CEF_SHARED",
|
||||
@@ -415,6 +422,8 @@ static_library("libcef_static") {
|
||||
"libcef/common/content_client.h",
|
||||
"libcef/common/crash_reporter_client.cc",
|
||||
"libcef/common/crash_reporter_client.h",
|
||||
"libcef/common/crash_reporting.cc",
|
||||
"libcef/common/crash_reporting.h",
|
||||
"libcef/common/drag_data_impl.cc",
|
||||
"libcef/common/drag_data_impl.h",
|
||||
"libcef/common/extensions/chrome_generated_schemas.cc",
|
||||
@@ -423,6 +432,7 @@ static_library("libcef_static") {
|
||||
"libcef/common/extensions/extensions_client.h",
|
||||
"libcef/common/extensions/extensions_util.cc",
|
||||
"libcef/common/extensions/extensions_util.h",
|
||||
"libcef/common/file_util_impl.cc",
|
||||
"libcef/common/json_impl.cc",
|
||||
"libcef/common/main_delegate.cc",
|
||||
"libcef/common/main_delegate.h",
|
||||
@@ -457,6 +467,8 @@ static_library("libcef_static") {
|
||||
"libcef/common/task_runner_impl.cc",
|
||||
"libcef/common/task_runner_impl.h",
|
||||
"libcef/common/test/translator_test_impl.cc",
|
||||
"libcef/common/thread_impl.cc",
|
||||
"libcef/common/thread_impl.h",
|
||||
"libcef/common/time_impl.cc",
|
||||
"libcef/common/time_util.h",
|
||||
"libcef/common/tracker.cc",
|
||||
@@ -466,6 +478,8 @@ static_library("libcef_static") {
|
||||
"libcef/common/value_base.h",
|
||||
"libcef/common/values_impl.cc",
|
||||
"libcef/common/values_impl.h",
|
||||
"libcef/common/waitable_event_impl.cc",
|
||||
"libcef/common/waitable_event_impl.h",
|
||||
"libcef/common/widevine_loader.cc",
|
||||
"libcef/common/widevine_loader.h",
|
||||
"libcef/renderer/browser_impl.cc",
|
||||
@@ -542,6 +556,11 @@ static_library("libcef_static") {
|
||||
"//third_party/WebKit/public/web",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
# Bring in feature flag defines.
|
||||
"//cef/libcef/features",
|
||||
]
|
||||
|
||||
deps = [
|
||||
# Generate pack files and associated CEF header files.
|
||||
":make_pack_header_resources",
|
||||
@@ -660,13 +679,14 @@ static_library("libcef_static") {
|
||||
"libcef/browser/osr/browser_platform_delegate_osr_win.cc",
|
||||
"libcef/browser/osr/browser_platform_delegate_osr_win.h",
|
||||
"libcef/browser/osr/render_widget_host_view_osr_win.cc",
|
||||
"libcef/common/crash_reporting_win.cc",
|
||||
"libcef/common/crash_reporting_win.h",
|
||||
"libcef/utility/printing_handler.cc",
|
||||
"libcef/utility/printing_handler.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
"//chrome_elf",
|
||||
"//components/crash/content/app:run_as_crashpad_handler",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -704,13 +724,15 @@ static_library("libcef_static") {
|
||||
"libcef/browser/osr/browser_platform_delegate_osr_mac.h",
|
||||
"libcef/browser/osr/browser_platform_delegate_osr_mac.mm",
|
||||
"libcef/browser/osr/render_widget_host_view_osr_mac.mm",
|
||||
"libcef/browser/osr/text_input_client_osr_mac.mm",
|
||||
"libcef/browser/osr/text_input_client_osr_mac.h",
|
||||
"libcef/common/util_mac.h",
|
||||
"libcef/common/util_mac.mm",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_win || is_mac) {
|
||||
deps += [ "//third_party/crashpad/crashpad/handler:handler_lib" ]
|
||||
}
|
||||
|
||||
if (use_x11) {
|
||||
deps += [ "//ui/events/devices/x11" ]
|
||||
}
|
||||
@@ -851,73 +873,34 @@ static_library("libcef_static") {
|
||||
#
|
||||
|
||||
# Configuration that will be applied to all targets that depend on
|
||||
# libcef_dll_wrapper or libcef_dll_wrapper_unittests.
|
||||
# libcef_dll_wrapper.
|
||||
config("libcef_dll_wrapper_config") {
|
||||
include_dirs = [
|
||||
# CEF sources use include paths relative to the CEF root directory.
|
||||
".",
|
||||
# Source files included in the binary distrib use include paths relative to
|
||||
# the tests directory.
|
||||
"tests",
|
||||
# For generated include headers.
|
||||
# CEF generates some header files that also need to be discoverable.
|
||||
# They will be copied to the include/ directory in the binary distribution.
|
||||
"$root_out_dir/includes",
|
||||
]
|
||||
defines = [ "USING_CEF_SHARED" ]
|
||||
}
|
||||
|
||||
# Configuration that will be applied to all targets that depend on
|
||||
# libcef_dll_wrapper_unittests.
|
||||
config("libcef_dll_wrapper_unittests_config") {
|
||||
defines = [ "USING_CHROMIUM_INCLUDES" ]
|
||||
}
|
||||
# libcef_dll_wrapper target.
|
||||
static_library("libcef_dll_wrapper") {
|
||||
sources = gypi_paths2.includes_common +
|
||||
gypi_paths.autogen_cpp_includes +
|
||||
gypi_paths2.includes_capi +
|
||||
gypi_paths.autogen_capi_includes +
|
||||
gypi_paths2.includes_wrapper +
|
||||
gypi_paths2.libcef_dll_wrapper_sources_base +
|
||||
gypi_paths2.libcef_dll_wrapper_sources_common +
|
||||
gypi_paths.autogen_client_side
|
||||
|
||||
# Helper for creating normal and test versions of the libcef_dll_wrapper target.
|
||||
template("libcef_dll_wrapper") {
|
||||
static_library("${target_name}") {
|
||||
testonly = defined(invoker.testonly) && invoker.testonly
|
||||
defines = [ "WRAPPING_CEF_SHARED" ]
|
||||
|
||||
sources = gypi_paths2.includes_common +
|
||||
gypi_paths.autogen_cpp_includes +
|
||||
gypi_paths2.includes_capi +
|
||||
gypi_paths.autogen_capi_includes +
|
||||
gypi_paths2.includes_wrapper +
|
||||
gypi_paths2.libcef_dll_wrapper_sources_common +
|
||||
gypi_paths.autogen_client_side
|
||||
|
||||
if (!testonly) {
|
||||
sources += gypi_paths2.libcef_dll_wrapper_sources_base
|
||||
}
|
||||
|
||||
if (defined(invoker.configs)) {
|
||||
configs += invoker.configs
|
||||
}
|
||||
if (defined(invoker.public_configs)) {
|
||||
public_configs = invoker.public_configs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# libcef_dll_wrapper target for normal executables.
|
||||
libcef_dll_wrapper("libcef_dll_wrapper") {
|
||||
configs = [ ":libcef_dll_wrapper_config" ]
|
||||
configs += [ ":libcef_dll_wrapper_config" ]
|
||||
public_configs = [ ":libcef_dll_wrapper_config" ]
|
||||
}
|
||||
|
||||
# libcef_dll_wrapper target for test executables. Uses Chromium base/ includes
|
||||
# instead of CEF base/ includes. A separate target is necessary to resolve
|
||||
# cef_unittests linker errors as the Chromium base/ implementation diverges
|
||||
# from the CEF implementation.
|
||||
libcef_dll_wrapper("libcef_dll_wrapper_unittests") {
|
||||
testonly = true
|
||||
configs = [
|
||||
":libcef_dll_wrapper_config",
|
||||
":libcef_dll_wrapper_unittests_config",
|
||||
]
|
||||
public_configs = [
|
||||
":libcef_dll_wrapper_config",
|
||||
":libcef_dll_wrapper_unittests_config",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# cef_sandbox target.
|
||||
@@ -926,6 +909,7 @@ libcef_dll_wrapper("libcef_dll_wrapper_unittests") {
|
||||
if (is_win) {
|
||||
static_library("cef_sandbox") {
|
||||
sources = [ "libcef_dll/sandbox/sandbox_win.cc" ]
|
||||
# CEF sources use include paths relative to the CEF root directory.
|
||||
include_dirs = [ "." ]
|
||||
deps = [ "//sandbox" ]
|
||||
}
|
||||
@@ -942,6 +926,7 @@ template("cef_pak_scaled") {
|
||||
|
||||
repack("pak_${target_name}") {
|
||||
# Each input pak file should also have a deps line for completeness.
|
||||
# Add associated .h files in the make_pack_header("resources") target.
|
||||
sources = [
|
||||
"$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
|
||||
"$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
|
||||
@@ -989,6 +974,8 @@ cef_pak_scaled("200_percent") {
|
||||
|
||||
# Generate devtools_resources.pak.
|
||||
repack("pak_devtools") {
|
||||
# Each input pak file should also have a deps line for completeness.
|
||||
# Add associated .h files in the make_pack_header("resources") target.
|
||||
sources = [
|
||||
"$root_gen_dir/blink/devtools_resources.pak",
|
||||
]
|
||||
@@ -1006,6 +993,7 @@ repack("pak_devtools") {
|
||||
# Generate cef_extensions.pak.
|
||||
repack("pak_extensions") {
|
||||
# Each input pak file should also have a deps line for completeness.
|
||||
# Add associated .h files in the make_pack_header("resources") target.
|
||||
sources = [
|
||||
"$root_gen_dir/chrome/component_extension_resources.pak",
|
||||
"$root_gen_dir/extensions/extensions_renderer_resources.pak",
|
||||
@@ -1065,12 +1053,15 @@ grit("cef_resources") {
|
||||
# Generate cef.pak.
|
||||
repack("pak") {
|
||||
# Each input pak file should also have a deps line for completeness.
|
||||
# Add associated .h files in the make_pack_header("resources") target.
|
||||
sources = [
|
||||
"$root_gen_dir/blink/public/resources/blink_resources.pak",
|
||||
"$root_gen_dir/chrome/browser_resources.pak",
|
||||
"$root_gen_dir/chrome/net_internals_resources.pak",
|
||||
"$root_gen_dir/chrome/common_resources.pak",
|
||||
"$root_gen_dir/components/components_resources.pak",
|
||||
"$root_gen_dir/cef/cef_resources.pak",
|
||||
"$root_gen_dir/content/browser/tracing/tracing_resources.pak",
|
||||
"$root_gen_dir/content/content_resources.pak",
|
||||
"$root_gen_dir/net/net_resources.pak",
|
||||
]
|
||||
@@ -1081,9 +1072,11 @@ repack("pak") {
|
||||
public_deps = [
|
||||
"//third_party/WebKit/public:resources_grit",
|
||||
"//chrome/browser:resources",
|
||||
"//chrome/browser/resources:net_internals_resources",
|
||||
"//chrome/common:resources",
|
||||
"//components/resources:components_resources",
|
||||
":cef_resources",
|
||||
"//content/browser/tracing:resources",
|
||||
"//content:resources",
|
||||
"//net:net_resources",
|
||||
]
|
||||
@@ -1123,11 +1116,16 @@ make_pack_header("resources") {
|
||||
header = "$root_out_dir/includes/include/cef_pack_resources.h"
|
||||
inputs = [
|
||||
"$root_gen_dir/blink/grit/devtools_resources.h",
|
||||
"$root_gen_dir/blink/public/resources/grit/blink_image_resources.h",
|
||||
"$root_gen_dir/blink/public/resources/grit/blink_resources.h",
|
||||
"$root_gen_dir/cef/grit/cef_resources.h",
|
||||
"$root_gen_dir/chrome/grit/browser_resources.h",
|
||||
"$root_gen_dir/chrome/grit/common_resources.h",
|
||||
"$root_gen_dir/chrome/grit/component_extension_resources.h",
|
||||
"$root_gen_dir/chrome/grit/net_internals_resources.h",
|
||||
"$root_gen_dir/chrome/grit/renderer_resources.h",
|
||||
"$root_gen_dir/components/grit/components_resources.h",
|
||||
"$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
|
||||
"$root_gen_dir/content/grit/content_resources.h",
|
||||
"$root_gen_dir/extensions/grit/extensions_browser_resources.h",
|
||||
"$root_gen_dir/extensions/grit/extensions_renderer_resources.h",
|
||||
@@ -1144,6 +1142,7 @@ make_pack_header("strings") {
|
||||
header = "$root_out_dir/includes/include/cef_pack_strings.h"
|
||||
inputs = [
|
||||
"$root_gen_dir/cef/grit/cef_strings.h",
|
||||
"$root_gen_dir/chrome/grit/chromium_strings.h",
|
||||
"$root_gen_dir/chrome/grit/generated_resources.h",
|
||||
"$root_gen_dir/chrome/grit/locale_settings.h",
|
||||
"$root_gen_dir/chrome/grit/platform_locale_settings.h",
|
||||
@@ -1316,110 +1315,6 @@ if (is_mac) {
|
||||
# Executable/app targets.
|
||||
#
|
||||
|
||||
# cef_unittests shared sources.
|
||||
cef_unittests_sources = [
|
||||
"tests/cefclient/browser/client_app_browser.cc",
|
||||
"tests/cefclient/browser/client_app_browser.h",
|
||||
"tests/cefclient/browser/main_message_loop.cc",
|
||||
"tests/cefclient/browser/main_message_loop.h",
|
||||
"tests/cefclient/browser/main_message_loop_external_pump.cc",
|
||||
"tests/cefclient/browser/main_message_loop_external_pump.h",
|
||||
"tests/cefclient/browser/main_message_loop_std.cc",
|
||||
"tests/cefclient/browser/main_message_loop_std.h",
|
||||
"tests/cefclient/browser/resource_util.h",
|
||||
"tests/cefclient/browser/resource_util.cc",
|
||||
"tests/cefclient/browser/resource_util.h",
|
||||
"tests/cefclient/common/client_app.cc",
|
||||
"tests/cefclient/common/client_app.h",
|
||||
"tests/cefclient/common/client_app_other.cc",
|
||||
"tests/cefclient/common/client_app_other.h",
|
||||
"tests/cefclient/common/client_switches.cc",
|
||||
"tests/cefclient/common/client_switches.h",
|
||||
"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/cefclient/resources/window_icon.1x.png",
|
||||
"tests/cefclient/resources/window_icon.1x.png",
|
||||
"tests/unittests/browser_info_map_unittest.cc",
|
||||
"tests/unittests/command_line_unittest.cc",
|
||||
"tests/unittests/cookie_unittest.cc",
|
||||
"tests/unittests/dialog_unittest.cc",
|
||||
"tests/unittests/display_unittest.cc",
|
||||
"tests/unittests/dom_unittest.cc",
|
||||
"tests/unittests/download_unittest.cc",
|
||||
"tests/unittests/draggable_regions_unittest.cc",
|
||||
"tests/unittests/frame_unittest.cc",
|
||||
"tests/unittests/geolocation_unittest.cc",
|
||||
"tests/unittests/image_unittest.cc",
|
||||
"tests/unittests/image_util.cc",
|
||||
"tests/unittests/image_util.h",
|
||||
"tests/unittests/jsdialog_unittest.cc",
|
||||
"tests/unittests/life_span_unittest.cc",
|
||||
"tests/unittests/message_router_unittest.cc",
|
||||
"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",
|
||||
"tests/unittests/request_handler_unittest.cc",
|
||||
"tests/unittests/request_unittest.cc",
|
||||
"tests/unittests/resource_manager_unittest.cc",
|
||||
"tests/unittests/routing_test_handler.cc",
|
||||
"tests/unittests/routing_test_handler.h",
|
||||
"tests/unittests/run_all_unittests.cc",
|
||||
"tests/unittests/scheme_handler_unittest.cc",
|
||||
"tests/unittests/stream_unittest.cc",
|
||||
"tests/unittests/stream_resource_handler_unittest.cc",
|
||||
"tests/unittests/string_unittest.cc",
|
||||
"tests/unittests/client_app_delegates.cc",
|
||||
"tests/unittests/task_unittest.cc",
|
||||
"tests/unittests/test_handler.cc",
|
||||
"tests/unittests/test_handler.h",
|
||||
"tests/unittests/test_suite.cc",
|
||||
"tests/unittests/test_suite.h",
|
||||
"tests/unittests/test_util.cc",
|
||||
"tests/unittests/test_util.h",
|
||||
"tests/unittests/thread_helper.cc",
|
||||
"tests/unittests/thread_helper.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",
|
||||
"tests/unittests/version_unittest.cc",
|
||||
"tests/unittests/xml_reader_unittest.cc",
|
||||
"tests/unittests/zip_reader_unittest.cc",
|
||||
]
|
||||
|
||||
if (use_aura) {
|
||||
cef_unittests_sources += [
|
||||
"tests/unittests/views/button_unittest.cc",
|
||||
"tests/unittests/views/panel_unittest.cc",
|
||||
"tests/unittests/views/scroll_view_unittest.cc",
|
||||
"tests/unittests/views/test_window_delegate.cc",
|
||||
"tests/unittests/views/test_window_delegate.h",
|
||||
"tests/unittests/views/textfield_unittest.cc",
|
||||
"tests/unittests/views/window_unittest.cc",
|
||||
]
|
||||
}
|
||||
|
||||
# cef_unittests shared deps.
|
||||
cef_unittests_deps = [
|
||||
"//base",
|
||||
"//base:i18n",
|
||||
"//base/test:test_support",
|
||||
"//build/config/sanitizers:deps",
|
||||
"//testing/gtest",
|
||||
"//third_party/icu",
|
||||
"//third_party/zlib:zip",
|
||||
"//ui/base",
|
||||
]
|
||||
|
||||
if (is_mac) {
|
||||
# Helper for generating the CEF app bundle.
|
||||
template("cef_app") {
|
||||
@@ -1529,7 +1424,8 @@ if (is_mac) {
|
||||
#
|
||||
|
||||
bundle_data("cefclient_resources_bundle_data") {
|
||||
sources = gypi_paths2.cefclient_sources_resources + [
|
||||
sources = gypi_paths2.shared_sources_resources +
|
||||
gypi_paths2.cefclient_sources_resources + [
|
||||
"tests/cefclient/resources/mac/cefclient.icns",
|
||||
]
|
||||
|
||||
@@ -1561,9 +1457,11 @@ if (is_mac) {
|
||||
helper_sources = gypi_paths2.includes_mac +
|
||||
gypi_paths2.includes_common +
|
||||
gypi_paths2.includes_wrapper +
|
||||
gypi_paths2.shared_sources_common +
|
||||
gypi_paths2.shared_sources_renderer +
|
||||
gypi_paths2.shared_sources_mac_helper +
|
||||
gypi_paths2.cefclient_sources_common +
|
||||
gypi_paths2.cefclient_sources_renderer +
|
||||
gypi_paths2.cefclient_sources_mac_helper
|
||||
gypi_paths2.cefclient_sources_renderer
|
||||
helper_deps = [
|
||||
":libcef_dll_wrapper",
|
||||
]
|
||||
@@ -1572,6 +1470,9 @@ if (is_mac) {
|
||||
sources = gypi_paths2.includes_mac +
|
||||
gypi_paths2.includes_common +
|
||||
gypi_paths2.includes_wrapper +
|
||||
gypi_paths2.shared_sources_browser +
|
||||
gypi_paths2.shared_sources_common +
|
||||
gypi_paths2.shared_sources_mac +
|
||||
gypi_paths2.cefclient_sources_browser +
|
||||
gypi_paths2.cefclient_sources_common +
|
||||
gypi_paths2.cefclient_sources_mac
|
||||
@@ -1646,71 +1547,65 @@ if (is_mac) {
|
||||
|
||||
|
||||
#
|
||||
# cef_unittests app targets.
|
||||
# ceftests app targets.
|
||||
#
|
||||
|
||||
cef_app("cef_unittests") {
|
||||
bundle_data("ceftests_resources_bundle_data") {
|
||||
sources = gypi_paths2.shared_sources_resources + [
|
||||
"tests/ceftests/resources/mac/ceftests.icns",
|
||||
]
|
||||
|
||||
outputs = [
|
||||
"{{bundle_resources_dir}}/{{source_file_part}}",
|
||||
]
|
||||
}
|
||||
|
||||
bundle_data("ceftests_resources_bundle_data_english") {
|
||||
sources = [
|
||||
"tests/ceftests/resources/mac/English.lproj/InfoPlist.strings",
|
||||
]
|
||||
|
||||
outputs = [
|
||||
"{{bundle_resources_dir}}/English.lproj/{{source_file_part}}",
|
||||
]
|
||||
}
|
||||
|
||||
mac_xib_bundle_data("ceftests_xibs") {
|
||||
sources = [
|
||||
"tests/ceftests/resources/mac/English.lproj/MainMenu.xib",
|
||||
]
|
||||
|
||||
output_path = "{{bundle_resources_dir}}/English.lproj"
|
||||
}
|
||||
|
||||
cef_app("ceftests") {
|
||||
testonly = true
|
||||
|
||||
helper_info_plist = "tests/cefclient/resources/mac/helper-Info.plist"
|
||||
helper_sources = [
|
||||
"tests/cefclient/browser/resource_util.cc",
|
||||
"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",
|
||||
"tests/cefclient/common/client_app_other.h",
|
||||
"tests/cefclient/common/client_switches.cc",
|
||||
"tests/cefclient/common/client_switches.h",
|
||||
"tests/cefclient/process_helper_mac.cc",
|
||||
"tests/cefclient/renderer/client_app_renderer.cc",
|
||||
"tests/cefclient/renderer/client_app_renderer.h",
|
||||
"tests/unittests/client_app_delegates.cc",
|
||||
"tests/unittests/cookie_unittest.cc",
|
||||
"tests/unittests/dom_unittest.cc",
|
||||
"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",
|
||||
"tests/unittests/routing_test_handler.cc",
|
||||
"tests/unittests/routing_test_handler.h",
|
||||
"tests/unittests/scheme_handler_unittest.cc",
|
||||
"tests/unittests/urlrequest_unittest.cc",
|
||||
"tests/unittests/test_handler.cc",
|
||||
"tests/unittests/test_handler.h",
|
||||
"tests/unittests/test_suite.cc",
|
||||
"tests/unittests/test_suite.h",
|
||||
"tests/unittests/test_util.cc",
|
||||
"tests/unittests/test_util.h",
|
||||
"tests/unittests/thread_helper.cc",
|
||||
"tests/unittests/thread_helper.h",
|
||||
"tests/unittests/tracing_unittest.cc",
|
||||
"tests/unittests/v8_unittest.cc",
|
||||
]
|
||||
helper_deps = cef_unittests_deps + [
|
||||
":libcef_dll_wrapper_unittests",
|
||||
helper_info_plist = "tests/ceftests/resources/mac/helper-Info.plist"
|
||||
helper_sources = gypi_paths2.shared_sources_common +
|
||||
gypi_paths2.shared_sources_renderer +
|
||||
gypi_paths2.shared_sources_mac_helper +
|
||||
gypi_paths2.ceftests_sources_mac_helper
|
||||
helper_deps = [
|
||||
":libcef_dll_wrapper",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
info_plist = "tests/cefclient/resources/mac/Info.plist"
|
||||
sources = cef_unittests_sources + [
|
||||
"tests/cefclient/browser/main_message_loop_external_pump_mac.mm",
|
||||
"tests/cefclient/browser/resource_util_mac.mm",
|
||||
"tests/cefclient/browser/resource_util_posix.cc",
|
||||
"tests/unittests/os_rendering_unittest_mac.h",
|
||||
"tests/unittests/os_rendering_unittest_mac.mm",
|
||||
"tests/unittests/run_all_unittests_mac.mm",
|
||||
]
|
||||
deps = cef_unittests_deps + [
|
||||
":cefclient_resources_bundle_data",
|
||||
":cefclient_resources_bundle_data_english",
|
||||
":cefclient_xibs",
|
||||
":libcef_dll_wrapper_unittests",
|
||||
info_plist = "tests/ceftests/resources/mac/Info.plist"
|
||||
sources = gypi_paths2.includes_mac +
|
||||
gypi_paths2.includes_common +
|
||||
gypi_paths2.includes_wrapper +
|
||||
gypi_paths2.shared_sources_browser +
|
||||
gypi_paths2.shared_sources_common +
|
||||
gypi_paths2.shared_sources_mac +
|
||||
gypi_paths2.ceftests_sources_common +
|
||||
gypi_paths2.ceftests_sources_mac
|
||||
deps = [
|
||||
":ceftests_resources_bundle_data",
|
||||
":ceftests_resources_bundle_data_english",
|
||||
":ceftests_xibs",
|
||||
":libcef_dll_wrapper",
|
||||
"//testing/gtest",
|
||||
]
|
||||
libs = [
|
||||
"AppKit.framework",
|
||||
@@ -1742,14 +1637,19 @@ if (is_mac) {
|
||||
|
||||
if (is_linux) {
|
||||
copy("copy_cefclient_files") {
|
||||
sources = gypi_paths2.cefclient_sources_resources
|
||||
outputs = [ "${root_out_dir}/files/{{source_file_part}}" ]
|
||||
sources = gypi_paths2.shared_sources_resources +
|
||||
gypi_paths2.cefclient_sources_resources
|
||||
outputs = [ "${root_out_dir}/cefclient_files/{{source_file_part}}" ]
|
||||
}
|
||||
}
|
||||
|
||||
executable("cefclient") {
|
||||
sources = gypi_paths2.includes_common +
|
||||
gypi_paths2.includes_wrapper +
|
||||
gypi_paths2.shared_sources_browser +
|
||||
gypi_paths2.shared_sources_common +
|
||||
gypi_paths2.shared_sources_renderer +
|
||||
gypi_paths2.shared_sources_resources +
|
||||
gypi_paths2.cefclient_sources_browser +
|
||||
gypi_paths2.cefclient_sources_common +
|
||||
gypi_paths2.cefclient_sources_renderer +
|
||||
@@ -1763,6 +1663,7 @@ if (is_mac) {
|
||||
|
||||
if (is_win) {
|
||||
sources += gypi_paths2.includes_win +
|
||||
gypi_paths2.shared_sources_win +
|
||||
gypi_paths2.cefclient_sources_win
|
||||
|
||||
# Set /SUBSYSTEM:WINDOWS.
|
||||
@@ -1788,11 +1689,13 @@ if (is_mac) {
|
||||
"rpcrt4.lib",
|
||||
"opengl32.lib",
|
||||
"glu32.lib",
|
||||
"imm32.lib",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_linux) {
|
||||
sources += gypi_paths2.includes_linux +
|
||||
gypi_paths2.shared_sources_linux +
|
||||
gypi_paths2.cefclient_sources_linux
|
||||
|
||||
deps += [
|
||||
@@ -1874,27 +1777,38 @@ if (is_mac) {
|
||||
|
||||
|
||||
#
|
||||
# cef_unittests targets.
|
||||
# ceftests targets.
|
||||
#
|
||||
|
||||
if (is_linux) {
|
||||
copy("copy_ceftests_files") {
|
||||
sources = gypi_paths2.shared_sources_resources
|
||||
outputs = [ "${root_out_dir}/ceftests_files/{{source_file_part}}" ]
|
||||
}
|
||||
}
|
||||
|
||||
executable("cef_unittests") {
|
||||
executable("ceftests") {
|
||||
testonly = true
|
||||
|
||||
sources = cef_unittests_sources
|
||||
sources = gypi_paths2.includes_common +
|
||||
gypi_paths2.includes_wrapper +
|
||||
gypi_paths2.shared_sources_browser +
|
||||
gypi_paths2.shared_sources_common +
|
||||
gypi_paths2.shared_sources_renderer +
|
||||
gypi_paths2.shared_sources_resources +
|
||||
gypi_paths2.ceftests_sources_common +
|
||||
gypi_paths2.ceftests_sources_views
|
||||
|
||||
deps = cef_unittests_deps + [
|
||||
deps = [
|
||||
":libcef",
|
||||
":libcef_dll_wrapper_unittests",
|
||||
":libcef_dll_wrapper",
|
||||
"//build/config/sanitizers:deps",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
sources += [
|
||||
"tests/cefclient/browser/main_message_loop_external_pump_win.cc",
|
||||
"tests/cefclient/browser/resource_util_win.cc",
|
||||
"tests/cefclient/browser/util_win.cc",
|
||||
"tests/cefclient/browser/util_win.h",
|
||||
"tests/cefclient/resources/win/cefclient.rc",
|
||||
]
|
||||
sources += gypi_paths2.shared_sources_win +
|
||||
gypi_paths2.ceftests_sources_win
|
||||
|
||||
defines = [
|
||||
"CEF_USE_SANDBOX",
|
||||
@@ -1907,14 +1821,15 @@ if (is_mac) {
|
||||
}
|
||||
|
||||
if (is_linux) {
|
||||
sources += [
|
||||
"tests/cefclient/browser/main_message_loop_external_pump_linux.cc",
|
||||
"tests/cefclient/browser/resource_util_linux.cc",
|
||||
"tests/cefclient/browser/resource_util_posix.cc",
|
||||
sources += gypi_paths2.shared_sources_linux +
|
||||
gypi_paths2.ceftests_sources_linux
|
||||
|
||||
libs = [
|
||||
"X11",
|
||||
]
|
||||
|
||||
deps += [
|
||||
":copy_cefclient_files",
|
||||
":copy_ceftests_files",
|
||||
]
|
||||
}
|
||||
|
||||
|
@@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': '614d31daee2f61b0180df403a8ad43f20b9f6dd7',
|
||||
'chromium_checkout': 'refs/tags/55.0.2883.87',
|
||||
}
|
||||
|
@@ -27,8 +27,7 @@
|
||||
# CMakeLists.txt Bootstrap that sets up the CMake environment.
|
||||
# cmake/*.cmake CEF configuration files shared by all targets.
|
||||
# libcef_dll/CMakeLists.txt Defines the libcef_dll_wrapper target.
|
||||
# cefclient/CMakeLists.txt Defines the cefclient target.
|
||||
# cefsimple/CMakeLists.txt Defines the cefsimple target.
|
||||
# tests/*/CMakeLists.txt Defines the test application target.
|
||||
#
|
||||
# See the "TODO:" comments below for guidance on how to integrate this CEF
|
||||
# binary distribution into a new or existing CMake project.
|
||||
@@ -200,8 +199,10 @@ add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper)
|
||||
# Include application targets.
|
||||
# Comes from the <target>/CMakeLists.txt file in the current directory.
|
||||
# TODO: Change these lines to match your project target when you copy this file.
|
||||
add_subdirectory(cefclient)
|
||||
add_subdirectory(cefsimple)
|
||||
add_subdirectory(tests/cefclient)
|
||||
add_subdirectory(tests/cefsimple)
|
||||
add_subdirectory(tests/gtest)
|
||||
add_subdirectory(tests/ceftests)
|
||||
|
||||
# Display configuration settings.
|
||||
PRINT_CEF_CONFIG()
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
# Copyright (c) 2017 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.
|
||||
#
|
||||
@@ -21,6 +21,7 @@
|
||||
'include/cef_command_line.h',
|
||||
'include/cef_context_menu_handler.h',
|
||||
'include/cef_cookie.h',
|
||||
'include/cef_crash_util.h',
|
||||
'include/cef_dialog_handler.h',
|
||||
'include/cef_display_handler.h',
|
||||
'include/cef_dom.h',
|
||||
@@ -28,6 +29,7 @@
|
||||
'include/cef_download_item.h',
|
||||
'include/cef_drag_data.h',
|
||||
'include/cef_drag_handler.h',
|
||||
'include/cef_file_util.h',
|
||||
'include/cef_find_handler.h',
|
||||
'include/cef_focus_handler.h',
|
||||
'include/cef_frame.h',
|
||||
@@ -65,10 +67,12 @@
|
||||
'include/cef_stream.h',
|
||||
'include/cef_string_visitor.h',
|
||||
'include/cef_task.h',
|
||||
'include/cef_thread.h',
|
||||
'include/cef_trace.h',
|
||||
'include/cef_urlrequest.h',
|
||||
'include/cef_v8.h',
|
||||
'include/cef_values.h',
|
||||
'include/cef_waitable_event.h',
|
||||
'include/cef_web_plugin.h',
|
||||
'include/cef_x509_certificate.h',
|
||||
'include/cef_xml_reader.h',
|
||||
@@ -105,6 +109,7 @@
|
||||
'include/capi/cef_command_line_capi.h',
|
||||
'include/capi/cef_context_menu_handler_capi.h',
|
||||
'include/capi/cef_cookie_capi.h',
|
||||
'include/capi/cef_crash_util_capi.h',
|
||||
'include/capi/cef_dialog_handler_capi.h',
|
||||
'include/capi/cef_display_handler_capi.h',
|
||||
'include/capi/cef_dom_capi.h',
|
||||
@@ -112,6 +117,7 @@
|
||||
'include/capi/cef_download_item_capi.h',
|
||||
'include/capi/cef_drag_data_capi.h',
|
||||
'include/capi/cef_drag_handler_capi.h',
|
||||
'include/capi/cef_file_util_capi.h',
|
||||
'include/capi/cef_find_handler_capi.h',
|
||||
'include/capi/cef_focus_handler_capi.h',
|
||||
'include/capi/cef_frame_capi.h',
|
||||
@@ -149,10 +155,12 @@
|
||||
'include/capi/cef_stream_capi.h',
|
||||
'include/capi/cef_string_visitor_capi.h',
|
||||
'include/capi/cef_task_capi.h',
|
||||
'include/capi/cef_thread_capi.h',
|
||||
'include/capi/cef_trace_capi.h',
|
||||
'include/capi/cef_urlrequest_capi.h',
|
||||
'include/capi/cef_v8_capi.h',
|
||||
'include/capi/cef_values_capi.h',
|
||||
'include/capi/cef_waitable_event_capi.h',
|
||||
'include/capi/cef_web_plugin_capi.h',
|
||||
'include/capi/cef_x509_certificate_capi.h',
|
||||
'include/capi/cef_xml_reader_capi.h',
|
||||
@@ -360,6 +368,8 @@
|
||||
'libcef_dll/cpptoc/scheme_registrar_cpptoc.h',
|
||||
'libcef_dll/cpptoc/views/scroll_view_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/scroll_view_cpptoc.h',
|
||||
'libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/set_cookie_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/stream_reader_cpptoc.cc',
|
||||
@@ -376,6 +386,8 @@
|
||||
'libcef_dll/cpptoc/views/textfield_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/thread_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/thread_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',
|
||||
@@ -400,6 +412,8 @@
|
||||
'libcef_dll/cpptoc/v8exception_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8interceptor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8interceptor_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8stack_frame_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8stack_frame_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8stack_trace_cpptoc.cc',
|
||||
@@ -412,6 +426,8 @@
|
||||
'libcef_dll/cpptoc/views/view_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/view_delegate_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/view_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/waitable_event_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/waitable_event_cpptoc.h',
|
||||
'libcef_dll/cpptoc/web_plugin_info_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_plugin_info_cpptoc.h',
|
||||
'libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc',
|
||||
@@ -614,6 +630,8 @@
|
||||
'libcef_dll/ctocpp/scheme_registrar_ctocpp.h',
|
||||
'libcef_dll/ctocpp/views/scroll_view_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/scroll_view_ctocpp.h',
|
||||
'libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/set_cookie_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/stream_reader_ctocpp.cc',
|
||||
@@ -630,6 +648,8 @@
|
||||
'libcef_dll/ctocpp/views/textfield_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/thread_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/thread_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',
|
||||
@@ -654,6 +674,8 @@
|
||||
'libcef_dll/ctocpp/v8exception_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8interceptor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8interceptor_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8stack_frame_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8stack_frame_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8stack_trace_ctocpp.cc',
|
||||
@@ -666,6 +688,8 @@
|
||||
'libcef_dll/ctocpp/views/view_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/view_delegate_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/view_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/waitable_event_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/waitable_event_ctocpp.h',
|
||||
'libcef_dll/ctocpp/web_plugin_info_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_plugin_info_ctocpp.h',
|
||||
'libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc',
|
||||
|
224
cef_paths2.gypi
224
cef_paths2.gypi
@@ -61,6 +61,7 @@
|
||||
'include/wrapper/cef_helpers.h',
|
||||
'include/wrapper/cef_message_router.h',
|
||||
'include/wrapper/cef_resource_manager.h',
|
||||
'include/wrapper/cef_scoped_temp_dir.h',
|
||||
'include/wrapper/cef_stream_resource_handler.h',
|
||||
'include/wrapper/cef_xml_object.h',
|
||||
'include/wrapper/cef_zip_archive.h',
|
||||
@@ -125,12 +126,65 @@
|
||||
'libcef_dll/wrapper/cef_closure_task.cc',
|
||||
'libcef_dll/wrapper/cef_message_router.cc',
|
||||
'libcef_dll/wrapper/cef_resource_manager.cc',
|
||||
'libcef_dll/wrapper/cef_scoped_temp_dir.cc',
|
||||
'libcef_dll/wrapper/cef_stream_resource_handler.cc',
|
||||
'libcef_dll/wrapper/cef_xml_object.cc',
|
||||
'libcef_dll/wrapper/cef_zip_archive.cc',
|
||||
'libcef_dll/wrapper/libcef_dll_wrapper.cc',
|
||||
'libcef_dll/wrapper/libcef_dll_wrapper2.cc',
|
||||
],
|
||||
'shared_sources_browser': [
|
||||
'tests/shared/browser/client_app_browser.cc',
|
||||
'tests/shared/browser/client_app_browser.h',
|
||||
'tests/shared/browser/geometry_util.cc',
|
||||
'tests/shared/browser/geometry_util.h',
|
||||
'tests/shared/browser/main_message_loop.cc',
|
||||
'tests/shared/browser/main_message_loop.h',
|
||||
'tests/shared/browser/main_message_loop_external_pump.cc',
|
||||
'tests/shared/browser/main_message_loop_external_pump.h',
|
||||
'tests/shared/browser/main_message_loop_std.cc',
|
||||
'tests/shared/browser/main_message_loop_std.h',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
'tests/shared/browser/resource_util.cc',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
],
|
||||
'shared_sources_common': [
|
||||
'tests/shared/common/client_app.cc',
|
||||
'tests/shared/common/client_app.h',
|
||||
'tests/shared/common/client_app_other.cc',
|
||||
'tests/shared/common/client_app_other.h',
|
||||
'tests/shared/common/client_switches.cc',
|
||||
'tests/shared/common/client_switches.h',
|
||||
],
|
||||
'shared_sources_renderer': [
|
||||
'tests/shared/renderer/client_app_renderer.cc',
|
||||
'tests/shared/renderer/client_app_renderer.h',
|
||||
],
|
||||
'shared_sources_resources': [
|
||||
'tests/shared/resources/osr_test.html',
|
||||
'tests/shared/resources/pdf.html',
|
||||
'tests/shared/resources/pdf.pdf',
|
||||
'tests/shared/resources/window_icon.1x.png',
|
||||
'tests/shared/resources/window_icon.2x.png',
|
||||
],
|
||||
'shared_sources_linux': [
|
||||
'tests/shared/browser/main_message_loop_external_pump_linux.cc',
|
||||
'tests/shared/browser/resource_util_posix.cc',
|
||||
],
|
||||
'shared_sources_mac': [
|
||||
'tests/shared/browser/main_message_loop_external_pump_mac.mm',
|
||||
'tests/shared/browser/resource_util_mac.mm',
|
||||
'tests/shared/browser/resource_util_posix.cc',
|
||||
],
|
||||
'shared_sources_mac_helper': [
|
||||
'tests/shared/process_helper_mac.cc',
|
||||
],
|
||||
'shared_sources_win': [
|
||||
'tests/shared/browser/main_message_loop_external_pump_win.cc',
|
||||
'tests/shared/browser/resource_util_win.cc',
|
||||
'tests/shared/browser/util_win.cc',
|
||||
'tests/shared/browser/util_win.h',
|
||||
],
|
||||
'cefclient_sources_browser': [
|
||||
'tests/cefclient/browser/binding_test.cc',
|
||||
'tests/cefclient/browser/binding_test.h',
|
||||
@@ -138,9 +192,9 @@
|
||||
'tests/cefclient/browser/browser_window.h',
|
||||
'tests/cefclient/browser/bytes_write_handler.cc',
|
||||
'tests/cefclient/browser/bytes_write_handler.h',
|
||||
'tests/cefclient/browser/client_app_browser.cc',
|
||||
'tests/cefclient/browser/client_app_browser.h',
|
||||
'tests/cefclient/browser/client_app_delegates_browser.cc',
|
||||
'tests/cefclient/browser/client_browser.cc',
|
||||
'tests/cefclient/browser/client_browser.h',
|
||||
'tests/cefclient/browser/client_handler.cc',
|
||||
'tests/cefclient/browser/client_handler.h',
|
||||
'tests/cefclient/browser/client_handler_osr.cc',
|
||||
@@ -152,26 +206,16 @@
|
||||
'tests/cefclient/browser/dialog_test.h',
|
||||
'tests/cefclient/browser/drm_test.cc',
|
||||
'tests/cefclient/browser/drm_test.h',
|
||||
'tests/cefclient/browser/geometry_util.cc',
|
||||
'tests/cefclient/browser/geometry_util.h',
|
||||
'tests/cefclient/browser/main_context.cc',
|
||||
'tests/cefclient/browser/main_context.h',
|
||||
'tests/cefclient/browser/main_context_impl.cc',
|
||||
'tests/cefclient/browser/main_context_impl.h',
|
||||
'tests/cefclient/browser/main_message_loop.h',
|
||||
'tests/cefclient/browser/main_message_loop.cc',
|
||||
'tests/cefclient/browser/main_message_loop_external_pump.cc',
|
||||
'tests/cefclient/browser/main_message_loop_external_pump.h',
|
||||
'tests/cefclient/browser/main_message_loop_std.h',
|
||||
'tests/cefclient/browser/main_message_loop_std.cc',
|
||||
'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.cc',
|
||||
'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',
|
||||
@@ -192,20 +236,12 @@
|
||||
'tests/cefclient/browser/window_test_runner.h',
|
||||
],
|
||||
'cefclient_sources_common': [
|
||||
'tests/cefclient/common/client_app.cc',
|
||||
'tests/cefclient/common/client_app.h',
|
||||
'tests/cefclient/common/client_app_delegates_common.cc',
|
||||
'tests/cefclient/common/client_app_other.cc',
|
||||
'tests/cefclient/common/client_app_other.h',
|
||||
'tests/cefclient/common/client_switches.cc',
|
||||
'tests/cefclient/common/client_switches.h',
|
||||
'tests/cefclient/common/scheme_test_common.cc',
|
||||
'tests/cefclient/common/scheme_test_common.h',
|
||||
],
|
||||
'cefclient_sources_renderer': [
|
||||
'tests/cefclient/renderer/client_app_delegates_renderer.cc',
|
||||
'tests/cefclient/renderer/client_app_renderer.cc',
|
||||
'tests/cefclient/renderer/client_app_renderer.h',
|
||||
'tests/cefclient/renderer/client_renderer.cc',
|
||||
'tests/cefclient/renderer/client_renderer.h',
|
||||
'tests/cefclient/renderer/performance_test.cc',
|
||||
@@ -222,10 +258,7 @@
|
||||
'tests/cefclient/resources/logo.png',
|
||||
'tests/cefclient/resources/menu_icon.1x.png',
|
||||
'tests/cefclient/resources/menu_icon.2x.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',
|
||||
@@ -233,8 +266,6 @@
|
||||
'tests/cefclient/resources/transparency.html',
|
||||
'tests/cefclient/resources/urlrequest.html',
|
||||
'tests/cefclient/resources/window.html',
|
||||
'tests/cefclient/resources/window_icon.1x.png',
|
||||
'tests/cefclient/resources/window_icon.2x.png',
|
||||
'tests/cefclient/resources/xmlhttprequest.html',
|
||||
],
|
||||
'cefclient_sources_win': [
|
||||
@@ -243,22 +274,21 @@
|
||||
'tests/cefclient/browser/browser_window_std_win.cc',
|
||||
'tests/cefclient/browser/browser_window_std_win.h',
|
||||
'tests/cefclient/browser/main_context_impl_win.cc',
|
||||
'tests/cefclient/browser/main_message_loop_external_pump_win.cc',
|
||||
'tests/cefclient/browser/main_message_loop_multithreaded_win.cc',
|
||||
'tests/cefclient/browser/main_message_loop_multithreaded_win.h',
|
||||
'tests/cefclient/browser/osr_dragdrop_win.cc',
|
||||
'tests/cefclient/browser/osr_dragdrop_win.h',
|
||||
'tests/cefclient/browser/osr_ime_handler_win.cc',
|
||||
'tests/cefclient/browser/osr_ime_handler_win.h',
|
||||
'tests/cefclient/browser/osr_window_win.cc',
|
||||
'tests/cefclient/browser/osr_window_win.h',
|
||||
'tests/cefclient/browser/resource_util_win.cc',
|
||||
'tests/cefclient/browser/resource_util_win_idmap.cc',
|
||||
'tests/cefclient/browser/root_window_views.cc',
|
||||
'tests/cefclient/browser/root_window_views.h',
|
||||
'tests/cefclient/browser/root_window_win.cc',
|
||||
'tests/cefclient/browser/root_window_win.h',
|
||||
'tests/cefclient/browser/temp_window_win.cc',
|
||||
'tests/cefclient/browser/temp_window_win.h',
|
||||
'tests/cefclient/browser/util_win.cc',
|
||||
'tests/cefclient/browser/util_win.h',
|
||||
'tests/cefclient/browser/views_window.cc',
|
||||
'tests/cefclient/browser/views_window.h',
|
||||
'tests/cefclient/browser/window_test_runner_views.cc',
|
||||
@@ -277,20 +307,16 @@
|
||||
'tests/cefclient/browser/browser_window_std_mac.h',
|
||||
'tests/cefclient/browser/browser_window_std_mac.mm',
|
||||
'tests/cefclient/browser/main_context_impl_posix.cc',
|
||||
'tests/cefclient/browser/main_message_loop_external_pump_mac.mm',
|
||||
'tests/cefclient/browser/resource_util_mac.mm',
|
||||
'tests/cefclient/browser/resource_util_posix.cc',
|
||||
'tests/cefclient/browser/root_window_mac.h',
|
||||
'tests/cefclient/browser/root_window_mac.mm',
|
||||
'tests/cefclient/browser/temp_window_mac.h',
|
||||
'tests/cefclient/browser/temp_window_mac.mm',
|
||||
'tests/cefclient/browser/text_input_client_osr_mac.h',
|
||||
'tests/cefclient/browser/text_input_client_osr_mac.mm',
|
||||
'tests/cefclient/browser/window_test_runner_mac.h',
|
||||
'tests/cefclient/browser/window_test_runner_mac.mm',
|
||||
'tests/cefclient/cefclient_mac.mm',
|
||||
],
|
||||
'cefclient_sources_mac_helper': [
|
||||
'tests/cefclient/process_helper_mac.cc',
|
||||
],
|
||||
'cefclient_bundle_resources_mac': [
|
||||
'tests/cefclient/resources/mac/cefclient.icns',
|
||||
'tests/cefclient/resources/mac/English.lproj/InfoPlist.strings',
|
||||
@@ -305,11 +331,9 @@
|
||||
'tests/cefclient/browser/dialog_handler_gtk.cc',
|
||||
'tests/cefclient/browser/dialog_handler_gtk.h',
|
||||
'tests/cefclient/browser/main_context_impl_posix.cc',
|
||||
'tests/cefclient/browser/main_message_loop_external_pump_linux.cc',
|
||||
'tests/cefclient/browser/print_handler_gtk.cc',
|
||||
'tests/cefclient/browser/print_handler_gtk.h',
|
||||
'tests/cefclient/browser/resource_util_linux.cc',
|
||||
'tests/cefclient/browser/resource_util_posix.cc',
|
||||
'tests/cefclient/browser/root_window_gtk.cc',
|
||||
'tests/cefclient/browser/root_window_gtk.h',
|
||||
'tests/cefclient/browser/root_window_views.cc',
|
||||
@@ -356,5 +380,131 @@
|
||||
'tests/cefsimple/cefsimple_linux.cc',
|
||||
'tests/cefsimple/simple_handler_linux.cc',
|
||||
],
|
||||
'ceftests_sources_common': [
|
||||
'tests/ceftests/browser_info_map_unittest.cc',
|
||||
'tests/ceftests/command_line_unittest.cc',
|
||||
'tests/ceftests/cookie_unittest.cc',
|
||||
'tests/ceftests/dialog_unittest.cc',
|
||||
'tests/ceftests/display_unittest.cc',
|
||||
'tests/ceftests/dom_unittest.cc',
|
||||
'tests/ceftests/download_unittest.cc',
|
||||
'tests/ceftests/draggable_regions_unittest.cc',
|
||||
'tests/ceftests/file_util.cc',
|
||||
'tests/ceftests/file_util.h',
|
||||
'tests/ceftests/file_util_unittest.cc',
|
||||
'tests/ceftests/frame_unittest.cc',
|
||||
'tests/ceftests/geolocation_unittest.cc',
|
||||
'tests/ceftests/image_unittest.cc',
|
||||
'tests/ceftests/image_util.cc',
|
||||
'tests/ceftests/image_util.h',
|
||||
'tests/ceftests/jsdialog_unittest.cc',
|
||||
'tests/ceftests/life_span_unittest.cc',
|
||||
'tests/ceftests/message_router_unittest.cc',
|
||||
'tests/ceftests/navigation_unittest.cc',
|
||||
'tests/ceftests/os_rendering_unittest.cc',
|
||||
'tests/ceftests/parser_unittest.cc',
|
||||
'tests/ceftests/plugin_unittest.cc',
|
||||
'tests/ceftests/preference_unittest.cc',
|
||||
'tests/ceftests/print_unittest.cc',
|
||||
'tests/ceftests/process_message_unittest.cc',
|
||||
'tests/ceftests/request_context_unittest.cc',
|
||||
'tests/ceftests/request_handler_unittest.cc',
|
||||
'tests/ceftests/request_unittest.cc',
|
||||
'tests/ceftests/resource.h',
|
||||
'tests/ceftests/resource_manager_unittest.cc',
|
||||
'tests/ceftests/routing_test_handler.cc',
|
||||
'tests/ceftests/routing_test_handler.h',
|
||||
'tests/ceftests/run_all_unittests.cc',
|
||||
'tests/ceftests/scheme_handler_unittest.cc',
|
||||
'tests/ceftests/scoped_temp_dir_unittest.cc',
|
||||
'tests/ceftests/stream_unittest.cc',
|
||||
'tests/ceftests/stream_resource_handler_unittest.cc',
|
||||
'tests/ceftests/string_unittest.cc',
|
||||
'tests/ceftests/client_app_delegates.cc',
|
||||
'tests/ceftests/task_unittest.cc',
|
||||
'tests/ceftests/test_handler.cc',
|
||||
'tests/ceftests/test_handler.h',
|
||||
'tests/ceftests/test_suite.cc',
|
||||
'tests/ceftests/test_suite.h',
|
||||
'tests/ceftests/test_util.cc',
|
||||
'tests/ceftests/test_util.h',
|
||||
'tests/ceftests/thread_helper.cc',
|
||||
'tests/ceftests/thread_helper.h',
|
||||
'tests/ceftests/thread_unittest.cc',
|
||||
'tests/ceftests/tracing_unittest.cc',
|
||||
'tests/ceftests/translator_unittest.cc',
|
||||
'tests/ceftests/urlrequest_unittest.cc',
|
||||
'tests/ceftests/v8_unittest.cc',
|
||||
'tests/ceftests/values_unittest.cc',
|
||||
'tests/ceftests/version_unittest.cc',
|
||||
'tests/ceftests/waitable_event_unittest.cc',
|
||||
'tests/ceftests/webui_unittest.cc',
|
||||
'tests/ceftests/xml_reader_unittest.cc',
|
||||
'tests/ceftests/zip_reader_unittest.cc',
|
||||
],
|
||||
'ceftests_sources_views': [
|
||||
'tests/ceftests/views/button_unittest.cc',
|
||||
'tests/ceftests/views/panel_unittest.cc',
|
||||
'tests/ceftests/views/scroll_view_unittest.cc',
|
||||
'tests/ceftests/views/test_window_delegate.cc',
|
||||
'tests/ceftests/views/test_window_delegate.h',
|
||||
'tests/ceftests/views/textfield_unittest.cc',
|
||||
'tests/ceftests/views/window_unittest.cc',
|
||||
],
|
||||
'ceftests_sources_win': [
|
||||
'tests/ceftests/resource_util_win_idmap.cc',
|
||||
'tests/ceftests/resources/win/ceftests.exe.manifest',
|
||||
'tests/ceftests/resources/win/ceftests.ico',
|
||||
'tests/ceftests/resources/win/ceftests.rc',
|
||||
'tests/ceftests/resources/win/small.ico',
|
||||
],
|
||||
'ceftests_sources_mac': [
|
||||
'tests/ceftests/os_rendering_unittest_mac.h',
|
||||
'tests/ceftests/os_rendering_unittest_mac.mm',
|
||||
'tests/ceftests/run_all_unittests_mac.mm',
|
||||
],
|
||||
'ceftests_sources_mac_helper': [
|
||||
'tests/shared/browser/resource_util.cc',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
'tests/shared/browser/resource_util_mac.mm',
|
||||
'tests/shared/browser/resource_util_posix.cc',
|
||||
'tests/ceftests/client_app_delegates.cc',
|
||||
'tests/ceftests/cookie_unittest.cc',
|
||||
'tests/ceftests/dom_unittest.cc',
|
||||
'tests/ceftests/file_util.cc',
|
||||
'tests/ceftests/file_util.h',
|
||||
'tests/ceftests/frame_unittest.cc',
|
||||
'tests/ceftests/message_router_unittest.cc',
|
||||
'tests/ceftests/navigation_unittest.cc',
|
||||
'tests/ceftests/plugin_unittest.cc',
|
||||
'tests/ceftests/preference_unittest.cc',
|
||||
'tests/ceftests/process_message_unittest.cc',
|
||||
'tests/ceftests/request_handler_unittest.cc',
|
||||
'tests/ceftests/request_unittest.cc',
|
||||
'tests/ceftests/routing_test_handler.cc',
|
||||
'tests/ceftests/routing_test_handler.h',
|
||||
'tests/ceftests/scheme_handler_unittest.cc',
|
||||
'tests/ceftests/urlrequest_unittest.cc',
|
||||
'tests/ceftests/test_handler.cc',
|
||||
'tests/ceftests/test_handler.h',
|
||||
'tests/ceftests/test_suite.cc',
|
||||
'tests/ceftests/test_suite.h',
|
||||
'tests/ceftests/test_util.cc',
|
||||
'tests/ceftests/test_util.h',
|
||||
'tests/ceftests/thread_helper.cc',
|
||||
'tests/ceftests/thread_helper.h',
|
||||
'tests/ceftests/thread_unittest.cc',
|
||||
'tests/ceftests/tracing_unittest.cc',
|
||||
'tests/ceftests/v8_unittest.cc',
|
||||
],
|
||||
'ceftests_bundle_resources_mac': [
|
||||
'tests/ceftests/resources/mac/ceftests.icns',
|
||||
'tests/ceftests/resources/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/ceftests/resources/mac/English.lproj/MainMenu.xib',
|
||||
'tests/ceftests/resources/mac/Info.plist',
|
||||
],
|
||||
'ceftests_sources_linux': [
|
||||
'tests/ceftests/resource_util_linux.cc',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
@@ -27,8 +27,10 @@ template("_repack_one_locale") {
|
||||
visibility = invoker.visibility
|
||||
|
||||
# Each input pak file should also have a deps line for completeness.
|
||||
# Add associated .h files in the make_pack_header("strings") target.
|
||||
sources = [
|
||||
"${root_gen_dir}/cef/cef_strings_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/chromium_strings_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/generated_resources_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/locale_settings_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/platform_locale_settings_${locale}.pak",
|
||||
@@ -45,6 +47,7 @@ template("_repack_one_locale") {
|
||||
# listed both here and in the libcef_static target.
|
||||
public_deps = [
|
||||
":cef_strings",
|
||||
"//chrome/app:chromium_strings",
|
||||
"//chrome/app:generated_resources",
|
||||
"//chrome/app/resources:locale_settings",
|
||||
"//chrome/app/resources:platform_locale_settings",
|
||||
|
@@ -96,10 +96,12 @@ macro(SET_CEF_TARGET_OUT_DIR)
|
||||
endmacro()
|
||||
|
||||
# Copy a list of files from one directory to another. Relative files paths are maintained.
|
||||
# The path component of the source |file_list| will be removed.
|
||||
macro(COPY_FILES target file_list source_dir target_dir)
|
||||
foreach(FILENAME ${file_list})
|
||||
set(source_file ${source_dir}/${FILENAME})
|
||||
set(target_file ${target_dir}/${FILENAME})
|
||||
get_filename_component(target_name ${FILENAME} NAME)
|
||||
set(target_file ${target_dir}/${target_name})
|
||||
if(IS_DIRECTORY ${source_file})
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
@@ -118,19 +120,6 @@ macro(COPY_FILES target file_list source_dir target_dir)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
# Rename a directory replacing the target if it already exists.
|
||||
macro(RENAME_DIRECTORY target source_dir target_dir)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
# Remove the target directory if it already exists.
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${target_dir}"
|
||||
# Rename the source directory to target directory.
|
||||
COMMAND ${CMAKE_COMMAND} -E rename "${source_dir}" "${target_dir}"
|
||||
VERBATIM
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
||||
#
|
||||
# Linux macros.
|
||||
|
@@ -411,6 +411,7 @@ if(OS_WINDOWS)
|
||||
|
||||
# List of CEF binary files.
|
||||
set(CEF_BINARY_FILES
|
||||
chrome_elf.dll
|
||||
d3dcompiler_43.dll
|
||||
d3dcompiler_47.dll
|
||||
libcef.dll
|
||||
|
@@ -36,13 +36,6 @@
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/macros.h"
|
||||
|
||||
// Chromium uses movable types.
|
||||
#define MOVE_SCOPED_PTR(var) std::move(var)
|
||||
|
||||
// Chromium uses std types.
|
||||
#define SCOPED_PTR(type) std::unique_ptr<type>
|
||||
#define DEFAULT_DELETER(type) std::default_delete<type>
|
||||
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
@@ -51,13 +44,6 @@
|
||||
#include <stddef.h> // For size_t.
|
||||
#include "include/base/cef_build.h" // For COMPILER_MSVC
|
||||
|
||||
// CEF does not use movable types.
|
||||
#define MOVE_SCOPED_PTR(var) var.Pass()
|
||||
|
||||
// CEF uses base types.
|
||||
#define SCOPED_PTR(type) scoped_ptr<type>
|
||||
#define DEFAULT_DELETER(type) struct base::DefaultDeleter<type>
|
||||
|
||||
#if !defined(arraysize)
|
||||
|
||||
// The arraysize(arr) macro returns the # of elements in an array arr.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
@@ -618,24 +618,62 @@ typedef struct _cef_browser_host_t {
|
||||
struct _cef_browser_host_t* self, int frame_rate);
|
||||
|
||||
///
|
||||
// Get the NSTextInputContext implementation for enabling IME on Mac when
|
||||
// window rendering is disabled.
|
||||
// Begins a new composition or updates the existing composition. Blink has a
|
||||
// special node (a composition node) that allows the input function to change
|
||||
// text without affecting other DOM nodes. |text| is the optional text that
|
||||
// will be inserted into the composition node. |underlines| is an optional set
|
||||
// of ranges that will be underlined in the resulting text.
|
||||
// |replacement_range| is an optional range of the existing text that will be
|
||||
// replaced. |selection_range| is an optional range of the resulting text that
|
||||
// will be selected after insertion or replacement. The |replacement_range|
|
||||
// value is only used on OS X.
|
||||
//
|
||||
// This function may be called multiple times as the composition changes. When
|
||||
// the client is done making changes the composition should either be canceled
|
||||
// or completed. To cancel the composition call ImeCancelComposition. To
|
||||
// complete the composition call either ImeCommitText or
|
||||
// ImeFinishComposingText. Completion is usually signaled when:
|
||||
// A. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR
|
||||
// flag (on Windows), or;
|
||||
// B. The client receives a "commit" signal of GtkIMContext (on Linux), or;
|
||||
// C. insertText of NSTextInput is called (on Mac).
|
||||
//
|
||||
// This function is only used when window rendering is disabled.
|
||||
///
|
||||
cef_text_input_context_t (CEF_CALLBACK *get_nstext_input_context)(
|
||||
struct _cef_browser_host_t* self);
|
||||
void (CEF_CALLBACK *ime_set_composition)(struct _cef_browser_host_t* self,
|
||||
const cef_string_t* text, size_t underlinesCount,
|
||||
cef_composition_underline_t const* underlines,
|
||||
const cef_range_t* replacement_range,
|
||||
const cef_range_t* selection_range);
|
||||
|
||||
///
|
||||
// Handles a keyDown event prior to passing it through the NSTextInputClient
|
||||
// machinery.
|
||||
// Completes the existing composition by optionally inserting the specified
|
||||
// |text| into the composition node. |replacement_range| is an optional range
|
||||
// of the existing text that will be replaced. |relative_cursor_pos| is where
|
||||
// the cursor will be positioned relative to the current cursor position. See
|
||||
// comments on ImeSetComposition for usage. The |replacement_range| and
|
||||
// |relative_cursor_pos| values are only used on OS X. This function is only
|
||||
// used when window rendering is disabled.
|
||||
///
|
||||
void (CEF_CALLBACK *handle_key_event_before_text_input_client)(
|
||||
struct _cef_browser_host_t* self, cef_event_handle_t keyEvent);
|
||||
void (CEF_CALLBACK *ime_commit_text)(struct _cef_browser_host_t* self,
|
||||
const cef_string_t* text, const cef_range_t* replacement_range,
|
||||
int relative_cursor_pos);
|
||||
|
||||
///
|
||||
// Performs any additional actions after NSTextInputClient handles the event.
|
||||
// Completes the existing composition by applying the current composition node
|
||||
// contents. If |keep_selection| is false (0) the current selection, if any,
|
||||
// will be discarded. See comments on ImeSetComposition for usage. This
|
||||
// function is only used when window rendering is disabled.
|
||||
///
|
||||
void (CEF_CALLBACK *handle_key_event_after_text_input_client)(
|
||||
struct _cef_browser_host_t* self, cef_event_handle_t keyEvent);
|
||||
void (CEF_CALLBACK *ime_finish_composing_text)(
|
||||
struct _cef_browser_host_t* self, int keep_selection);
|
||||
|
||||
///
|
||||
// Cancels the existing composition and discards the composition node contents
|
||||
// without applying them. See comments on ImeSetComposition for usage. This
|
||||
// function is only used when window rendering is disabled.
|
||||
///
|
||||
void (CEF_CALLBACK *ime_cancel_composition)(struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Call this function when the user drags the mouse into the web view (before
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
@@ -192,6 +192,14 @@ typedef struct _cef_context_menu_params_t {
|
||||
int (CEF_CALLBACK *has_image_contents)(
|
||||
struct _cef_context_menu_params_t* self);
|
||||
|
||||
///
|
||||
// Returns the title text or the alt text if the context menu was invoked on
|
||||
// an image.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_title_text)(
|
||||
struct _cef_context_menu_params_t* self);
|
||||
|
||||
///
|
||||
// Returns the URL of the top level page that the context menu was invoked on.
|
||||
///
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
|
143
include/capi/cef_crash_util_capi.h
Normal file
143
include/capi/cef_crash_util_capi.h
Normal file
@@ -0,0 +1,143 @@
|
||||
// Copyright (c) 2017 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_CRASH_UTIL_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Crash reporting is configured using an INI-style config file named
|
||||
// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
|
||||
// the main application executable. On macOS this file must be placed in the
|
||||
// top-level app bundle Resources directory (e.g.
|
||||
// "<appname>.app/Contents/Resources"). File contents are as follows:
|
||||
//
|
||||
// # Comments start with a hash character and must be on their own line.
|
||||
//
|
||||
// [Config]
|
||||
// ProductName=<Value of the "prod" crash key; defaults to "cef">
|
||||
// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
|
||||
// AppName=<Windows only; App-specific folder name component for storing crash
|
||||
// information; default to "CEF">
|
||||
// ExternalHandler=<Windows only; Name of the external handler exe to use
|
||||
// instead of re-launching the main exe; default to empty>
|
||||
// ServerURL=<crash server URL; default to empty>
|
||||
// RateLimitEnabled=<True if uploads should be rate limited; default to true>
|
||||
// MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
|
||||
// default to 5>
|
||||
// MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value
|
||||
// will cause older reports to be deleted; default to 20>
|
||||
// MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted;
|
||||
// default to 5>
|
||||
//
|
||||
// [CrashKeys]
|
||||
// my_key1=<small|medium|large>
|
||||
// my_key2=<small|medium|large>
|
||||
//
|
||||
// Config section:
|
||||
//
|
||||
// If "ProductName" and/or "ProductVersion" are set then the specified values
|
||||
// will be included in the crash dump metadata. On macOS if these values are set
|
||||
// to NULL then they will be retrieved from the Info.plist file using the
|
||||
// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
|
||||
//
|
||||
// If "AppName" is set on Windows then crash report information (metrics,
|
||||
// database and dumps) will be stored locally on disk under the
|
||||
// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
|
||||
// platforms the CefSettings.user_data_path value will be used.
|
||||
//
|
||||
// If "ExternalHandler" is set on Windows then the specified exe will be
|
||||
// launched as the crashpad-handler instead of re-launching the main process
|
||||
// exe. The value can be an absolute path or a path relative to the main exe
|
||||
// directory. On Linux the CefSettings.browser_subprocess_path value will be
|
||||
// used. On macOS the existing subprocess app bundle will be used.
|
||||
//
|
||||
// If "ServerURL" is set then crashes will be uploaded as a multi-part POST
|
||||
// request to the specified URL. Otherwise, reports will only be stored locally
|
||||
// on disk.
|
||||
//
|
||||
// If "RateLimitEnabled" is set to true (1) then crash report uploads will be
|
||||
// rate limited as follows:
|
||||
// 1. If "MaxUploadsPerDay" is set to a positive value then at most the
|
||||
// specified number of crashes will be uploaded in each 24 hour period.
|
||||
// 2. If crash upload fails due to a network or server error then an
|
||||
// incremental backoff delay up to a maximum of 24 hours will be applied for
|
||||
// retries.
|
||||
// 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
|
||||
// "MaxUploadsPerDay" value will be reduced to 1 until the client is
|
||||
// restarted. This helps to avoid an upload flood when the network or
|
||||
// server error is resolved.
|
||||
// Rate limiting is not supported on Linux.
|
||||
//
|
||||
// If "MaxDatabaseSizeInMb" is set to a positive value then crash report storage
|
||||
// on disk will be limited to that size in megabytes. For example, on Windows
|
||||
// each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20 equates to
|
||||
// about 34 crash reports stored on disk. Not supported on Linux.
|
||||
//
|
||||
// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports older
|
||||
// than the specified age in days will be deleted. Not supported on Linux.
|
||||
//
|
||||
// CrashKeys section:
|
||||
//
|
||||
// Any number of crash keys can be specified for use by the application. Crash
|
||||
// key values will be truncated based on the specified size (small = 63 bytes,
|
||||
// medium = 252 bytes, large = 1008 bytes). The value of crash keys can be set
|
||||
// from any thread or process using the CefSetCrashKeyValue function. These
|
||||
// key/value pairs will be sent to the crash server along with the crash dump
|
||||
// file. Medium and large values will be chunked for submission. For example, if
|
||||
// your key is named "mykey" then the value will be broken into ordered chunks
|
||||
// and submitted using keys named "mykey-1", "mykey-2", etc.
|
||||
///
|
||||
CEF_EXPORT int cef_crash_reporting_enabled();
|
||||
|
||||
///
|
||||
// Sets or clears a specific key-value pair from the crash metadata.
|
||||
///
|
||||
CEF_EXPORT void cef_set_crash_key_value(const cef_string_t* key,
|
||||
const cef_string_t* value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
|
118
include/capi/cef_file_util_capi.h
Normal file
118
include/capi/cef_file_util_capi.h
Normal file
@@ -0,0 +1,118 @@
|
||||
// Copyright (c) 2017 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_FILE_UTIL_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Creates a directory and all parent directories if they don't already exist.
|
||||
// Returns true (1) on successful creation or if the directory already exists.
|
||||
// The directory is only readable by the current user. Calling this function on
|
||||
// the browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_create_directory(const cef_string_t* full_path);
|
||||
|
||||
///
|
||||
// Get the temporary directory provided by the system.
|
||||
//
|
||||
// WARNING: In general, you should use the temp directory variants below instead
|
||||
// of this function. Those variants will ensure that the proper permissions are
|
||||
// set so that other users on the system can't edit them while they're open
|
||||
// (which could lead to security issues).
|
||||
///
|
||||
CEF_EXPORT int cef_get_temp_directory(cef_string_t* temp_dir);
|
||||
|
||||
///
|
||||
// Creates a new directory. On Windows if |prefix| is provided the new directory
|
||||
// name is in the format of "prefixyyyy". Returns true (1) on success and sets
|
||||
// |new_temp_path| to the full path of the directory that was created. The
|
||||
// directory is only readable by the current user. Calling this function on the
|
||||
// browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_create_new_temp_directory(const cef_string_t* prefix,
|
||||
cef_string_t* new_temp_path);
|
||||
|
||||
///
|
||||
// Creates a directory within another directory. Extra characters will be
|
||||
// appended to |prefix| to ensure that the new directory does not have the same
|
||||
// name as an existing directory. Returns true (1) on success and sets |new_dir|
|
||||
// to the full path of the directory that was created. The directory is only
|
||||
// readable by the current user. Calling this function on the browser process UI
|
||||
// or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_create_temp_directory_in_directory(
|
||||
const cef_string_t* base_dir, const cef_string_t* prefix,
|
||||
cef_string_t* new_dir);
|
||||
|
||||
///
|
||||
// Returns true (1) if the given path exists and is a directory. Calling this
|
||||
// function on the browser process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_directory_exists(const cef_string_t* path);
|
||||
|
||||
///
|
||||
// Deletes the given path whether it's a file or a directory. If |path| is a
|
||||
// directory all contents will be deleted. If |recursive| is true (1) any sub-
|
||||
// directories and their contents will also be deleted (equivalent to executing
|
||||
// "rm -rf", so use with caution). On POSIX environments if |path| is a symbolic
|
||||
// link then only the symlink will be deleted. Returns true (1) on successful
|
||||
// deletion or if |path| does not exist. Calling this function on the browser
|
||||
// process UI or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_delete_file(const cef_string_t* path, int recursive);
|
||||
|
||||
///
|
||||
// Writes the contents of |src_dir| into a zip archive at |dest_file|. If
|
||||
// |include_hidden_files| is true (1) files starting with "." will be included.
|
||||
// Returns true (1) on success. Calling this function on the browser process UI
|
||||
// or IO threads is not allowed.
|
||||
///
|
||||
CEF_EXPORT int cef_zip_directory(const cef_string_t* src_dir,
|
||||
const cef_string_t* dest_file, int include_hidden_files);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
@@ -70,6 +70,19 @@ typedef struct _cef_menu_model_delegate_t {
|
||||
///
|
||||
void (CEF_CALLBACK *menu_will_show)(struct _cef_menu_model_delegate_t* self,
|
||||
struct _cef_menu_model_t* menu_model);
|
||||
|
||||
///
|
||||
// The menu has closed.
|
||||
///
|
||||
void (CEF_CALLBACK *menu_closed)(struct _cef_menu_model_delegate_t* self,
|
||||
struct _cef_menu_model_t* menu_model);
|
||||
|
||||
///
|
||||
// Optionally modify a menu item label. Return true (1) if |label| was
|
||||
// modified.
|
||||
///
|
||||
int (CEF_CALLBACK *format_label)(struct _cef_menu_model_delegate_t* self,
|
||||
struct _cef_menu_model_t* menu_model, cef_string_t* label);
|
||||
} cef_menu_model_delegate_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
@@ -161,6 +161,16 @@ typedef struct _cef_render_handler_t {
|
||||
void (CEF_CALLBACK *on_scroll_offset_changed)(
|
||||
struct _cef_render_handler_t* self, struct _cef_browser_t* browser,
|
||||
double x, double y);
|
||||
|
||||
///
|
||||
// Called when the IME composition range has changed. |selected_range| is the
|
||||
// range of characters that have been selected. |character_bounds| is the
|
||||
// bounds of each character in view coordinates.
|
||||
///
|
||||
void (CEF_CALLBACK *on_ime_composition_range_changed)(
|
||||
struct _cef_render_handler_t* self, struct _cef_browser_t* browser,
|
||||
const cef_range_t* selected_range, size_t character_boundsCount,
|
||||
cef_rect_t const* character_bounds);
|
||||
} cef_render_handler_t;
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
@@ -70,23 +70,25 @@ typedef struct _cef_request_context_handler_t {
|
||||
// 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.
|
||||
// |is_main_frame| will be true (1) if the plugin is being loaded in the main
|
||||
// (top-level) frame, |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,
|
||||
int is_main_frame, 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
@@ -47,6 +47,7 @@
|
||||
#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_x509_certificate_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -75,6 +76,25 @@ typedef struct _cef_request_callback_t {
|
||||
} cef_request_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Callback structure used to select a client certificate for authentication.
|
||||
///
|
||||
typedef struct _cef_select_client_certificate_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Chooses the specified certificate for client certificate authentication.
|
||||
// NULL value means that no client certificate should be used.
|
||||
///
|
||||
void (CEF_CALLBACK *select)(
|
||||
struct _cef_select_client_certificate_callback_t* self,
|
||||
struct _cef_x509certificate_t* cert);
|
||||
} cef_select_client_certificate_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to browser requests. The
|
||||
// functions of this structure will be called on the thread indicated.
|
||||
@@ -241,6 +261,26 @@ typedef struct _cef_request_handler_t {
|
||||
const cef_string_t* request_url, struct _cef_sslinfo_t* ssl_info,
|
||||
struct _cef_request_callback_t* callback);
|
||||
|
||||
///
|
||||
// Called on the UI thread when a client certificate is being requested for
|
||||
// authentication. Return false (0) to use the default behavior and
|
||||
// automatically select the first certificate available. Return true (1) and
|
||||
// call cef_select_client_certificate_callback_t::Select either in this
|
||||
// function or at a later time to select a certificate. Do not call Select or
|
||||
// call it with NULL to continue without using any certificate. |isProxy|
|
||||
// indicates whether the host is an HTTPS proxy or the origin server. |host|
|
||||
// and |port| contains the hostname and port of the SSL server. |certificates|
|
||||
// is the list of certificates to choose from; this list has already been
|
||||
// pruned by Chromium so that it only contains certificates from issuers that
|
||||
// the server trusts.
|
||||
///
|
||||
int (CEF_CALLBACK *on_select_client_certificate)(
|
||||
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
|
||||
int isProxy, const cef_string_t* host, int port,
|
||||
size_t certificatesCount,
|
||||
struct _cef_x509certificate_t* const* certificates,
|
||||
struct _cef_select_client_certificate_callback_t* callback);
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread when a plugin has crashed.
|
||||
// |plugin_path| is the path of the plugin that crashed.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
|
115
include/capi/cef_thread_capi.h
Normal file
115
include/capi/cef_thread_capi.h
Normal file
@@ -0,0 +1,115 @@
|
||||
// Copyright (c) 2017 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_THREAD_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_task_capi.h"
|
||||
#include "include/internal/cef_thread_internal.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// A simple thread abstraction that establishes a message loop on a new thread.
|
||||
// The consumer uses cef_task_tRunner to execute code on the thread's message
|
||||
// loop. The thread is terminated when the cef_thread_t object is destroyed or
|
||||
// stop() is called. All pending tasks queued on the thread's message loop will
|
||||
// run to completion before the thread is terminated. cef_thread_create() can be
|
||||
// called on any valid CEF thread in either the browser or render process. This
|
||||
// structure should only be used for tasks that require a dedicated thread. In
|
||||
// most cases you can post tasks to an existing CEF thread instead of creating a
|
||||
// new one; see cef_task.h for details.
|
||||
///
|
||||
typedef struct _cef_thread_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the cef_task_tRunner that will execute code on this thread's
|
||||
// message loop. This function is safe to call from any thread.
|
||||
///
|
||||
struct _cef_task_runner_t* (CEF_CALLBACK *get_task_runner)(
|
||||
struct _cef_thread_t* self);
|
||||
|
||||
///
|
||||
// Returns the platform thread ID. It will return the same value after stop()
|
||||
// is called. This function is safe to call from any thread.
|
||||
///
|
||||
cef_platform_thread_id_t (CEF_CALLBACK *get_platform_thread_id)(
|
||||
struct _cef_thread_t* self);
|
||||
|
||||
///
|
||||
// Stop and join the thread. This function must be called from the same thread
|
||||
// that called cef_thread_create(). Do not call this function if
|
||||
// cef_thread_create() was called with a |stoppable| value of false (0).
|
||||
///
|
||||
void (CEF_CALLBACK *stop)(struct _cef_thread_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the thread is currently running. This function must be
|
||||
// called from the same thread that called cef_thread_create().
|
||||
///
|
||||
int (CEF_CALLBACK *is_running)(struct _cef_thread_t* self);
|
||||
} cef_thread_t;
|
||||
|
||||
|
||||
///
|
||||
// Create and start a new thread. This function does not block waiting for the
|
||||
// thread to run initialization. |display_name| is the name that will be used to
|
||||
// identify the thread. |priority| is the thread execution priority.
|
||||
// |message_loop_type| indicates the set of asynchronous events that the thread
|
||||
// can process. If |stoppable| is true (1) the thread will stopped and joined on
|
||||
// destruction or when stop() is called; otherwise, the the thread cannot be
|
||||
// stopped and will be leaked on shutdown. On Windows the |com_init_mode| value
|
||||
// specifies how COM will be initialized for the thread. If |com_init_mode| is
|
||||
// set to COM_INIT_MODE_STA then |message_loop_type| must be set to ML_TYPE_UI.
|
||||
///
|
||||
CEF_EXPORT cef_thread_t* cef_thread_create(const cef_string_t* display_name,
|
||||
cef_thread_priority_t priority, cef_message_loop_type_t message_loop_type,
|
||||
int stoppable, cef_com_init_mode_t com_init_mode);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
@@ -123,14 +123,16 @@ typedef struct _cef_v8context_t {
|
||||
struct _cef_v8context_t* that);
|
||||
|
||||
///
|
||||
// Evaluates the specified JavaScript code using this context's global object.
|
||||
// Execute a string of JavaScript code in this V8 context. The |script_url|
|
||||
// parameter is the URL where the script in question can be found, if any. The
|
||||
// |start_line| parameter is the base line number to use for error reporting.
|
||||
// On success |retval| will be set to the return value, if any, and the
|
||||
// function will return true (1). On failure |exception| will be set to the
|
||||
// exception, if any, and the function will return false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *eval)(struct _cef_v8context_t* self,
|
||||
const cef_string_t* code, struct _cef_v8value_t** retval,
|
||||
struct _cef_v8exception_t** exception);
|
||||
const cef_string_t* code, const cef_string_t* script_url, int start_line,
|
||||
struct _cef_v8value_t** retval, struct _cef_v8exception_t** exception);
|
||||
} cef_v8context_t;
|
||||
|
||||
|
||||
@@ -211,6 +213,70 @@ typedef struct _cef_v8accessor_t {
|
||||
} cef_v8accessor_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure that should be implemented to handle V8 interceptor calls. The
|
||||
// functions of this structure will be called on the thread associated with the
|
||||
// V8 interceptor. Interceptor's named property handlers (with first argument of
|
||||
// type CefString) are called when object is indexed by string. Indexed property
|
||||
// handlers (with first argument of type int) are called when object is indexed
|
||||
// by integer.
|
||||
///
|
||||
typedef struct _cef_v8interceptor_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Handle retrieval of the interceptor value identified by |name|. |object| is
|
||||
// the receiver ('this' object) of the interceptor. If retrieval succeeds, set
|
||||
// |retval| to the return value. If the requested value does not exist, don't
|
||||
// set either |retval| or |exception|. If retrieval fails, set |exception| to
|
||||
// the exception that will be thrown. If the property has an associated
|
||||
// accessor, it will be called only if you don't set |retval|. Return true (1)
|
||||
// if interceptor retrieval was handled, false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *get_byname)(struct _cef_v8interceptor_t* self,
|
||||
const cef_string_t* name, struct _cef_v8value_t* object,
|
||||
struct _cef_v8value_t** retval, cef_string_t* exception);
|
||||
|
||||
///
|
||||
// Handle retrieval of the interceptor value identified by |index|. |object|
|
||||
// is the receiver ('this' object) of the interceptor. If retrieval succeeds,
|
||||
// set |retval| to the return value. If the requested value does not exist,
|
||||
// don't set either |retval| or |exception|. If retrieval fails, set
|
||||
// |exception| to the exception that will be thrown. Return true (1) if
|
||||
// interceptor retrieval was handled, false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *get_byindex)(struct _cef_v8interceptor_t* self, int index,
|
||||
struct _cef_v8value_t* object, struct _cef_v8value_t** retval,
|
||||
cef_string_t* exception);
|
||||
|
||||
///
|
||||
// Handle assignment of the interceptor value identified by |name|. |object|
|
||||
// is the receiver ('this' object) of the interceptor. |value| is the new
|
||||
// value being assigned to the interceptor. If assignment fails, set
|
||||
// |exception| to the exception that will be thrown. This setter will always
|
||||
// be called, even when the property has an associated accessor. Return true
|
||||
// (1) if interceptor assignment was handled, false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *set_byname)(struct _cef_v8interceptor_t* self,
|
||||
const cef_string_t* name, struct _cef_v8value_t* object,
|
||||
struct _cef_v8value_t* value, cef_string_t* exception);
|
||||
|
||||
///
|
||||
// Handle assignment of the interceptor value identified by |index|. |object|
|
||||
// is the receiver ('this' object) of the interceptor. |value| is the new
|
||||
// value being assigned to the interceptor. If assignment fails, set
|
||||
// |exception| to the exception that will be thrown. Return true (1) if
|
||||
// interceptor assignment was handled, false (0) otherwise.
|
||||
///
|
||||
int (CEF_CALLBACK *set_byindex)(struct _cef_v8interceptor_t* self, int index,
|
||||
struct _cef_v8value_t* object, struct _cef_v8value_t* value,
|
||||
cef_string_t* exception);
|
||||
} cef_v8interceptor_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure representing a V8 exception. The functions of this structure may be
|
||||
// called on any render process thread.
|
||||
@@ -358,38 +424,32 @@ typedef struct _cef_v8value_t {
|
||||
struct _cef_v8value_t* that);
|
||||
|
||||
///
|
||||
// Return a bool value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
// Return a bool value.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return an int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
// Return an int value.
|
||||
///
|
||||
int32 (CEF_CALLBACK *get_int_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return an unisgned int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
// Return an unsigned int value.
|
||||
///
|
||||
uint32 (CEF_CALLBACK *get_uint_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return a double value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
// Return a double value.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return a Date value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
// Return a Date value.
|
||||
///
|
||||
cef_time_t (CEF_CALLBACK *get_date_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return a string value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
// Return a string value.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string_value)(
|
||||
@@ -652,13 +712,14 @@ CEF_EXPORT cef_v8value_t* cef_v8value_create_date(const cef_time_t* date);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const cef_string_t* value);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type object with optional accessor. This
|
||||
// function should only be called from within the scope of a
|
||||
// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback,
|
||||
// or in combination with calling enter() and exit() on a stored cef_v8context_t
|
||||
// reference.
|
||||
// Create a new cef_v8value_t object of type object with optional accessor
|
||||
// and/or interceptor. This function should only be called from within the scope
|
||||
// of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t
|
||||
// callback, or in combination with calling enter() and exit() on a stored
|
||||
// cef_v8context_t reference.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_v8accessor_t* accessor);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_v8accessor_t* accessor,
|
||||
cef_v8interceptor_t* interceptor);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type array with the specified |length|.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
@@ -581,13 +581,13 @@ typedef struct _cef_list_value_t {
|
||||
///
|
||||
// Removes the value at the specified index.
|
||||
///
|
||||
int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, int index);
|
||||
int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value type at the specified index.
|
||||
///
|
||||
cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_list_value_t* self,
|
||||
int index);
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index. For simple types the returned
|
||||
@@ -597,36 +597,37 @@ typedef struct _cef_list_value_t {
|
||||
// will modify this object.
|
||||
///
|
||||
struct _cef_value_t* (CEF_CALLBACK *get_value)(struct _cef_list_value_t* self,
|
||||
int index);
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type bool.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, int index);
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type int.
|
||||
///
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, int index);
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type double.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self, int index);
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type string.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string)(
|
||||
struct _cef_list_value_t* self, int index);
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type binary. The returned value
|
||||
// will reference existing data.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
|
||||
struct _cef_list_value_t* self, int index);
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type dictionary. The returned
|
||||
@@ -634,7 +635,7 @@ typedef struct _cef_list_value_t {
|
||||
// modify this object.
|
||||
///
|
||||
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
|
||||
struct _cef_list_value_t* self, int index);
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type list. The returned value
|
||||
@@ -642,7 +643,7 @@ typedef struct _cef_list_value_t {
|
||||
// this object.
|
||||
///
|
||||
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(
|
||||
struct _cef_list_value_t* self, int index);
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index. Returns true (1) if the value was
|
||||
@@ -652,41 +653,41 @@ typedef struct _cef_list_value_t {
|
||||
// then the underlying data will be referenced and modifications to |value|
|
||||
// will modify this object.
|
||||
///
|
||||
int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, size_t index,
|
||||
struct _cef_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type null. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, int index);
|
||||
int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type bool. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, size_t index,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type int. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, size_t index,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type double. Returns true (1) if
|
||||
// the value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, size_t index,
|
||||
double value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type string. Returns true (1) if
|
||||
// the value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, size_t index,
|
||||
const cef_string_t* value);
|
||||
|
||||
///
|
||||
@@ -696,7 +697,7 @@ typedef struct _cef_list_value_t {
|
||||
// change. Otherwise, ownership will be transferred to this object and the
|
||||
// |value| reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, size_t index,
|
||||
struct _cef_binary_value_t* value);
|
||||
|
||||
///
|
||||
@@ -706,8 +707,8 @@ typedef struct _cef_list_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self, int index,
|
||||
struct _cef_dictionary_value_t* value);
|
||||
int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self,
|
||||
size_t index, struct _cef_dictionary_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type list. Returns true (1) if the
|
||||
@@ -716,7 +717,7 @@ typedef struct _cef_list_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, int index,
|
||||
int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, size_t index,
|
||||
struct _cef_list_value_t* value);
|
||||
} cef_list_value_t;
|
||||
|
||||
|
117
include/capi/cef_waitable_event_capi.h
Normal file
117
include/capi/cef_waitable_event_capi.h
Normal file
@@ -0,0 +1,117 @@
|
||||
// Copyright (c) 2017 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_WAITABLE_EVENT_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// WaitableEvent is a thread synchronization tool that allows one thread to wait
|
||||
// for another thread to finish some work. This is equivalent to using a
|
||||
// Lock+ConditionVariable to protect a simple boolean value. However, using
|
||||
// WaitableEvent in conjunction with a Lock to wait for a more complex state
|
||||
// change (e.g., for an item to be added to a queue) is not recommended. In that
|
||||
// case consider using a ConditionVariable instead of a WaitableEvent. It is
|
||||
// safe to create and/or signal a WaitableEvent from any thread. Blocking on a
|
||||
// WaitableEvent by calling the *wait() functions is not allowed on the browser
|
||||
// process UI or IO threads.
|
||||
///
|
||||
typedef struct _cef_waitable_event_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Put the event in the un-signaled state.
|
||||
///
|
||||
void (CEF_CALLBACK *reset)(struct _cef_waitable_event_t* self);
|
||||
|
||||
///
|
||||
// Put the event in the signaled state. This causes any thread blocked on Wait
|
||||
// to be woken up.
|
||||
///
|
||||
void (CEF_CALLBACK *signal)(struct _cef_waitable_event_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the event is in the signaled state, else false (0). If
|
||||
// the event was created with |automatic_reset| set to true (1) then calling
|
||||
// this function will also cause a reset.
|
||||
///
|
||||
int (CEF_CALLBACK *is_signaled)(struct _cef_waitable_event_t* self);
|
||||
|
||||
///
|
||||
// Wait indefinitely for the event to be signaled. This function will not
|
||||
// return until after the call to signal() has completed. This function cannot
|
||||
// be called on the browser process UI or IO threads.
|
||||
///
|
||||
void (CEF_CALLBACK *wait)(struct _cef_waitable_event_t* self);
|
||||
|
||||
///
|
||||
// Wait up to |max_ms| milliseconds for the event to be signaled. Returns true
|
||||
// (1) if the event was signaled. A return value of false (0) does not
|
||||
// necessarily mean that |max_ms| was exceeded. This function will not return
|
||||
// until after the call to signal() has completed. This function cannot be
|
||||
// called on the browser process UI or IO threads.
|
||||
///
|
||||
int (CEF_CALLBACK *timed_wait)(struct _cef_waitable_event_t* self,
|
||||
int64 max_ms);
|
||||
} cef_waitable_event_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new waitable event. If |automatic_reset| is true (1) then the event
|
||||
// state is automatically reset to un-signaled after a single waiting thread has
|
||||
// been released; otherwise, the state remains signaled until reset() is called
|
||||
// manually. If |initially_signaled| is true (1) then the event will start in
|
||||
// the signaled state.
|
||||
///
|
||||
CEF_EXPORT cef_waitable_event_t* cef_waitable_event_create(int automatic_reset,
|
||||
int initially_signaled);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
@@ -38,6 +38,11 @@
|
||||
#define CEF_INCLUDE_CAPI_TEST_CEF_TRANSLATOR_TEST_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(BUILDING_CEF_SHARED) && !defined(WRAPPING_CEF_SHARED) && \
|
||||
!defined(UNIT_TEST)
|
||||
#error This file can be included for unit tests only
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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) 2016 Marshall A. Greenblatt. All rights reserved.
|
||||
// Copyright (c) 2017 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
|
||||
|
@@ -669,24 +669,66 @@ class CefBrowserHost : public virtual CefBase {
|
||||
virtual void SetWindowlessFrameRate(int frame_rate) =0;
|
||||
|
||||
///
|
||||
// Get the NSTextInputContext implementation for enabling IME on Mac when
|
||||
// window rendering is disabled.
|
||||
// Begins a new composition or updates the existing composition. Blink has a
|
||||
// special node (a composition node) that allows the input method to change
|
||||
// text without affecting other DOM nodes. |text| is the optional text that
|
||||
// will be inserted into the composition node. |underlines| is an optional set
|
||||
// of ranges that will be underlined in the resulting text.
|
||||
// |replacement_range| is an optional range of the existing text that will be
|
||||
// replaced. |selection_range| is an optional range of the resulting text that
|
||||
// will be selected after insertion or replacement. The |replacement_range|
|
||||
// value is only used on OS X.
|
||||
//
|
||||
// This method may be called multiple times as the composition changes. When
|
||||
// the client is done making changes the composition should either be canceled
|
||||
// or completed. To cancel the composition call ImeCancelComposition. To
|
||||
// complete the composition call either ImeCommitText or
|
||||
// ImeFinishComposingText. Completion is usually signaled when:
|
||||
// A. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR
|
||||
// flag (on Windows), or;
|
||||
// B. The client receives a "commit" signal of GtkIMContext (on Linux), or;
|
||||
// C. insertText of NSTextInput is called (on Mac).
|
||||
//
|
||||
// This method is only used when window rendering is disabled.
|
||||
///
|
||||
/*--cef(default_retval=NULL)--*/
|
||||
virtual CefTextInputContext GetNSTextInputContext() =0;
|
||||
/*--cef(optional_param=text, optional_param=underlines)--*/
|
||||
virtual void ImeSetComposition(
|
||||
const CefString& text,
|
||||
const std::vector<CefCompositionUnderline>& underlines,
|
||||
const CefRange& replacement_range,
|
||||
const CefRange& selection_range) =0;
|
||||
|
||||
///
|
||||
// Handles a keyDown event prior to passing it through the NSTextInputClient
|
||||
// machinery.
|
||||
// Completes the existing composition by optionally inserting the specified
|
||||
// |text| into the composition node. |replacement_range| is an optional range
|
||||
// of the existing text that will be replaced. |relative_cursor_pos| is where
|
||||
// the cursor will be positioned relative to the current cursor position. See
|
||||
// comments on ImeSetComposition for usage. The |replacement_range| and
|
||||
// |relative_cursor_pos| values are only used on OS X.
|
||||
// This method is only used when window rendering is disabled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent) =0;
|
||||
/*--cef(optional_param=text)--*/
|
||||
virtual void ImeCommitText(const CefString& text,
|
||||
const CefRange& replacement_range,
|
||||
int relative_cursor_pos) =0;
|
||||
|
||||
///
|
||||
// Performs any additional actions after NSTextInputClient handles the event.
|
||||
// Completes the existing composition by applying the current composition node
|
||||
// contents. If |keep_selection| is false the current selection, if any, will
|
||||
// be discarded. See comments on ImeSetComposition for usage.
|
||||
// This method is only used when window rendering is disabled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) =0;
|
||||
virtual void ImeFinishComposingText(bool keep_selection) =0;
|
||||
|
||||
///
|
||||
// Cancels the existing composition and discards the composition node
|
||||
// contents without applying them. See comments on ImeSetComposition for
|
||||
// usage.
|
||||
// This method is only used when window rendering is disabled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ImeCancelComposition() =0;
|
||||
|
||||
///
|
||||
// Call this method when the user drags the mouse into the web view (before
|
||||
|
@@ -195,6 +195,13 @@ class CefContextMenuParams : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual bool HasImageContents() =0;
|
||||
|
||||
///
|
||||
// Returns the title text or the alt text if the context menu was invoked on
|
||||
// an image.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetTitleText() = 0;
|
||||
|
||||
///
|
||||
// Returns the URL of the top level page that the context menu was invoked on.
|
||||
///
|
||||
|
135
include/cef_crash_util.h
Normal file
135
include/cef_crash_util.h
Normal file
@@ -0,0 +1,135 @@
|
||||
// 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.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// 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_CRASH_UTIL_H_
|
||||
#define CEF_INCLUDE_CEF_CRASH_UTIL_H_
|
||||
#pragma once
|
||||
|
||||
///
|
||||
// Crash reporting is configured using an INI-style config file named
|
||||
// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
|
||||
// the main application executable. On macOS this file must be placed in the
|
||||
// top-level app bundle Resources directory (e.g.
|
||||
// "<appname>.app/Contents/Resources"). File contents are as follows:
|
||||
//
|
||||
// # Comments start with a hash character and must be on their own line.
|
||||
//
|
||||
// [Config]
|
||||
// ProductName=<Value of the "prod" crash key; defaults to "cef">
|
||||
// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
|
||||
// AppName=<Windows only; App-specific folder name component for storing crash
|
||||
// information; default to "CEF">
|
||||
// ExternalHandler=<Windows only; Name of the external handler exe to use
|
||||
// instead of re-launching the main exe; default to empty>
|
||||
// ServerURL=<crash server URL; default to empty>
|
||||
// RateLimitEnabled=<True if uploads should be rate limited; default to true>
|
||||
// MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
|
||||
// default to 5>
|
||||
// MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value
|
||||
// will cause older reports to be deleted; default to 20>
|
||||
// MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted;
|
||||
// default to 5>
|
||||
//
|
||||
// [CrashKeys]
|
||||
// my_key1=<small|medium|large>
|
||||
// my_key2=<small|medium|large>
|
||||
//
|
||||
// Config section:
|
||||
//
|
||||
// If "ProductName" and/or "ProductVersion" are set then the specified values
|
||||
// will be included in the crash dump metadata. On macOS if these values are set
|
||||
// to empty then they will be retrieved from the Info.plist file using the
|
||||
// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
|
||||
//
|
||||
// If "AppName" is set on Windows then crash report information (metrics,
|
||||
// database and dumps) will be stored locally on disk under the
|
||||
// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
|
||||
// platforms the CefSettings.user_data_path value will be used.
|
||||
//
|
||||
// If "ExternalHandler" is set on Windows then the specified exe will be
|
||||
// launched as the crashpad-handler instead of re-launching the main process
|
||||
// exe. The value can be an absolute path or a path relative to the main exe
|
||||
// directory. On Linux the CefSettings.browser_subprocess_path value will be
|
||||
// used. On macOS the existing subprocess app bundle will be used.
|
||||
//
|
||||
// If "ServerURL" is set then crashes will be uploaded as a multi-part POST
|
||||
// request to the specified URL. Otherwise, reports will only be stored locally
|
||||
// on disk.
|
||||
//
|
||||
// If "RateLimitEnabled" is set to true then crash report uploads will be rate
|
||||
// limited as follows:
|
||||
// 1. If "MaxUploadsPerDay" is set to a positive value then at most the
|
||||
// specified number of crashes will be uploaded in each 24 hour period.
|
||||
// 2. If crash upload fails due to a network or server error then an
|
||||
// incremental backoff delay up to a maximum of 24 hours will be applied for
|
||||
// retries.
|
||||
// 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
|
||||
// "MaxUploadsPerDay" value will be reduced to 1 until the client is
|
||||
// restarted. This helps to avoid an upload flood when the network or
|
||||
// server error is resolved.
|
||||
// Rate limiting is not supported on Linux.
|
||||
//
|
||||
// If "MaxDatabaseSizeInMb" is set to a positive value then crash report storage
|
||||
// on disk will be limited to that size in megabytes. For example, on Windows
|
||||
// each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20 equates to
|
||||
// about 34 crash reports stored on disk. Not supported on Linux.
|
||||
//
|
||||
// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports older
|
||||
// than the specified age in days will be deleted. Not supported on Linux.
|
||||
//
|
||||
// CrashKeys section:
|
||||
//
|
||||
// Any number of crash keys can be specified for use by the application. Crash
|
||||
// key values will be truncated based on the specified size (small = 63 bytes,
|
||||
// medium = 252 bytes, large = 1008 bytes). The value of crash keys can be set
|
||||
// from any thread or process using the CefSetCrashKeyValue function. These
|
||||
// key/value pairs will be sent to the crash server along with the crash dump
|
||||
// file. Medium and large values will be chunked for submission. For example,
|
||||
// if your key is named "mykey" then the value will be broken into ordered
|
||||
// chunks and submitted using keys named "mykey-1", "mykey-2", etc.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefCrashReportingEnabled();
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Sets or clears a specific key-value pair from the crash metadata.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefSetCrashKeyValue(const CefString& key, const CefString& value);
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_CRASH_UTIL_H_
|
118
include/cef_file_util.h
Normal file
118
include/cef_file_util.h
Normal file
@@ -0,0 +1,118 @@
|
||||
// Copyright (c) 2016 Marshall A. Greenblatt. Portions copyright (c) 2012
|
||||
// Google Inc. 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_FILE_UTIL_H_
|
||||
#define CEF_INCLUDE_CEF_FILE_UTIL_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Creates a directory and all parent directories if they don't already exist.
|
||||
// Returns true on successful creation or if the directory already exists. The
|
||||
// directory is only readable by the current user. Calling this function on the
|
||||
// browser process UI or IO threads is not allowed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefCreateDirectory(const CefString& full_path);
|
||||
|
||||
///
|
||||
// Get the temporary directory provided by the system.
|
||||
//
|
||||
// WARNING: In general, you should use the temp directory variants below instead
|
||||
// of this function. Those variants will ensure that the proper permissions are
|
||||
// set so that other users on the system can't edit them while they're open
|
||||
// (which could lead to security issues).
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefGetTempDirectory(CefString& temp_dir);
|
||||
|
||||
///
|
||||
// Creates a new directory. On Windows if |prefix| is provided the new directory
|
||||
// name is in the format of "prefixyyyy". Returns true on success and sets
|
||||
// |new_temp_path| to the full path of the directory that was created. The
|
||||
// directory is only readable by the current user. Calling this function on the
|
||||
// browser process UI or IO threads is not allowed.
|
||||
///
|
||||
/*--cef(optional_param=prefix)--*/
|
||||
bool CefCreateNewTempDirectory(const CefString& prefix,
|
||||
CefString& new_temp_path);
|
||||
|
||||
///
|
||||
// Creates a directory within another directory. Extra characters will be
|
||||
// appended to |prefix| to ensure that the new directory does not have the same
|
||||
// name as an existing directory. Returns true on success and sets |new_dir| to
|
||||
// the full path of the directory that was created. The directory is only
|
||||
// readable by the current user. Calling this function on the browser process
|
||||
// UI or IO threads is not allowed.
|
||||
///
|
||||
/*--cef(optional_param=prefix)--*/
|
||||
bool CefCreateTempDirectoryInDirectory(const CefString& base_dir,
|
||||
const CefString& prefix,
|
||||
CefString& new_dir);
|
||||
|
||||
///
|
||||
// Returns true if the given path exists and is a directory. Calling this
|
||||
// function on the browser process UI or IO threads is not allowed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefDirectoryExists(const CefString& path);
|
||||
|
||||
///
|
||||
// Deletes the given path whether it's a file or a directory. If |path| is a
|
||||
// directory all contents will be deleted. If |recursive| is true any sub-
|
||||
// directories and their contents will also be deleted (equivalent to executing
|
||||
// "rm -rf", so use with caution). On POSIX environments if |path| is a symbolic
|
||||
// link then only the symlink will be deleted. Returns true on successful
|
||||
// deletion or if |path| does not exist. Calling this function on the browser
|
||||
// process UI or IO threads is not allowed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefDeleteFile(const CefString& path, bool recursive);
|
||||
|
||||
///
|
||||
// Writes the contents of |src_dir| into a zip archive at |dest_file|. If
|
||||
// |include_hidden_files| is true files starting with "." will be included.
|
||||
// Returns true on success. Calling this function on the browser process UI or
|
||||
// IO threads is not allowed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefZipDirectory(const CefString& src_dir,
|
||||
const CefString& dest_file,
|
||||
bool include_hidden_files);
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_FILE_UTIL_H_
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user