Compare commits

..

24 Commits
5790 ... 5414

Author SHA1 Message Date
Marshall Greenblatt
f1c41e4b13 Use default cookie scheme settings for non-global request contexts
The CefSettings cookie scheme configuration will now only impact the global
request context. Custom behavior for other request contexts must now be
configured via CefRequestContextSettings.
2023-01-26 14:41:10 -05:00
Marshall Greenblatt
9fe3b50a51 Update to Chromium version 109.0.5414.120 2023-01-26 14:55:05 +00:00
Marshall Greenblatt
454cbc2563 Fix patched chrome build with enable_cef=false 2023-01-23 14:10:45 -05:00
Marshall Greenblatt
92b44cd7eb chrome: Allow WebUI handling of DevTools scheme (fixes issue #3421) 2023-01-23 13:42:05 -05:00
Marshall Greenblatt
83cbdcdce5 Fix patched chrome build with enable_cef=false 2023-01-23 12:59:09 -05:00
Marshall Greenblatt
18f6895b3b chrome: Don't show the profile picker on startup (fixes issue #3440) 2023-01-19 16:20:29 -05:00
Marshall Greenblatt
23deb6695e cmake: Set PROJECT_ARCH to the host architecture by default 2023-01-17 10:56:28 -05:00
e.jorge
6d4fdb2ef3 Fix edit command execution on pdf frames (fixes issue #3429) 2023-01-12 16:48:37 -05:00
Marshall Greenblatt
4aaeb3eb6c Fix crash calling GetUserData on a non-user V8 object (fixes issue #3438) 2023-01-12 16:15:16 -05:00
Vladimir Kharitonov
d0e1ac2d42 mac: Fix OSR scaling behavior when switching displays (fixes issue #3423) 2023-01-12 16:15:15 -05:00
Marshall Greenblatt
44ba3e7c7e Update to Chromium version 109.0.5414.87 2023-01-10 14:36:58 +00:00
Marshall Greenblatt
b7b1fdc749 win: osr: Fix context menu popup placement (fixes issue 3433) 2023-01-06 15:56:31 -05:00
Marshall Greenblatt
c81ef733d9 Revert "Fix dismissal of select popups on NotifyMoveOrResizeStarted (see issue #3294)"
This reverts commit 5f4bccd672.

Reason for revert: This change causes a native parented browser to lose focus
on move (fixes issue #3426).
2023-01-06 13:51:18 -05:00
Marshall Greenblatt
0e4df16c81 alloy: Avoid initialization of privacy sandbox and identity manager (fixes issue #3434, fixes issue #3401) 2023-01-06 12:30:11 -05:00
Marshall Greenblatt
abbf5d2c20 alloy: Fix crashes when extensions are disabled (fixes issue #3430) 2023-01-05 14:23:55 -05:00
Marshall Greenblatt
b5acaf4520 Update to Chromium version 109.0.5414.74 2023-01-05 14:37:33 +00:00
Marshall Greenblatt
2f7620cf4e cefclient: Remove console message alert and update google URLs 2023-01-04 17:50:30 -05:00
Marshall Greenblatt
dafd45ae17 Mac: Fix implicit type cast errors with Xcode 14.1 2023-01-04 17:45:47 -05:00
Marshall Greenblatt
3039063452 Update generated files for copyright year 2023-01-04 17:45:46 -05:00
Marshall Greenblatt
ab89ea2d96 Update to Chromium version 109.0.5414.61 2022-12-30 20:26:16 +00:00
Marshall Greenblatt
1d6e584b76 win: Fix ARM64 build generation (see https://crbug.com/1385454) 2022-12-16 13:29:08 -05:00
Marshall Greenblatt
f43c183b16 Update to Chromium version 109.0.5414.46 2022-12-15 15:09:59 +00:00
Marshall Greenblatt
75a32e3e82 Update to Chromium version 109.0.5414.36 2022-12-14 17:26:07 +00:00
Marshall Greenblatt
cd5e37ab62 Update to Chromium version 109.0.5414.8 2022-11-17 12:52:49 -05:00
1123 changed files with 18940 additions and 31518 deletions

View File

@@ -1,35 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen and what happened instead.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Versions (please complete the following information):**
- OS: [e.g. Windows 10, MacOS 13.2, Ubuntu 22.10]
- CEF Version: [e.g. 111.2.2]
**Additional context**
Does the problem reproduce with the cefclient or cefsimple sample application at the same version?
Does the problem reproduce with Google Chrome at the same version?
Add any other context about the problem here.

View File

@@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -385,13 +385,12 @@ source_set("libcef_static_unittested") {
sources = [
"libcef/browser/devtools/devtools_util.cc",
"libcef/browser/devtools/devtools_util.h",
"libcef/browser/geometry_util.h",
"libcef/browser/geometry_util.cc",
"libcef/browser/screen_util.h",
"libcef/browser/screen_util.cc",
]
deps = [
"//base",
"//ui/gfx/geometry",
]
configs += [
@@ -407,7 +406,7 @@ test("libcef_static_unittests") {
sources = [
"libcef/browser/devtools/devtools_util_unittest.cc",
"libcef/browser/geometry_util_unittest.cc",
"libcef/browser/screen_util_unittest.cc",
]
deps = [
@@ -801,7 +800,6 @@ source_set("libcef_static") {
"libcef/browser/views/view_util.cc",
"libcef/browser/views/view_util.h",
"libcef/browser/views/view_view.h",
"libcef/browser/views/widget_destruction_observer.h",
"libcef/browser/views/window_impl.cc",
"libcef/browser/views/window_impl.h",
"libcef/browser/views/window_view.cc",
@@ -935,6 +933,8 @@ source_set("libcef_static") {
"libcef/renderer/render_frame_util.h",
"libcef/renderer/render_manager.cc",
"libcef/renderer/render_manager.h",
"libcef/renderer/render_urlrequest_impl.cc",
"libcef/renderer/render_urlrequest_impl.h",
"libcef/renderer/thread_util.h",
"libcef/renderer/v8_impl.cc",
"libcef/renderer/v8_impl.h",
@@ -1030,6 +1030,7 @@ source_set("libcef_static") {
"//crypto",
"//device/base",
"//extensions/browser",
"//extensions/browser:core_api_provider",
"//extensions/buildflags",
"//extensions/common/api",
"//extensions/common:core_api_provider",
@@ -1079,6 +1080,7 @@ source_set("libcef_static") {
"libcef/browser/alloy/alloy_browser_main_win.cc",
"libcef/browser/native/browser_platform_delegate_native_win.cc",
"libcef/browser/native/browser_platform_delegate_native_win.h",
"libcef/browser/native/cursor_util_win.cc",
"libcef/browser/osr/browser_platform_delegate_osr_win.cc",
"libcef/browser/osr/browser_platform_delegate_osr_win.h",
]
@@ -1107,6 +1109,7 @@ source_set("libcef_static") {
sources += includes_linux + [
"libcef/browser/native/browser_platform_delegate_native_linux.cc",
"libcef/browser/native/browser_platform_delegate_native_linux.h",
"libcef/browser/native/cursor_util_linux.cc",
"libcef/browser/osr/browser_platform_delegate_osr_linux.cc",
"libcef/browser/osr/browser_platform_delegate_osr_linux.h",
"libcef/browser/printing/print_dialog_linux.cc",
@@ -1138,17 +1141,12 @@ source_set("libcef_static") {
sources += includes_mac + [
"libcef/browser/native/browser_platform_delegate_native_mac.h",
"libcef/browser/native/browser_platform_delegate_native_mac.mm",
"libcef/browser/native/cursor_util_mac.mm",
"libcef/browser/native/javascript_dialog_runner_mac.h",
"libcef/browser/native/javascript_dialog_runner_mac.mm",
"libcef/browser/native/menu_runner_mac.h",
"libcef/browser/native/menu_runner_mac.mm",
"libcef/browser/osr/browser_platform_delegate_osr_mac.h",
"libcef/browser/osr/browser_platform_delegate_osr_mac.mm",
"libcef/browser/views/native_widget_mac.h",
"libcef/browser/views/native_widget_mac.mm",
"libcef/browser/views/ns_window.h",
"libcef/browser/views/ns_window.mm",
"libcef/browser/views/view_util_mac.mm",
"libcef/common/util_mac.h",
"libcef/common/util_mac.mm",
@@ -1157,8 +1155,6 @@ source_set("libcef_static") {
"//chrome/app/chrome_main_mac.h",
"//chrome/app/chrome_main_mac.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
if (ozone_platform_x11) {
@@ -1173,7 +1169,6 @@ source_set("libcef_static") {
sources += [
"libcef/browser/native/browser_platform_delegate_native_aura.cc",
"libcef/browser/native/browser_platform_delegate_native_aura.h",
"libcef/browser/native/cursor_util_aura.cc",
"libcef/browser/native/menu_runner_views_aura.cc",
"libcef/browser/native/menu_runner_views_aura.h",
"libcef/browser/views/view_util_aura.cc",
@@ -1354,10 +1349,7 @@ make_pack_header("resources") {
"$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
"$root_gen_dir/content/browser/webrtc/resources/grit/webrtc_internals_resources.h",
"$root_gen_dir/content/grit/content_resources.h",
"$root_gen_dir/content/grit/gpu_resources.h",
"$root_gen_dir/content/grit/histograms_resources.h",
"$root_gen_dir/content/grit/process_resources.h",
"$root_gen_dir/content/grit/service_worker_resources.h",
"$root_gen_dir/content/grit/dev_ui_content_resources.h",
"$root_gen_dir/extensions/grit/extensions_browser_resources.h",
"$root_gen_dir/extensions/grit/extensions_renderer_resources.h",
"$root_gen_dir/extensions/grit/extensions_resources.h",
@@ -1365,7 +1357,7 @@ make_pack_header("resources") {
"$root_gen_dir/net/grit/net_resources.h",
"$root_gen_dir/third_party/blink/public/resources/grit/blink_resources.h",
"$root_gen_dir/ui/resources/grit/ui_resources.h",
"$root_gen_dir/ui/resources/grit/webui_resources.h",
"$root_gen_dir/ui/resources/grit/webui_generated_resources.h",
"$root_gen_dir/ui/views/resources/grit/views_resources.h",
]
@@ -1381,13 +1373,10 @@ make_pack_header("resources") {
"//components/resources:components_resources",
"//components/resources:dev_ui_components_resources",
"//content/browser/devtools:devtools_resources",
"//content/browser/resources/gpu:resources",
"//content/browser/resources/histograms:resources",
"//content/browser/resources/process:resources",
"//content/browser/resources/service_worker:resources",
"//content/browser/tracing:resources",
"//content/browser/webrtc/resources",
"//content:content_resources",
"//content:dev_ui_content_resources",
"//extensions:extensions_browser_resources",
"//extensions:extensions_renderer_resources",
"//extensions:extensions_resources_grd",
@@ -1395,7 +1384,7 @@ make_pack_header("resources") {
"//net:net_resources",
"//third_party/blink/public:resources",
"//ui/resources:ui_resources_grd",
"//ui/resources:webui_resources_grd",
"//ui/resources:webui_generated_resources_grd",
"//ui/views/resources:resources_grd",
]
}
@@ -1513,8 +1502,6 @@ if (is_mac) {
public_deps += [ "//third_party/icu:icudata", ]
}
sources += [ "//ui/gl/resources/angle-metal/gpu_shader_cache.bin" ]
if (v8_use_external_startup_data) {
sources += [
"$root_out_dir/snapshot_blob.bin",
@@ -1607,7 +1594,6 @@ if (is_mac) {
configs += [
":libcef_autogen_config",
"//build/config/compiler:enable_arc",
]
# We don't link the framework so just use the path from the main executable.
@@ -1783,20 +1769,7 @@ if (is_mac) {
}
}
# From //chrome/BUILD.gn:
# Helper app to display alert notifications. This is necessary as an app can
# only display either banner or alert style notifications and the main app
# will display banners.
alert_helper_params = [
"alerts",
".alerts",
" (Alerts)",
]
# Merge all helper apps needed by //content and //chrome.
chrome_mac_helpers = content_mac_helpers + [ alert_helper_params ]
foreach(helper_params, chrome_mac_helpers) {
foreach(helper_params, content_mac_helpers) {
_helper_target = helper_params[0]
_helper_bundle_id = helper_params[1]
_helper_suffix = helper_params[2]
@@ -1827,7 +1800,7 @@ if (is_mac) {
":cef_framework",
]
foreach(helper_params, chrome_mac_helpers) {
foreach(helper_params, content_mac_helpers) {
sources += [
"$root_out_dir/${app_helper_name}${helper_params[2]}.app",
]
@@ -2221,10 +2194,6 @@ if (is_mac) {
configs += [
":gtk",
]
cflags = [
# Don't warn about deprecated GDK/GTK functions.
"-Wno-deprecated-declarations",
]
}
if (!is_component_build) {

View File

@@ -7,6 +7,6 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/115.0.5790.173',
'depot_tools_checkout': '6d0c235dae'
'chromium_checkout': 'refs/tags/109.0.5414.120',
'depot_tools_checkout': 'ca3ebf119e'
}

View File

@@ -13,7 +13,7 @@
#
# Linux: Ninja, GCC 7.5.0+, Unix Makefiles
# MacOS: Ninja, Xcode 12.2 to 13.0
# Windows: Ninja, Visual Studio 2022
# Windows: Ninja, Visual Studio 2019+
#
# Ninja is a cross-platform open-source tool for running fast builds using
# pre-installed platform toolchains (GNU, clang, Xcode or MSVC). It can be
@@ -54,9 +54,9 @@
# recommended.
#
# - Windows requirements:
# Visual Studio 2022 building on Windows 10 or newer. Windows 10/11 64-bit is
# recommended. Newer versions will likely also work but may not have been
# tested.
# Visual Studio 2019 or newer building on Windows 7 or newer. Windows 10
# 64-bit is recommended. Newer versions will likely also work but may not have
# been tested.
#
# BUILD EXAMPLES
#
@@ -96,35 +96,35 @@
# > ninja cefclient cefsimple
#
# To perform a Windows build using a 32-bit CEF binary distribution:
# Using the Visual Studio 2022 IDE:
# > cmake -G "Visual Studio 17" -A Win32 ..
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A Win32 ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2022 command-line tools:
# Using Ninja with Visual Studio 2019 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars32.bat"
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Windows build using a 64-bit CEF binary distribution:
# Using the Visual Studio 2022 IDE:
# > cmake -G "Visual Studio 17" -A x64 ..
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A x64 ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2022 command-line tools:
# Using Ninja with Visual Studio 2019 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Windows build using an ARM64 CEF binary distribution:
# Using the Visual Studio 2022 IDE:
# > cmake -G "Visual Studio 17" -A arm64 ..
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A arm64 ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2022 command-line tools:
# Using Ninja with Visual Studio 2019 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefsimple
@@ -132,8 +132,8 @@
# Global setup.
#
# For VS2022 and Xcode 12+ support.
cmake_minimum_required(VERSION 3.21)
# For VS2019 and Xcode 12+ support.
cmake_minimum_required(VERSION 3.19)
# Only generate Debug and Release configuration types.
set(CMAKE_CONFIGURATION_TYPES Debug Release)

View File

@@ -9,7 +9,6 @@ The Chromium Embedded Framework (CEF) is a simple framework for embedding Chromi
* Branches and Building - https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
* Announcements - https://groups.google.com/forum/#!forum/cef-announce
* Support Forum - http://www.magpcss.org/ceforum/
* Issue Tracker - https://github.com/chromiumembedded/cef/issues
* C++ API Docs - [Stable release docs](https://cef-builds.spotifycdn.com/docs/stable.html) / [Beta release docs](https://cef-builds.spotifycdn.com/docs/beta.html)
* Downloads - https://cef-builds.spotifycdn.com/index.html
* Donations - http://www.magpcss.org/ceforum/donate.php
@@ -58,7 +57,7 @@ If you're the maintainer of a project not listed above and would like your proje
CEF is still very much a work in progress. Some ways that you can help out:
\- Vote for issues in the [CEF issue tracker](https://github.com/chromiumembedded/cef/issues) that are important to you. This helps with development prioritization.
\- Vote for issues in the [CEF issue tracker](https://bitbucket.org/chromiumembedded/cef/issues?status=new&status=open) that are important to you. This helps with development prioritization.
\- Report any bugs that you find or feature requests that are important to you. Make sure to first search for existing issues before creating new ones. Please use the [CEF Forum](http://magpcss.org/ceforum) and not the issue tracker for usage questions. Each CEF issue should:
@@ -69,7 +68,7 @@ CEF is still very much a work in progress. Some ways that you can help out:
\- Write unit tests for new or existing functionality.
\- Pull requests and patches are welcome. View open issues in the [CEF issue tracker](https://github.com/chromiumembedded/cef/issues) or search for TODO(cef) in the source code for ideas.
\- Pull requests and patches are welcome. View open issues in the [CEF issue tracker](https://bitbucket.org/chromiumembedded/cef/issues?status=new&status=open) or search for TODO(cef) in the source code for ideas.
If you would like to contribute source code changes to CEF please follow the below guidelines:

View File

@@ -8,6 +8,7 @@
'include/base/cef_atomic_flag.h',
'include/base/cef_atomic_ref_count.h',
'include/base/cef_auto_reset.h',
'include/base/cef_basictypes.h',
'include/base/cef_bind.h',
'include/base/cef_build.h',
'include/base/cef_callback.h',
@@ -54,7 +55,6 @@
'include/internal/cef_time.h',
'include/internal/cef_trace_event_internal.h',
'include/internal/cef_types.h',
'include/internal/cef_types_content_settings.h',
'include/internal/cef_types_geometry.h',
],
'includes_capi': [
@@ -237,8 +237,6 @@
'tests/cefclient/browser/client_prefs.cc',
'tests/cefclient/browser/client_prefs.h',
'tests/cefclient/browser/client_types.h',
'tests/cefclient/browser/default_client_handler.cc',
'tests/cefclient/browser/default_client_handler.h',
'tests/cefclient/browser/dialog_test.cc',
'tests/cefclient/browser/dialog_test.h',
'tests/cefclient/browser/image_cache.cc',
@@ -393,7 +391,6 @@
'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/views_window_mac.mm',
'tests/cefclient/browser/window_test_runner_mac.h',
'tests/cefclient/browser/window_test_runner_mac.mm',
'tests/cefclient/cefclient_mac.mm',

View File

@@ -346,10 +346,6 @@ if(OS_MAC)
CEF_USE_SANDBOX # Used by apps to test if the sandbox is enabled
)
list(APPEND CEF_STANDARD_LIBS
-lsandbox
)
# CEF sandbox library paths.
set(CEF_SANDBOX_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/cef_sandbox.a")
set(CEF_SANDBOX_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/cef_sandbox.a")
@@ -359,7 +355,6 @@ if(OS_MAC)
# Format is "<name suffix>:<target suffix>:<plist suffix>".
set(CEF_HELPER_APP_SUFFIXES
"::"
" (Alerts):_alerts:.alerts"
" (GPU):_gpu:.gpu"
" (Plugin):_plugin:.plugin"
" (Renderer):_renderer:.renderer"
@@ -440,12 +435,7 @@ if(OS_WINDOWS)
list(APPEND CEF_COMPILER_DEFINES
WIN32 _WIN32 _WINDOWS # Windows platform
UNICODE _UNICODE # Unicode build
# Targeting Windows 10. We can't say `=_WIN32_WINNT_WIN10` here because
# some files do `#if WINVER < 0x0600` without including windows.h before,
# and then _WIN32_WINNT_WIN10 isn't yet known to be 0x0A00.
WINVER=0x0A00
_WIN32_WINNT=0x0A00
NTDDI_VERSION=NTDDI_WIN10_FE
WINVER=0x0601 _WIN32_WINNT=0x601 # Targeting Windows 7
NOMINMAX # Use the standard's templated min/max
WIN32_LEAN_AND_MEAN # Exclude less common API declarations
_HAS_EXCEPTIONS=0 # Disable exceptions
@@ -462,7 +452,7 @@ if(OS_WINDOWS)
# only) uses fibers to switch to a 4MiB stack at runtime via
# CefRunWinMainWithPreferredStackSize().
list(APPEND CEF_EXE_LINKER_FLAGS
/STACK:0x80000
/STACK:0x8000
)
else()
# Increase the initial stack size to 8MiB from the default 1MiB.
@@ -493,7 +483,6 @@ if(OS_WINDOWS)
# List of CEF binary files.
set(CEF_BINARY_FILES
chrome_elf.dll
d3dcompiler_47.dll
libcef.dll
libEGL.dll
libGLESv2.dll
@@ -504,6 +493,12 @@ if(OS_WINDOWS)
vulkan-1.dll
)
if(NOT PROJECT_ARCH STREQUAL "arm64")
list(APPEND CEF_BINARY_FILES
d3dcompiler_47.dll
)
endif()
# List of CEF resource files.
set(CEF_RESOURCE_FILES
chrome_100_percent.pak
@@ -527,18 +522,14 @@ if(OS_WINDOWS)
Advapi32.lib
dbghelp.lib
Delayimp.lib
ntdll.lib
OleAut32.lib
PowrProf.lib
Propsys.lib
psapi.lib
SetupAPI.lib
Shell32.lib
Shcore.lib
Userenv.lib
version.lib
wbemuuid.lib
WindowsApp.lib
winmm.lib
)

View File

@@ -73,9 +73,8 @@ class AutoReset {
}
~AutoReset() {
if (scoped_variable_) {
if (scoped_variable_)
*scoped_variable_ = std::move(original_value_);
}
}
private:

View File

@@ -0,0 +1,86 @@
// Copyright (c) 2014 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.
#ifndef CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
#define CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
#pragma once
#include <limits.h> // For UINT_MAX
#include <stddef.h> // For size_t
#include "include/base/cef_build.h"
// The NSPR system headers define 64-bit as |long| when possible, except on
// Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
//
// On Mac OS X, |long long| is used for 64-bit types for compatibility with
// <inttypes.h> format macros even in the LP64 model.
#if defined(__LP64__) && !defined(OS_MAC) && !defined(OS_OPENBSD)
typedef long int64;
typedef unsigned long uint64;
#else
typedef long long int64;
typedef unsigned long long uint64;
#endif
// TODO: Remove these type guards. These are to avoid conflicts with
// obsolete/protypes.h in the Gecko SDK.
#ifndef _INT32
#define _INT32
typedef int int32;
#endif
// TODO: Remove these type guards. These are to avoid conflicts with
// obsolete/protypes.h in the Gecko SDK.
#ifndef _UINT32
#define _UINT32
typedef unsigned int uint32;
#endif
#ifndef _INT16
#define _INT16
typedef short int16;
#endif
#ifndef _UINT16
#define _UINT16
typedef unsigned short uint16;
#endif
// UTF-16 character type.
#ifndef char16
#if defined(WCHAR_T_IS_UTF16)
typedef wchar_t char16;
#elif defined(WCHAR_T_IS_UTF32)
typedef unsigned short char16;
#endif
#endif
#endif // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_

View File

@@ -71,7 +71,7 @@
#if defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/functional/bind.h"
#include "base/bind.h"
#else // !USING_CHROMIUM_INCLUDES
// The following is substantially similar to the Chromium implementation.
// If the Chromium implementation diverges the below implementation should be
@@ -97,34 +97,35 @@ namespace base {
/// Bind as OnceCallback.
///
template <typename Functor, typename... Args>
inline OnceCallback<cef_internal::MakeUnboundRunType<Functor, Args...>>
BindOnce(Functor&& functor, Args&&... args) {
static_assert(!cef_internal::IsOnceCallback<std::decay_t<Functor>>() ||
inline OnceCallback<internal::MakeUnboundRunType<Functor, Args...>> BindOnce(
Functor&& functor,
Args&&... args) {
static_assert(!internal::IsOnceCallback<std::decay_t<Functor>>() ||
(std::is_rvalue_reference<Functor&&>() &&
!std::is_const<std::remove_reference_t<Functor>>()),
"BindOnce requires non-const rvalue for OnceCallback binding."
" I.e.: base::BindOnce(std::move(callback)).");
static_assert(
conjunction<cef_internal::AssertBindArgIsNotBasePassed<
std::decay_t<Args>>...>::value,
conjunction<
internal::AssertBindArgIsNotBasePassed<std::decay_t<Args>>...>::value,
"Use std::move() instead of base::Passed() with base::BindOnce()");
return cef_internal::BindImpl<OnceCallback>(std::forward<Functor>(functor),
std::forward<Args>(args)...);
return internal::BindImpl<OnceCallback>(std::forward<Functor>(functor),
std::forward<Args>(args)...);
}
///
/// Bind as RepeatingCallback.
///
template <typename Functor, typename... Args>
inline RepeatingCallback<cef_internal::MakeUnboundRunType<Functor, Args...>>
inline RepeatingCallback<internal::MakeUnboundRunType<Functor, Args...>>
BindRepeating(Functor&& functor, Args&&... args) {
static_assert(
!cef_internal::IsOnceCallback<std::decay_t<Functor>>(),
!internal::IsOnceCallback<std::decay_t<Functor>>(),
"BindRepeating cannot bind OnceCallback. Use BindOnce with std::move().");
return cef_internal::BindImpl<RepeatingCallback>(
std::forward<Functor>(functor), std::forward<Args>(args)...);
return internal::BindImpl<RepeatingCallback>(std::forward<Functor>(functor),
std::forward<Args>(args)...);
}
///
@@ -174,8 +175,8 @@ RepeatingCallback<Signature> BindRepeating(
/// to compile because Foo does not support the AddRef() and Release() methods.
///
template <typename T>
inline cef_internal::UnretainedWrapper<T> Unretained(T* o) {
return cef_internal::UnretainedWrapper<T>(o);
inline internal::UnretainedWrapper<T> Unretained(T* o) {
return internal::UnretainedWrapper<T>(o);
}
///
@@ -200,12 +201,12 @@ inline cef_internal::UnretainedWrapper<T> Unretained(T* o) {
/// </pre>
///
template <typename T>
inline cef_internal::RetainedRefWrapper<T> RetainedRef(T* o) {
return cef_internal::RetainedRefWrapper<T>(o);
inline internal::RetainedRefWrapper<T> RetainedRef(T* o) {
return internal::RetainedRefWrapper<T>(o);
}
template <typename T>
inline cef_internal::RetainedRefWrapper<T> RetainedRef(scoped_refptr<T> o) {
return cef_internal::RetainedRefWrapper<T>(std::move(o));
inline internal::RetainedRefWrapper<T> RetainedRef(scoped_refptr<T> o) {
return internal::RetainedRefWrapper<T>(std::move(o));
}
///
@@ -233,14 +234,14 @@ inline cef_internal::RetainedRefWrapper<T> RetainedRef(scoped_refptr<T> o) {
/// reference to the callback is deleted.
///
template <typename T>
inline cef_internal::OwnedWrapper<T> Owned(T* o) {
return cef_internal::OwnedWrapper<T>(o);
inline internal::OwnedWrapper<T> Owned(T* o) {
return internal::OwnedWrapper<T>(o);
}
template <typename T, typename Deleter>
inline cef_internal::OwnedWrapper<T, Deleter> Owned(
inline internal::OwnedWrapper<T, Deleter> Owned(
std::unique_ptr<T, Deleter>&& ptr) {
return cef_internal::OwnedWrapper<T, Deleter>(std::move(ptr));
return internal::OwnedWrapper<T, Deleter>(std::move(ptr));
}
///
@@ -276,8 +277,8 @@ inline cef_internal::OwnedWrapper<T, Deleter> Owned(
/// an object owned by the callback.
///
template <typename T>
cef_internal::OwnedRefWrapper<std::decay_t<T>> OwnedRef(T&& t) {
return cef_internal::OwnedRefWrapper<std::decay_t<T>>(std::forward<T>(t));
internal::OwnedRefWrapper<std::decay_t<T>> OwnedRef(T&& t) {
return internal::OwnedRefWrapper<std::decay_t<T>>(std::forward<T>(t));
}
///
@@ -328,12 +329,12 @@ cef_internal::OwnedRefWrapper<std::decay_t<T>> OwnedRef(T&& t) {
///
template <typename T,
std::enable_if_t<!std::is_lvalue_reference<T>::value>* = nullptr>
inline cef_internal::PassedWrapper<T> Passed(T&& scoper) {
return cef_internal::PassedWrapper<T>(std::move(scoper));
inline internal::PassedWrapper<T> Passed(T&& scoper) {
return internal::PassedWrapper<T>(std::move(scoper));
}
template <typename T>
inline cef_internal::PassedWrapper<T> Passed(T* scoper) {
return cef_internal::PassedWrapper<T>(std::move(*scoper));
inline internal::PassedWrapper<T> Passed(T* scoper) {
return internal::PassedWrapper<T>(std::move(*scoper));
}
///
@@ -356,8 +357,8 @@ inline cef_internal::PassedWrapper<T> Passed(T* scoper) {
/// </pre>
///
template <typename T>
inline cef_internal::IgnoreResultHelper<T> IgnoreResult(T data) {
return cef_internal::IgnoreResultHelper<T>(std::move(data));
inline internal::IgnoreResultHelper<T> IgnoreResult(T data) {
return internal::IgnoreResultHelper<T>(std::move(data));
}
#if defined(OS_APPLE) && !HAS_FEATURE(objc_arc)

View File

@@ -253,7 +253,7 @@
// The compiler thinks std::string::const_iterator and "const char*" are
// equivalent types.
#define STD_STRING_ITERATOR_IS_CHAR_POINTER
// The compiler thinks std::u16string::const_iterator and "char16_t*" are
// The compiler thinks std::u16string::const_iterator and "char16*" are
// equivalent types.
#define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER
#endif

View File

@@ -67,7 +67,7 @@
#if defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/functional/callback.h"
#include "base/callback.h"
#else // !USING_CHROMIUM_INCLUDES
// The following is substantially similar to the Chromium implementation.
// If the Chromium implementation diverges the below implementation should be
@@ -83,18 +83,18 @@
namespace base {
template <typename R, typename... Args>
class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
class OnceCallback<R(Args...)> : public internal::CallbackBase {
public:
using ResultType = R;
using RunType = R(Args...);
using PolymorphicInvoke = R (*)(cef_internal::BindStateBase*,
cef_internal::PassingType<Args>...);
using PolymorphicInvoke = R (*)(internal::BindStateBase*,
internal::PassingType<Args>...);
constexpr OnceCallback() = default;
OnceCallback(std::nullptr_t) = delete;
explicit OnceCallback(cef_internal::BindStateBase* bind_state)
: cef_internal::CallbackBase(bind_state) {}
explicit OnceCallback(internal::BindStateBase* bind_state)
: internal::CallbackBase(bind_state) {}
OnceCallback(const OnceCallback&) = delete;
OnceCallback& operator=(const OnceCallback&) = delete;
@@ -103,10 +103,10 @@ class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
OnceCallback& operator=(OnceCallback&&) noexcept = default;
OnceCallback(RepeatingCallback<RunType> other)
: cef_internal::CallbackBase(std::move(other)) {}
: internal::CallbackBase(std::move(other)) {}
OnceCallback& operator=(RepeatingCallback<RunType> other) {
static_cast<cef_internal::CallbackBase&>(*this) = std::move(other);
static_cast<internal::CallbackBase&>(*this) = std::move(other);
return *this;
}
@@ -142,7 +142,7 @@ class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
OnceCallback<ThenR(Args...)> Then(OnceCallback<ThenR(ThenArgs...)> then) && {
CHECK(then);
return BindOnce(
cef_internal::ThenHelper<
internal::ThenHelper<
OnceCallback, OnceCallback<ThenR(ThenArgs...)>>::CreateTrampoline(),
std::move(*this), std::move(then));
}
@@ -155,7 +155,7 @@ class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
RepeatingCallback<ThenR(ThenArgs...)> then) && {
CHECK(then);
return BindOnce(
cef_internal::ThenHelper<
internal::ThenHelper<
OnceCallback,
RepeatingCallback<ThenR(ThenArgs...)>>::CreateTrampoline(),
std::move(*this), std::move(then));
@@ -163,19 +163,18 @@ class OnceCallback<R(Args...)> : public cef_internal::CallbackBase {
};
template <typename R, typename... Args>
class RepeatingCallback<R(Args...)>
: public cef_internal::CallbackBaseCopyable {
class RepeatingCallback<R(Args...)> : public internal::CallbackBaseCopyable {
public:
using ResultType = R;
using RunType = R(Args...);
using PolymorphicInvoke = R (*)(cef_internal::BindStateBase*,
cef_internal::PassingType<Args>...);
using PolymorphicInvoke = R (*)(internal::BindStateBase*,
internal::PassingType<Args>...);
constexpr RepeatingCallback() = default;
RepeatingCallback(std::nullptr_t) = delete;
explicit RepeatingCallback(cef_internal::BindStateBase* bind_state)
: cef_internal::CallbackBaseCopyable(bind_state) {}
explicit RepeatingCallback(internal::BindStateBase* bind_state)
: internal::CallbackBaseCopyable(bind_state) {}
// Copyable and movable.
RepeatingCallback(const RepeatingCallback&) = default;
@@ -225,7 +224,7 @@ class RepeatingCallback<R(Args...)>
RepeatingCallback<ThenR(ThenArgs...)> then) const& {
CHECK(then);
return BindRepeating(
cef_internal::ThenHelper<
internal::ThenHelper<
RepeatingCallback,
RepeatingCallback<ThenR(ThenArgs...)>>::CreateTrampoline(),
*this, std::move(then));
@@ -236,7 +235,7 @@ class RepeatingCallback<R(Args...)>
RepeatingCallback<ThenR(ThenArgs...)> then) && {
CHECK(then);
return BindRepeating(
cef_internal::ThenHelper<
internal::ThenHelper<
RepeatingCallback,
RepeatingCallback<ThenR(ThenArgs...)>>::CreateTrampoline(),
std::move(*this), std::move(then));

View File

@@ -34,7 +34,7 @@
#if defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/functional/callback_forward.h"
#include "base/callback_forward.h"
#else // !USING_CHROMIUM_INCLUDES
// The following is substantially similar to the Chromium implementation.
// If the Chromium implementation diverges the below implementation should be

View File

@@ -39,7 +39,7 @@
#if defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/functional/callback_helpers.h"
#include "base/callback_helpers.h"
#else // !USING_CHROMIUM_INCLUDES
// The following is substantially similar to the Chromium implementation.
// If the Chromium implementation diverges the below implementation should be

View File

@@ -86,7 +86,7 @@
#if defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/functional/callback_list.h"
#include "base/callback_list.h"
#else // !USING_CHROMIUM_INCLUDES
// The following is substantially similar to the Chromium implementation.
// If the Chromium implementation diverges the below implementation should be
@@ -242,9 +242,8 @@ class CallbackListBase {
// the reentrant Notify() call.
template <typename... RunArgs>
void Notify(RunArgs&&... args) {
if (empty()) {
if (empty())
return; // Nothing to do.
}
{
AutoReset<bool> iterating(&iterating_, true);
@@ -258,20 +257,18 @@ class CallbackListBase {
});
};
for (auto it = next_valid(callbacks_.begin()); it != callbacks_.end();
it = next_valid(it)) {
it = next_valid(it))
// NOTE: Intentionally does not call std::forward<RunArgs>(args)...,
// since that would allow move-only arguments.
static_cast<CallbackListImpl*>(this)->RunCallback(it++, args...);
}
}
// Re-entrant invocations shouldn't prune anything from the list. This can
// invalidate iterators from underneath higher call frames. It's safe to
// simply do nothing, since the outermost frame will continue through here
// and prune all null callbacks below.
if (iterating_) {
if (iterating_)
return;
}
// Any null callbacks remaining in the list were canceled due to
// Subscription destruction during iteration, and can safely be erased now.
@@ -285,9 +282,8 @@ class CallbackListBase {
// that were executed above have all been removed regardless of whether
// they're counted in |erased_callbacks_|.
if (removal_callback_ &&
(erased_callbacks || IsOnceCallback<CallbackType>::value)) {
(erased_callbacks || IsOnceCallback<CallbackType>::value))
removal_callback_.Run(); // May delete |this|!
}
}
protected:
@@ -299,9 +295,8 @@ class CallbackListBase {
private:
// Cancels the callback pointed to by |it|, which is guaranteed to be valid.
void CancelCallback(const typename Callbacks::iterator& it) {
if (static_cast<CallbackListImpl*>(this)->CancelNullCallback(it)) {
if (static_cast<CallbackListImpl*>(this)->CancelNullCallback(it))
return;
}
if (iterating_) {
// Calling erase() here is unsafe, since the loop in Notify() may be
@@ -311,9 +306,8 @@ class CallbackListBase {
it->Reset();
} else {
callbacks_.erase(it);
if (removal_callback_) {
if (removal_callback_)
removal_callback_.Run(); // May delete |this|!
}
}
}

View File

@@ -133,9 +133,8 @@ class CancelableCallbackImpl {
// Returns a callback that can be disabled by calling Cancel().
CallbackType callback() const {
if (!callback_) {
if (!callback_)
return CallbackType();
}
CallbackType forwarder;
MakeForwarder(&forwarder);
return forwarder;

View File

@@ -251,6 +251,13 @@
#define HAS_FEATURE(FEATURE) 0
#endif
// Macro for telling -Wimplicit-fallthrough that a fallthrough is intentional.
#if defined(__clang__)
#define FALLTHROUGH [[clang::fallthrough]]
#else
#define FALLTHROUGH
#endif
#if defined(COMPILER_GCC)
#define PRETTY_FUNCTION __PRETTY_FUNCTION__
#elif defined(COMPILER_MSVC)

View File

@@ -723,13 +723,6 @@ std::ostream& operator<<(std::ostream& out, const wchar_t* wstr);
inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
return out << wstr.c_str();
}
#if defined(WCHAR_T_IS_UTF32)
std::ostream& operator<<(std::ostream& out, const char16_t* wstr);
#elif defined(WCHAR_T_IS_UTF16)
inline std::ostream& operator<<(std::ostream& out, const char16_t* wstr) {
return operator<<(out, reinterpret_cast<const wchar_t*>(wstr));
}
#endif
// The NOTIMPLEMENTED() macro annotates codepaths which have
// not been implemented yet.

View File

@@ -43,6 +43,7 @@
// If the Chromium implementation diverges the below implementation should be
// updated to match.
#include "include/base/cef_basictypes.h"
#include "include/base/cef_build.h"
#include "include/internal/cef_thread_internal.h"

View File

@@ -105,16 +105,13 @@ class RefCountedBase {
#if DCHECK_IS_ON()
DCHECK(!in_dtor_);
if (ref_count_ == 0) {
if (ref_count_ == 0)
in_dtor_ = true;
}
if (ref_count_ >= 1) {
if (ref_count_ >= 1)
DCHECK(CalledOnValidThread());
}
if (ref_count_ == 1) {
if (ref_count_ == 1)
thread_checker_.DetachFromThread();
}
#endif
return ref_count_ == 0;

View File

@@ -229,9 +229,8 @@ class TRIVIAL_ABI scoped_refptr {
// should move or copy construct from an existing scoped_refptr<T> to the
// ref-counted object.
scoped_refptr(T* p) : ptr_(p) {
if (ptr_) {
if (ptr_)
AddRef(ptr_);
}
}
// Copy constructor. This is required in addition to the copy conversion
@@ -262,9 +261,8 @@ class TRIVIAL_ABI scoped_refptr {
"It's unsafe to override the ref count preference."
" Please remove REQUIRE_ADOPTION_FOR_REFCOUNTED_TYPE"
" from subclasses.");
if (ptr_) {
if (ptr_)
Release(ptr_);
}
}
T* get() const { return ptr_; }

View File

@@ -97,24 +97,21 @@ class ScopedTypeRef {
element_type object = Traits::InvalidValue(),
base::scoped_policy::OwnershipPolicy policy = base::scoped_policy::ASSUME)
: object_(object) {
if (object_ && policy == base::scoped_policy::RETAIN) {
if (object_ && policy == base::scoped_policy::RETAIN)
object_ = Traits::Retain(object_);
}
}
ScopedTypeRef(const ScopedTypeRef<T, Traits>& that) : object_(that.object_) {
if (object_) {
if (object_)
object_ = Traits::Retain(object_);
}
}
// This allows passing an object to a function that takes its superclass.
template <typename R, typename RTraits>
explicit ScopedTypeRef(const ScopedTypeRef<R, RTraits>& that_as_subclass)
: object_(that_as_subclass.get()) {
if (object_) {
if (object_)
object_ = Traits::Retain(object_);
}
}
ScopedTypeRef(ScopedTypeRef<T, Traits>&& that) : object_(that.object_) {
@@ -122,9 +119,8 @@ class ScopedTypeRef {
}
~ScopedTypeRef() {
if (object_) {
if (object_)
Traits::Release(object_);
}
}
ScopedTypeRef& operator=(const ScopedTypeRef<T, Traits>& that) {
@@ -147,12 +143,10 @@ class ScopedTypeRef {
void reset(element_type object = Traits::InvalidValue(),
base::scoped_policy::OwnershipPolicy policy =
base::scoped_policy::ASSUME) {
if (object && policy == base::scoped_policy::RETAIN) {
if (object && policy == base::scoped_policy::RETAIN)
object = Traits::Retain(object);
}
if (object_) {
if (object_)
Traits::Release(object_);
}
object_ = object;
}

View File

@@ -73,12 +73,9 @@
namespace base {
template <class T>
struct is_non_const_reference : std::false_type {};
template <class T>
struct is_non_const_reference<T&> : std::true_type {};
template <class T>
struct is_non_const_reference<const T&> : std::false_type {};
template <class T> struct is_non_const_reference : std::false_type {};
template <class T> struct is_non_const_reference<T&> : std::true_type {};
template <class T> struct is_non_const_reference<const T&> : std::false_type {};
namespace internal {

View File

@@ -145,6 +145,14 @@
/// free(str); // Trace system now has dangling pointer
/// </pre>
///
/// To avoid this issue with the |name| and |arg_name| parameters, use the
/// TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime
/// overhead.
///
/// Notes: The category must always be in a long-lived char* (i.e. static
/// const). The |arg_values|, when used, are always deep copied with
/// the _COPY macros.
///
///
/// Thread Safety:
/// All macros are thread safe and can be used from any process.
@@ -171,15 +179,15 @@
/// - category and name strings must have application lifetime (statics or
/// literals). They may not include " chars.
///
#define TRACE_EVENT0(category, name) \
cef_trace_event_begin(category, name, NULL, 0, NULL, 0); \
#define TRACE_EVENT0(category, name) \
cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false); \
CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)
#define TRACE_EVENT1(category, name, arg1_name, arg1_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0); \
#define TRACE_EVENT1(category, name, arg1_name, arg1_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false); \
CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)
#define TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, arg2_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val); \
arg2_val, false); \
CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)
// Implementation detail: trace event macros create temporary variable names.
@@ -203,13 +211,21 @@
/// literals). They may not include " chars.
///
#define TRACE_EVENT_INSTANT0(category, name) \
cef_trace_event_instant(category, name, NULL, 0, NULL, 0)
cef_trace_event_instant(category, name, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \
cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0)
cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, false)
#define TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val) \
cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val)
arg2_val, false)
#define TRACE_EVENT_COPY_INSTANT0(category, name) \
cef_trace_event_instant(category, name, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \
cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, true)
#define TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, true)
///
/// Records a single BEGIN event called "name" immediately, with 0, 1 or 2
@@ -219,13 +235,21 @@
/// literals). They may not include " chars.
///
#define TRACE_EVENT_BEGIN0(category, name) \
cef_trace_event_begin(category, name, NULL, 0, NULL, 0)
cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0)
cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false)
#define TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val)
arg2_val, false)
#define TRACE_EVENT_COPY_BEGIN0(category, name) \
cef_trace_event_begin(category, name, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, true)
#define TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, true)
///
/// Records a single END event for "name" immediately. If the category
@@ -234,12 +258,21 @@
/// literals). They may not include " chars.
///
#define TRACE_EVENT_END0(category, name) \
cef_trace_event_end(category, name, NULL, 0, NULL, 0)
cef_trace_event_end(category, name, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \
cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0)
cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, false)
#define TRACE_EVENT_END2(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val) \
cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, arg2_val)
cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, false)
#define TRACE_EVENT_COPY_END0(category, name) \
cef_trace_event_end(category, name, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \
cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, true)
#define TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val) \
cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \
arg2_val, true)
///
/// Records the value of a counter called "name" immediately. Value
@@ -248,7 +281,9 @@
/// literals). They may not include " chars.
///
#define TRACE_COUNTER1(category, name, value) \
cef_trace_counter(category, name, NULL, value, NULL, 0)
cef_trace_counter(category, name, NULL, value, NULL, 0, false)
#define TRACE_COPY_COUNTER1(category, name, value) \
cef_trace_counter(category, name, NULL, value, NULL, 0, true)
///
/// Records the values of a multi-parted counter called "name" immediately.
@@ -260,7 +295,11 @@
#define TRACE_COUNTER2(category, name, value1_name, value1_val, value2_name, \
value2_val) \
cef_trace_counter(category, name, value1_name, value1_val, value2_name, \
value2_val)
value2_val, false)
#define TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \
value2_name, value2_val) \
cef_trace_counter(category, name, value1_name, value1_val, value2_name, \
value2_val, true)
///
/// Records the value of a counter called "name" immediately. Value
@@ -273,7 +312,9 @@
/// on two different processes will not collide.
///
#define TRACE_COUNTER_ID1(category, name, id, value) \
cef_trace_counter_id(category, name, id, NULL, value, NULL, 0)
cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, false)
#define TRACE_COPY_COUNTER_ID1(category, name, id, value) \
cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, true)
///
/// Records the values of a multi-parted counter called "name" immediately.
@@ -289,7 +330,11 @@
#define TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \
value2_name, value2_val) \
cef_trace_counter_id(category, name, id, value1_name, value1_val, \
value2_name, value2_val)
value2_name, value2_val, false)
#define TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, value1_val, \
value2_name, value2_val) \
cef_trace_counter_id(category, name, id, value1_name, value1_val, \
value2_name, value2_val, true)
///
/// Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2
@@ -310,13 +355,23 @@
/// args.
///
#define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \
cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0)
#define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, 0)
cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \
0, false)
#define TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val)
arg2_name, arg2_val, false)
#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \
cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \
0, true)
#define TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val, true)
///
/// Records a single ASYNC_STEP_INTO event for |step| immediately. If the
@@ -327,10 +382,17 @@
/// ASYNC_STEP_PAST events.
///
#define TRACE_EVENT_ASYNC_STEP_INTO0(category, name, id, step) \
cef_trace_event_async_step_into(category, name, id, step, NULL, 0)
cef_trace_event_async_step_into(category, name, id, step, NULL, 0, false)
#define TRACE_EVENT_ASYNC_STEP_INTO1(category, name, id, step, arg1_name, \
arg1_val) \
cef_trace_event_async_step_into(category, name, id, step, arg1_name, arg1_val)
cef_trace_event_async_step_into(category, name, id, step, arg1_name, \
arg1_val, false)
#define TRACE_EVENT_COPY_ASYNC_STEP_INTO0(category, name, id, step) \
cef_trace_event_async_step_into(category, name, id, step, NULL, 0, true)
#define TRACE_EVENT_COPY_ASYNC_STEP_INTO1(category, name, id, step, arg1_name, \
arg1_val) \
cef_trace_event_async_step_into(category, name, id, step, arg1_name, \
arg1_val, true)
///
/// Records a single ASYNC_STEP_PAST event for |step| immediately. If the
@@ -341,23 +403,40 @@
/// ASYNC_STEP_INTO events.
///
#define TRACE_EVENT_ASYNC_STEP_PAST0(category, name, id, step) \
cef_trace_event_async_step_past(category, name, id, step, NULL, 0)
cef_trace_event_async_step_past(category, name, id, step, NULL, 0, false)
#define TRACE_EVENT_ASYNC_STEP_PAST1(category, name, id, step, arg1_name, \
arg1_val) \
cef_trace_event_async_step_past(category, name, id, step, arg1_name, arg1_val)
cef_trace_event_async_step_past(category, name, id, step, arg1_name, \
arg1_val, false)
#define TRACE_EVENT_COPY_ASYNC_STEP_PAST0(category, name, id, step) \
cef_trace_event_async_step_past(category, name, id, step, NULL, 0, true)
#define TRACE_EVENT_COPY_ASYNC_STEP_PAST1(category, name, id, step, arg1_name, \
arg1_val) \
cef_trace_event_async_step_past(category, name, id, step, arg1_name, \
arg1_val, true)
///
/// Records a single ASYNC_END event for "name" immediately. If the category
/// is not enabled, then this does nothing.
///
#define TRACE_EVENT_ASYNC_END0(category, name, id) \
cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0)
#define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \
cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0)
cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \
cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \
false)
#define TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val)
arg2_name, arg2_val, false)
#define TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \
cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, arg1_val) \
cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \
true)
#define TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val) \
cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \
arg2_name, arg2_val, true)
namespace cef_trace_event {
@@ -369,7 +448,7 @@ class CefTraceEndOnScopeClose {
CefTraceEndOnScopeClose(const char* category, const char* name)
: category_(category), name_(name) {}
~CefTraceEndOnScopeClose() {
cef_trace_event_end(category_, name_, NULL, 0, NULL, 0);
cef_trace_event_end(category_, name_, NULL, 0, NULL, 0, false);
}
private:

View File

@@ -123,7 +123,7 @@ class SupportsWeakPtr;
template <typename T>
class WeakPtr;
namespace cef_internal {
namespace internal {
// These classes are part of the WeakPtr implementation.
// DO NOT USE THESE CLASSES DIRECTLY YOURSELF.
@@ -197,7 +197,7 @@ class WeakPtrBase {
WeakPtrBase& operator=(WeakPtrBase&& other) noexcept = default;
void reset() {
ref_ = cef_internal::WeakReference();
ref_ = internal::WeakReference();
ptr_ = 0;
}
@@ -225,7 +225,7 @@ class SupportsWeakPtrBase {
template <typename Derived>
static WeakPtr<Derived> StaticAsWeakPtr(Derived* t) {
static_assert(
std::is_base_of<cef_internal::SupportsWeakPtrBase, Derived>::value,
std::is_base_of<internal::SupportsWeakPtrBase, Derived>::value,
"AsWeakPtr argument must inherit from SupportsWeakPtr");
return AsWeakPtrImpl<Derived>(t);
}
@@ -242,7 +242,7 @@ class SupportsWeakPtrBase {
}
};
} // namespace cef_internal
} // namespace internal
template <typename T>
class WeakPtrFactory;
@@ -264,7 +264,7 @@ class WeakPtrFactory;
/// </pre>
///
template <typename T>
class WeakPtr : public cef_internal::WeakPtrBase {
class WeakPtr : public internal::WeakPtrBase {
public:
WeakPtr() = default;
WeakPtr(std::nullptr_t) {}
@@ -325,13 +325,13 @@ class WeakPtr : public cef_internal::WeakPtrBase {
bool WasInvalidated() const { return ptr_ && !ref_.IsValid(); }
private:
friend class cef_internal::SupportsWeakPtrBase;
friend class internal::SupportsWeakPtrBase;
template <typename U>
friend class WeakPtr;
friend class SupportsWeakPtr<T>;
friend class WeakPtrFactory<T>;
WeakPtr(const cef_internal::WeakReference& ref, T* ptr)
WeakPtr(const internal::WeakReference& ref, T* ptr)
: WeakPtrBase(ref, reinterpret_cast<uintptr_t>(ptr)) {}
};
@@ -355,15 +355,15 @@ bool operator==(std::nullptr_t, const WeakPtr<T>& weak_ptr) {
return weak_ptr == nullptr;
}
namespace cef_internal {
namespace internal {
class WeakPtrFactoryBase {
protected:
WeakPtrFactoryBase(uintptr_t ptr);
~WeakPtrFactoryBase();
cef_internal::WeakReferenceOwner weak_reference_owner_;
internal::WeakReferenceOwner weak_reference_owner_;
uintptr_t ptr_;
};
} // namespace cef_internal
} // namespace internal
///
/// A class may be composed of a WeakPtrFactory and thereby control how it
@@ -374,7 +374,7 @@ class WeakPtrFactoryBase {
/// bool.
///
template <class T>
class WeakPtrFactory : public cef_internal::WeakPtrFactoryBase {
class WeakPtrFactory : public internal::WeakPtrFactoryBase {
public:
WeakPtrFactory() = delete;
@@ -416,7 +416,7 @@ class WeakPtrFactory : public cef_internal::WeakPtrFactoryBase {
/// destroyed, its use can lead to subtle use-after-destroy issues.
///
template <class T>
class SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase {
class SupportsWeakPtr : public internal::SupportsWeakPtrBase {
public:
SupportsWeakPtr() = default;
@@ -431,7 +431,7 @@ class SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase {
~SupportsWeakPtr() = default;
private:
cef_internal::WeakReferenceOwner weak_reference_owner_;
internal::WeakReferenceOwner weak_reference_owner_;
};
///
@@ -459,7 +459,7 @@ class SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase {
///
template <typename Derived>
WeakPtr<Derived> AsWeakPtr(Derived* t) {
return cef_internal::SupportsWeakPtrBase::StaticAsWeakPtr<Derived>(t);
return internal::SupportsWeakPtrBase::StaticAsWeakPtr<Derived>(t);
}
} // namespace base

View File

@@ -97,7 +97,7 @@ struct BindUnwrapTraits;
template <typename Functor, typename BoundArgsTuple, typename SFINAE = void>
struct CallbackCancellationTraits;
namespace cef_internal {
namespace internal {
template <typename Functor, typename SFINAE = void>
struct FunctorTraits;
@@ -687,9 +687,8 @@ struct InvokeHelper<true, ReturnType> {
static inline void MakeItSo(Functor&& functor,
BoundWeakPtr&& weak_ptr,
RunArgs&&... args) {
if (!weak_ptr) {
if (!weak_ptr)
return;
}
using Traits = MakeFunctorTraits<Functor>;
Traits::Invoke(std::forward<Functor>(functor),
std::forward<BoundWeakPtr>(weak_ptr),
@@ -1260,7 +1259,7 @@ decltype(auto) BindImpl(Functor&& functor, Args&&... args) {
std::forward<Functor>(functor), std::forward<Args>(args)...));
}
} // namespace cef_internal
} // namespace internal
// An injection point to control |this| pointer behavior on a method invocation.
// If IsWeakReceiver<> is true_type for |T| and |T| is used for a receiver of a
@@ -1304,36 +1303,30 @@ struct BindUnwrapTraits {
};
template <typename T>
struct BindUnwrapTraits<cef_internal::UnretainedWrapper<T>> {
static T* Unwrap(const cef_internal::UnretainedWrapper<T>& o) {
return o.get();
}
struct BindUnwrapTraits<internal::UnretainedWrapper<T>> {
static T* Unwrap(const internal::UnretainedWrapper<T>& o) { return o.get(); }
};
template <typename T>
struct BindUnwrapTraits<cef_internal::RetainedRefWrapper<T>> {
static T* Unwrap(const cef_internal::RetainedRefWrapper<T>& o) {
return o.get();
}
struct BindUnwrapTraits<internal::RetainedRefWrapper<T>> {
static T* Unwrap(const internal::RetainedRefWrapper<T>& o) { return o.get(); }
};
template <typename T, typename Deleter>
struct BindUnwrapTraits<cef_internal::OwnedWrapper<T, Deleter>> {
static T* Unwrap(const cef_internal::OwnedWrapper<T, Deleter>& o) {
struct BindUnwrapTraits<internal::OwnedWrapper<T, Deleter>> {
static T* Unwrap(const internal::OwnedWrapper<T, Deleter>& o) {
return o.get();
}
};
template <typename T>
struct BindUnwrapTraits<cef_internal::OwnedRefWrapper<T>> {
static T& Unwrap(const cef_internal::OwnedRefWrapper<T>& o) {
return o.get();
}
struct BindUnwrapTraits<internal::OwnedRefWrapper<T>> {
static T& Unwrap(const internal::OwnedRefWrapper<T>& o) { return o.get(); }
};
template <typename T>
struct BindUnwrapTraits<cef_internal::PassedWrapper<T>> {
static T Unwrap(const cef_internal::PassedWrapper<T>& o) { return o.Take(); }
struct BindUnwrapTraits<internal::PassedWrapper<T>> {
static T Unwrap(const internal::PassedWrapper<T>& o) { return o.Take(); }
};
#if defined(OS_WIN)
@@ -1357,9 +1350,9 @@ template <typename Functor, typename... BoundArgs>
struct CallbackCancellationTraits<
Functor,
std::tuple<BoundArgs...>,
std::enable_if_t<cef_internal::IsWeakMethod<
cef_internal::FunctorTraits<Functor>::is_method,
BoundArgs...>::value>> {
std::enable_if_t<
internal::IsWeakMethod<internal::FunctorTraits<Functor>::is_method,
BoundArgs...>::value>> {
static constexpr bool is_cancellable = true;
template <typename Receiver, typename... Args>

View File

@@ -43,7 +43,7 @@ namespace base {
struct FakeBindState;
namespace cef_internal {
namespace internal {
class BindStateBase;
class FinallyExecutorCommon;
@@ -269,7 +269,7 @@ struct ThenHelper<OriginalCallback<OriginalR(OriginalArgs...)>,
}
};
} // namespace cef_internal
} // namespace internal
} // namespace base
#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_CALLBACK_INTERNAL_H_

View File

@@ -47,7 +47,7 @@ namespace base {
// This is a base internal implementation file used by task.h and callback.h.
// Not for public consumption, so we wrap it in namespace internal.
namespace cef_internal {
namespace internal {
template <typename T, typename = void>
struct IsRefCountedType : std::false_type {};
@@ -68,7 +68,7 @@ struct NeedsScopedRefptrButGetsRawPtr
"NeedsScopedRefptrButGetsRawPtr requires non-reference type.");
};
} // namespace cef_internal
} // namespace internal
} // namespace base

View File

@@ -38,14 +38,13 @@
#include "include/base/cef_scoped_typeref_mac.h"
#if defined(__has_feature) && __has_feature(objc_arc)
#error \
"Cannot include include/base/internal/cef_scoped_block_mac.h in file built with ARC."
#error "Cannot include include/base/internal/cef_scoped_block_mac.h in file built with ARC."
#endif
namespace base {
namespace mac {
namespace cef_internal {
namespace internal {
template <typename B>
struct ScopedBlockTraits {
@@ -54,12 +53,12 @@ struct ScopedBlockTraits {
static void Release(B block) { Block_release(block); }
};
} // namespace cef_internal
} // namespace internal
// ScopedBlock<> is patterned after ScopedCFTypeRef<>, but uses Block_copy() and
// Block_release() instead of CFRetain() and CFRelease().
template <typename B>
using ScopedBlock = ScopedTypeRef<B, cef_internal::ScopedBlockTraits<B>>;
using ScopedBlock = ScopedTypeRef<B, internal::ScopedBlockTraits<B>>;
} // namespace mac
} // namespace base

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=932c3ecb22fd26322d96d0e01459122aadafd302$
// $hash=936274d5539f225ff7adb7e0acba517fd9a8e2f8$
//
#ifndef CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_
@@ -93,7 +93,7 @@ typedef struct _cef_audio_handler_t {
struct _cef_browser_t* browser,
const float** data,
int frames,
int64_t pts);
int64 pts);
///
/// Called on the UI thread when the stream has stopped. OnAudioSteamStopped

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=683d7bff8da04826eee83c7e23cf9c5a701ae265$
// $hash=7254c050cd7db2ff7d40a1f54c99e941dc592692$
//
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
@@ -167,7 +167,7 @@ typedef struct _cef_browser_t {
///
struct _cef_frame_t*(CEF_CALLBACK* get_frame_byident)(
struct _cef_browser_t* self,
int64_t identifier);
int64 identifier);
///
/// Returns the frame with the specified name, or NULL if not found.
@@ -185,7 +185,7 @@ typedef struct _cef_browser_t {
///
void(CEF_CALLBACK* get_frame_identifiers)(struct _cef_browser_t* self,
size_t* identifiersCount,
int64_t* identifiers);
int64* identifiers);
///
/// Returns the names of all existing frames.
@@ -424,7 +424,7 @@ typedef struct _cef_browser_host_t {
struct _cef_browser_host_t* self,
const cef_string_t* image_url,
int is_favicon,
uint32_t max_image_size,
uint32 max_image_size,
int bypass_cache,
struct _cef_download_image_callback_t* callback);

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=a146316e075450f0a6f37cb45d14e15e0ac7be08$
// $hash=4ef8b73a5218531b370fdd76c23153a1f83b7f7b$
//
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
@@ -121,7 +121,7 @@ typedef struct _cef_browser_process_handler_t {
///
void(CEF_CALLBACK* on_schedule_message_pump_work)(
struct _cef_browser_process_handler_t* self,
int64_t delay_ms);
int64 delay_ms);
///
/// Return the default client for use with a newly created browser window. If

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=0cbb756a64d2aca1075480b5188b36cae533864d$
// $hash=46817ef557307a55a9b7138134c4f5c32562f2d7$
//
#ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_
@@ -71,46 +71,6 @@ typedef struct _cef_command_handler_t {
struct _cef_browser_t* browser,
int command_id,
cef_window_open_disposition_t disposition);
///
/// Called to check if a Chrome app menu item should be visible. Values for
/// |command_id| can be found in the cef_command_ids.h file. Only called for
/// menu items that would be visible by default. Only used with the Chrome
/// runtime.
///
int(CEF_CALLBACK* is_chrome_app_menu_item_visible)(
struct _cef_command_handler_t* self,
struct _cef_browser_t* browser,
int command_id);
///
/// Called to check if a Chrome app menu item should be enabled. Values for
/// |command_id| can be found in the cef_command_ids.h file. Only called for
/// menu items that would be enabled by default. Only used with the Chrome
/// runtime.
///
int(CEF_CALLBACK* is_chrome_app_menu_item_enabled)(
struct _cef_command_handler_t* self,
struct _cef_browser_t* browser,
int command_id);
///
/// Called during browser creation to check if a Chrome page action icon
/// should be visible. Only called for icons that would be visible by default.
/// Only used with the Chrome runtime.
///
int(CEF_CALLBACK* is_chrome_page_action_icon_visible)(
struct _cef_command_handler_t* self,
cef_chrome_page_action_icon_type_t icon_type);
///
/// Called during browser creation to check if a Chrome toolbar button should
/// be visible. Only called for buttons that would be visible by default. Only
/// used with the Chrome runtime.
///
int(CEF_CALLBACK* is_chrome_toolbar_button_visible)(
struct _cef_command_handler_t* self,
cef_chrome_toolbar_button_type_t button_type);
} cef_command_handler_t;
#ifdef __cplusplus

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=ac8fd3a7da20cff1fe2f20a75b045bf27c0312f2$
// $hash=1d0a15624fec8ca8bd1a5cdf7195b9b553dde44f$
//
#ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
@@ -159,14 +159,14 @@ typedef struct _cef_command_line_t {
cef_string_map_t switches);
///
/// Add a switch to the end of the command line.
/// Add a switch to the end of the command line. If the switch has no value
/// pass an NULL value string.
///
void(CEF_CALLBACK* append_switch)(struct _cef_command_line_t* self,
const cef_string_t* name);
///
/// Add a switch with the specified value to the end of the command line. If
/// the switch has no value pass an NULL value string.
/// Add a switch with the specified value to the end of the command line.
///
void(CEF_CALLBACK* append_switch_with_value)(struct _cef_command_line_t* self,
const cef_string_t* name,

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=22cfd717df9032a01214d9abfe3e0e51949b3319$
// $hash=5c6e0b9e37b8103a182f200fccdf5973104fcd70$
//
#ifndef CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
@@ -90,7 +90,7 @@ extern "C" {
/// 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 cef_settings_t.root_cache_path value will be used.
/// platforms the cef_settings_t.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

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=c4ecfde5d6791400c4b3fd466e7d3676d51cf8d8$
// $hash=332b9cb62b9c85573dc705aba4c9db3b34177e20$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_
@@ -72,25 +72,14 @@ typedef struct _cef_download_item_t {
int(CEF_CALLBACK* is_complete)(struct _cef_download_item_t* self);
///
/// Returns true (1) if the download has been canceled.
/// Returns true (1) if the download has been canceled or interrupted.
///
int(CEF_CALLBACK* is_canceled)(struct _cef_download_item_t* self);
///
/// Returns true (1) if the download has been interrupted.
///
int(CEF_CALLBACK* is_interrupted)(struct _cef_download_item_t* self);
///
/// Returns the most recent interrupt reason.
///
cef_download_interrupt_reason_t(CEF_CALLBACK* get_interrupt_reason)(
struct _cef_download_item_t* self);
///
/// Returns a simple speed estimate in bytes/s.
///
int64_t(CEF_CALLBACK* get_current_speed)(struct _cef_download_item_t* self);
int64(CEF_CALLBACK* get_current_speed)(struct _cef_download_item_t* self);
///
/// Returns the rough percent complete or -1 if the receive total size is
@@ -101,12 +90,12 @@ typedef struct _cef_download_item_t {
///
/// Returns the total number of bytes.
///
int64_t(CEF_CALLBACK* get_total_bytes)(struct _cef_download_item_t* self);
int64(CEF_CALLBACK* get_total_bytes)(struct _cef_download_item_t* self);
///
/// Returns the number of received bytes.
///
int64_t(CEF_CALLBACK* get_received_bytes)(struct _cef_download_item_t* self);
int64(CEF_CALLBACK* get_received_bytes)(struct _cef_download_item_t* self);
///
/// Returns the time that the download started.
@@ -129,7 +118,7 @@ typedef struct _cef_download_item_t {
///
/// Returns the unique identifier for this download.
///
uint32_t(CEF_CALLBACK* get_id)(struct _cef_download_item_t* self);
uint32(CEF_CALLBACK* get_id)(struct _cef_download_item_t* self);
///
/// Returns the URL.

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=1ad87e4addc2f05497671bc59dc7fd315e0603f3$
// $hash=b9b1308311999efcfd2aa678472f934ca783492c$
//
#ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
@@ -181,7 +181,7 @@ typedef struct _cef_frame_t {
/// Returns the globally unique identifier for this frame or < 0 if the
/// underlying frame does not yet exist.
///
int64_t(CEF_CALLBACK* get_identifier)(struct _cef_frame_t* self);
int64(CEF_CALLBACK* get_identifier)(struct _cef_frame_t* self);
///
/// Returns the parent of this frame or NULL if this is the main (top-level)
@@ -216,16 +216,24 @@ typedef struct _cef_frame_t {
///
/// Create a new URL request that will be treated as originating from this
/// frame and the associated browser. Use cef_urlrequest_t::Create instead if
/// you do not want the request to have this association, in which case it may
/// be handled differently (see documentation on that function). A request
/// created with this function may only originate from the browser process,
/// and will behave as follows:
/// - It may be intercepted by the client via CefResourceRequestHandler or
/// CefSchemeHandlerFactory.
/// frame and the associated browser. This request may be intercepted by the
/// client via cef_resource_request_handler_t or cef_scheme_handler_factory_t.
/// Use cef_urlrequest_t::Create instead if you do not want the request to
/// have this association, in which case it may be handled differently (see
/// documentation on that function). Requests may originate from both the
/// browser process and the render process.
///
/// For requests originating from the browser process:
/// - POST data may only contain a single element of type PDE_TYPE_FILE or
/// PDE_TYPE_BYTES.
///
/// For requests originating from the render process:
/// - POST data may only contain a single element of type PDE_TYPE_BYTES.
/// - If the response contains Content-Disposition or Mime-Type header
/// values that would not normally be rendered then the response may
/// receive special handling inside the browser (for example, via the
/// file download code path instead of the URL request code path).
///
/// The |request| object will be marked as read-only after calling this
/// function.
///

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=de4a9b856c6951231f446991a9b1efb89096ad3b$
// $hash=333350f8141cc925d16df2edc8c21a720a1008f0$
//
#ifndef CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_
@@ -257,6 +257,13 @@ typedef struct _cef_media_sink_t {
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t(CEF_CALLBACK* get_name)(struct _cef_media_sink_t* self);
///
/// Returns the description of this sink.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t(CEF_CALLBACK* get_description)(
struct _cef_media_sink_t* self);
///
/// Returns the icon type for this sink.
///

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=9330c709713a10c1e6b55278428e65c07f4c9dfb$
// $hash=b564dfe24017a0805e393854d12791a71c46c454$
//
#ifndef CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
@@ -70,7 +70,7 @@ extern "C" {
/// qualified |source_origin| URL (like http://www.example.com) will be allowed
/// access to all resources hosted on the specified |target_protocol| and
/// |target_domain|. If |target_domain| is non-NULL and
/// |allow_target_subdomains| is false (0) only exact domain matches will be
/// |allow_target_subdomains| if false (0) only exact domain matches will be
/// allowed. If |target_domain| contains a top- level domain component (like
/// "example.com") and |allow_target_subdomains| is true (1) sub-domain matches
/// will be allowed. If |target_domain| is NULL and |allow_target_subdomains| if

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=012d76416d19b590f29c013c44ceec1674593022$
// $hash=bc44eb70b7f0b48e0646825e919cb9996ac99781$
//
#ifndef CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_
@@ -66,7 +66,7 @@ typedef struct _cef_media_access_callback_t {
/// OnRequestMediaAccessPermission.
///
void(CEF_CALLBACK* cont)(struct _cef_media_access_callback_t* self,
uint32_t allowed_permissions);
uint32 allowed_permissions);
///
/// Cancel the media access request.
@@ -119,7 +119,7 @@ typedef struct _cef_permission_handler_t {
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
const cef_string_t* requesting_origin,
uint32_t requested_permissions,
uint32 requested_permissions,
struct _cef_media_access_callback_t* callback);
///
@@ -136,9 +136,9 @@ typedef struct _cef_permission_handler_t {
int(CEF_CALLBACK* on_show_permission_prompt)(
struct _cef_permission_handler_t* self,
struct _cef_browser_t* browser,
uint64_t prompt_id,
uint64 prompt_id,
const cef_string_t* requesting_origin,
uint32_t requested_permissions,
uint32 requested_permissions,
struct _cef_permission_prompt_callback_t* callback);
///
@@ -153,7 +153,7 @@ typedef struct _cef_permission_handler_t {
void(CEF_CALLBACK* on_dismiss_permission_prompt)(
struct _cef_permission_handler_t* self,
struct _cef_browser_t* browser,
uint64_t prompt_id,
uint64 prompt_id,
cef_permission_request_result_t result);
} cef_permission_handler_t;

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=241f8b8ba0a4555f8ad8ed1d60345ae83d4d62f4$
// $hash=3339290cad3a77c8b0b07d422f0faf902a047838$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
@@ -214,7 +214,7 @@ typedef struct _cef_request_t {
/// in the browser process to track a single request across multiple
/// callbacks.
///
uint64_t(CEF_CALLBACK* get_identifier)(struct _cef_request_t* self);
uint64(CEF_CALLBACK* get_identifier)(struct _cef_request_t* self);
} cef_request_t;
///

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=1c3c3dfb4bde6cd45278c6a80fbc53f624017c44$
// $hash=c2a6265e8e9acce475a8b5755a8c58b97b495207$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
@@ -46,7 +46,6 @@
#include "include/capi/cef_extension_handler_capi.h"
#include "include/capi/cef_media_router_capi.h"
#include "include/capi/cef_preference_capi.h"
#include "include/capi/cef_values_capi.h"
#ifdef __cplusplus
extern "C" {
@@ -302,72 +301,6 @@ typedef struct _cef_request_context_t {
struct _cef_media_router_t*(CEF_CALLBACK* get_media_router)(
struct _cef_request_context_t* self,
struct _cef_completion_callback_t* callback);
///
/// Returns the current value for |content_type| that applies for the
/// specified URLs. If both URLs are NULL the default value will be returned.
/// Returns nullptr if no value is configured. Must be called on the browser
/// process UI thread.
///
struct _cef_value_t*(CEF_CALLBACK* get_website_setting)(
struct _cef_request_context_t* self,
const cef_string_t* requesting_url,
const cef_string_t* top_level_url,
cef_content_setting_types_t content_type);
///
/// Sets the current value for |content_type| for the specified URLs in the
/// default scope. If both URLs are NULL, and the context is not incognito,
/// the default value will be set. Pass nullptr for |value| to remove the
/// default value for this content type.
///
/// WARNING: Incorrect usage of this function may cause instability or
/// security issues in Chromium. Make sure that you first understand the
/// potential impact of any changes to |content_type| by reviewing the related
/// source code in Chromium. For example, if you plan to modify
/// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
/// ContentSettingsType::POPUPS in Chromium:
/// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
///
void(CEF_CALLBACK* set_website_setting)(
struct _cef_request_context_t* self,
const cef_string_t* requesting_url,
const cef_string_t* top_level_url,
cef_content_setting_types_t content_type,
struct _cef_value_t* value);
///
/// Returns the current value for |content_type| that applies for the
/// specified URLs. If both URLs are NULL the default value will be returned.
/// Returns CEF_CONTENT_SETTING_VALUE_DEFAULT if no value is configured. Must
/// be called on the browser process UI thread.
///
cef_content_setting_values_t(CEF_CALLBACK* get_content_setting)(
struct _cef_request_context_t* self,
const cef_string_t* requesting_url,
const cef_string_t* top_level_url,
cef_content_setting_types_t content_type);
///
/// Sets the current value for |content_type| for the specified URLs in the
/// default scope. If both URLs are NULL, and the context is not incognito,
/// the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for
/// |value| to use the default value for this content type.
///
/// WARNING: Incorrect usage of this function may cause instability or
/// security issues in Chromium. Make sure that you first understand the
/// potential impact of any changes to |content_type| by reviewing the related
/// source code in Chromium. For example, if you plan to modify
/// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
/// ContentSettingsType::POPUPS in Chromium:
/// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
///
void(CEF_CALLBACK* set_content_setting)(
struct _cef_request_context_t* self,
const cef_string_t* requesting_url,
const cef_string_t* top_level_url,
cef_content_setting_types_t content_type,
cef_content_setting_values_t value);
} cef_request_context_t;
///

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=ca5c224b373452158904b0f859f126f36c927f93$
// $hash=93e5c4f5e93f56b63b5944208300669dcecba972$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_
@@ -67,7 +67,7 @@ typedef struct _cef_resource_skip_callback_t {
/// 0 the request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE.
///
void(CEF_CALLBACK* cont)(struct _cef_resource_skip_callback_t* self,
int64_t bytes_skipped);
int64 bytes_skipped);
} cef_resource_skip_callback_t;
///
@@ -146,7 +146,7 @@ typedef struct _cef_resource_handler_t {
///
void(CEF_CALLBACK* get_response_headers)(struct _cef_resource_handler_t* self,
struct _cef_response_t* response,
int64_t* response_length,
int64* response_length,
cef_string_t* redirectUrl);
///
@@ -159,8 +159,8 @@ typedef struct _cef_resource_handler_t {
/// function will be called in sequence but not from a dedicated thread.
///
int(CEF_CALLBACK* skip)(struct _cef_resource_handler_t* self,
int64_t bytes_to_skip,
int64_t* bytes_skipped,
int64 bytes_to_skip,
int64* bytes_skipped,
struct _cef_resource_skip_callback_t* callback);
///

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=757155e6dbceef47938fd562f7f5f48a609ce288$
// $hash=70d6b393cbdc96a75864911d7ca3568cc8dcdebf$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_REQUEST_HANDLER_CAPI_H_
@@ -188,7 +188,7 @@ typedef struct _cef_resource_request_handler_t {
struct _cef_request_t* request,
struct _cef_response_t* response,
cef_urlrequest_status_t status,
int64_t received_content_length);
int64 received_content_length);
///
/// Called on the IO thread to handle requests for URLs with an unknown

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=d0563a0850f6118c850ab01c553142d2e890703e$
// $hash=64e9ebc0e01acca0333ca3419e379d4053892270$
//
#ifndef CEF_INCLUDE_CAPI_CEF_SERVER_CAPI_H_
@@ -153,7 +153,7 @@ typedef struct _cef_server_t {
int connection_id,
int response_code,
const cef_string_t* content_type,
int64_t content_length,
int64 content_length,
cef_string_multimap_t extra_headers);
///
@@ -203,7 +203,7 @@ typedef struct _cef_server_t {
/// server lifespan.
///
CEF_EXPORT void cef_server_create(const cef_string_t* address,
uint16_t port,
uint16 port,
int backlog,
struct _cef_server_handler_t* handler);

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=5632e62f83aac60e62db9d7f308563fed3285c65$
// $hash=bbb4153d5d7325ac9a410d7f85a8d47eadcfaf6e$
//
#ifndef CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
@@ -70,13 +70,13 @@ typedef struct _cef_read_handler_t {
/// failure.
///
int(CEF_CALLBACK* seek)(struct _cef_read_handler_t* self,
int64_t offset,
int64 offset,
int whence);
///
/// Return the current offset position.
///
int64_t(CEF_CALLBACK* tell)(struct _cef_read_handler_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_read_handler_t* self);
///
/// Return non-zero if at end of file.
@@ -115,13 +115,13 @@ typedef struct _cef_stream_reader_t {
/// failure.
///
int(CEF_CALLBACK* seek)(struct _cef_stream_reader_t* self,
int64_t offset,
int64 offset,
int whence);
///
/// Return the current offset position.
///
int64_t(CEF_CALLBACK* tell)(struct _cef_stream_reader_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_stream_reader_t* self);
///
/// Return non-zero if at end of file.
@@ -178,13 +178,13 @@ typedef struct _cef_write_handler_t {
/// failure.
///
int(CEF_CALLBACK* seek)(struct _cef_write_handler_t* self,
int64_t offset,
int64 offset,
int whence);
///
/// Return the current offset position.
///
int64_t(CEF_CALLBACK* tell)(struct _cef_write_handler_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_write_handler_t* self);
///
/// Flush the stream.
@@ -223,13 +223,13 @@ typedef struct _cef_stream_writer_t {
/// failure.
///
int(CEF_CALLBACK* seek)(struct _cef_stream_writer_t* self,
int64_t offset,
int64 offset,
int whence);
///
/// Return the current offset position.
///
int64_t(CEF_CALLBACK* tell)(struct _cef_stream_writer_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_stream_writer_t* self);
///
/// Flush the stream.

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=fc609ce5aa3bc51e5cef1f9174dbfc5cff0a0689$
// $hash=273a6abfd4ac030701be00c45811c19e74e128bd$
//
#ifndef CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
@@ -114,7 +114,7 @@ typedef struct _cef_task_runner_t {
///
int(CEF_CALLBACK* post_delayed_task)(struct _cef_task_runner_t* self,
struct _cef_task_t* task,
int64_t delay_ms);
int64 delay_ms);
} cef_task_runner_t;
///
@@ -149,7 +149,7 @@ CEF_EXPORT int cef_post_task(cef_thread_id_t threadId, cef_task_t* task);
///
CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId,
cef_task_t* task,
int64_t delay_ms);
int64 delay_ms);
#ifdef __cplusplus
}

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=28e2d2d86dffdfdad0f275a444656a0638b44d0e$
// $hash=8d275bd73854b2b8d5a7a5bc55fa737e020705ee$
//
#ifndef CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_
@@ -109,7 +109,7 @@ CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file,
/// high-res time. Can be used by clients to synchronize with the time
/// information in trace events.
///
CEF_EXPORT int64_t cef_now_from_system_trace_time(void);
CEF_EXPORT int64 cef_now_from_system_trace_time(void);
#ifdef __cplusplus
}

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=b038ad859f1dad2d8ba63589da118898350b309c$
// $hash=91c121d4353a80d7fff3ef582c5a56ac86e0a34c$
//
#ifndef CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_
@@ -158,8 +158,8 @@ typedef struct _cef_urlrequest_client_t {
///
void(CEF_CALLBACK* on_upload_progress)(struct _cef_urlrequest_client_t* self,
struct _cef_urlrequest_t* request,
int64_t current,
int64_t total);
int64 current,
int64 total);
///
/// Notifies the client of download progress. |current| denotes the number of
@@ -169,8 +169,8 @@ typedef struct _cef_urlrequest_client_t {
void(CEF_CALLBACK* on_download_progress)(
struct _cef_urlrequest_client_t* self,
struct _cef_urlrequest_t* request,
int64_t current,
int64_t total);
int64 current,
int64 total);
///
/// Called when some part of the response is read. |data| contains the current

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=42de7c0e6f5ec529d9182fe4cbf2c1edfacd7392$
// $hash=0d787ac7676ba90d3a1fe68d5e2494b985b1db0e$
//
#ifndef CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
@@ -474,12 +474,12 @@ typedef struct _cef_v8value_t {
///
/// Return an int value.
///
int32_t(CEF_CALLBACK* get_int_value)(struct _cef_v8value_t* self);
int32(CEF_CALLBACK* get_int_value)(struct _cef_v8value_t* self);
///
/// Return an unsigned int value.
///
uint32_t(CEF_CALLBACK* get_uint_value)(struct _cef_v8value_t* self);
uint32(CEF_CALLBACK* get_uint_value)(struct _cef_v8value_t* self);
///
/// Return a double value.
@@ -764,12 +764,12 @@ CEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value);
///
/// Create a new cef_v8value_t object of type int.
///
CEF_EXPORT cef_v8value_t* cef_v8value_create_int(int32_t value);
CEF_EXPORT cef_v8value_t* cef_v8value_create_int(int32 value);
///
/// Create a new cef_v8value_t object of type unsigned int.
///
CEF_EXPORT cef_v8value_t* cef_v8value_create_uint(uint32_t value);
CEF_EXPORT cef_v8value_t* cef_v8value_create_uint(uint32 value);
///
/// Create a new cef_v8value_t object of type double.

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=be3741396459ccf1337f319965ba1dc509142536$
// $hash=683d592a2405ada0a9c46c004f003d640a3298ad$
//
#ifndef CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
@@ -96,7 +96,7 @@ typedef struct _cef_waitable_event_t {
/// called on the browser process UI or IO threads.
///
int(CEF_CALLBACK* timed_wait)(struct _cef_waitable_event_t* self,
int64_t max_ms);
int64 max_ms);
} cef_waitable_event_t;
///

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=a4b62b20f30552fef5d522bdd00ebf9a8f12464c$
// $hash=7a541729b4ac664b22cdea625f19f1dba1b6a685$
//
#ifndef CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_
@@ -93,6 +93,13 @@ typedef struct _cef_x509cert_principal_t {
cef_string_userfree_t(CEF_CALLBACK* get_country_name)(
struct _cef_x509cert_principal_t* self);
///
/// Retrieve the list of street addresses.
///
void(CEF_CALLBACK* get_street_addresses)(
struct _cef_x509cert_principal_t* self,
cef_string_list_t addresses);
///
/// Retrieve the list of organization names.
///
@@ -106,6 +113,13 @@ typedef struct _cef_x509cert_principal_t {
void(CEF_CALLBACK* get_organization_unit_names)(
struct _cef_x509cert_principal_t* self,
cef_string_list_t names);
///
/// Retrieve the list of domain components.
///
void(CEF_CALLBACK* get_domain_components)(
struct _cef_x509cert_principal_t* self,
cef_string_list_t components);
} cef_x509cert_principal_t;
///

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=d082d724164cb0b1da12d49b080c599934f08b9d$
// $hash=83debac545c04a630270665b391f52b15484b5d3$
//
#ifndef CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
@@ -95,7 +95,7 @@ typedef struct _cef_zip_reader_t {
///
/// Returns the uncompressed size of the file.
///
int64_t(CEF_CALLBACK* get_file_size)(struct _cef_zip_reader_t* self);
int64(CEF_CALLBACK* get_file_size)(struct _cef_zip_reader_t* self);
///
/// Returns the last modified timestamp for the file.
@@ -126,7 +126,7 @@ typedef struct _cef_zip_reader_t {
///
/// Returns the current offset in the uncompressed file contents.
///
int64_t(CEF_CALLBACK* tell)(struct _cef_zip_reader_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_zip_reader_t* self);
///
/// Returns true (1) if at end of the file contents.

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=f5731d0fffb953f1269b63b478a89bb6b842ac94$
// $hash=df532eb91caf9de44b077abdf00620dd2508402b$
//
#ifndef CEF_INCLUDE_CAPI_TEST_CEF_TEST_SERVER_CAPI_H_
@@ -104,7 +104,7 @@ typedef struct _cef_test_server_t {
/// started. The server will continue running until Stop is called.
///
CEF_EXPORT cef_test_server_t* cef_test_server_create_and_start(
uint16_t port,
uint16 port,
int https_server,
cef_test_cert_type_t https_cert_type,
struct _cef_test_server_handler_t* handler);

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=94e93810316b74e54eb315d97c6fc6f1cc0c9cc5$
// $hash=e38c41a553d518abcd1b912d32281e99b93c4fd7$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_
@@ -120,18 +120,6 @@ typedef struct _cef_browser_view_delegate_t {
///
cef_chrome_toolbar_type_t(CEF_CALLBACK* get_chrome_toolbar_type)(
struct _cef_browser_view_delegate_t* self);
///
/// Called when |browser_view| receives a gesture command. Return true (1) to
/// handle (or disable) a |gesture_command| or false (0) to propagate the
/// gesture to the browser for default handling. This function will only be
/// called with the Alloy runtime. To handle these commands with the Chrome
/// runtime implement cef_command_handler_t::OnChromeCommand instead.
///
int(CEF_CALLBACK* on_gesture_command)(
struct _cef_browser_view_delegate_t* self,
struct _cef_browser_view_t* browser_view,
cef_gesture_command_t gesture_command);
} cef_browser_view_delegate_t;
#ifdef __cplusplus

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=2e9acfffaf1dbc70f0c76fcf58a5190326b131ba$
// $hash=7674d3af52dd4272b454b2028e7a4ee72fb3c9ff$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_
@@ -63,7 +63,7 @@ typedef struct _cef_display_t {
///
/// Returns the unique identifier for this Display.
///
int64_t(CEF_CALLBACK* get_id)(struct _cef_display_t* self);
int64(CEF_CALLBACK* get_id)(struct _cef_display_t* self);
///
/// Returns this Display's device pixel scale factor. This specifies how much

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=d53c4a0a7e731a56a0edcb9d705c76b0a2770155$
// $hash=04aa6e193cc5d5658c0ef28a42c0777c0a955409$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_
@@ -51,8 +51,6 @@
extern "C" {
#endif
struct _cef_browser_view_t;
///
/// A Window is a top-level Window/widget in the Views hierarchy. By default it
/// will have a non-client area with title bar, icon and buttons that supports
@@ -71,21 +69,6 @@ typedef struct _cef_window_t {
///
void(CEF_CALLBACK* show)(struct _cef_window_t* self);
///
/// Show the Window as a browser modal dialog relative to |browser_view|. A
/// parent Window must be returned via
/// cef_window_delegate_t::get_parent_window() and |browser_view| must belong
/// to that parent Window. While this Window is visible, |browser_view| will
/// be disabled while other controls in the parent Window remain enabled.
/// Navigating or destroying the |browser_view| will close this Window
/// automatically. Alternately, use show() and return true (1) from
/// cef_window_delegate_t::is_window_modal_dialog() for a window modal dialog
/// where all controls in the parent Window are disabled.
///
void(CEF_CALLBACK* show_as_browser_modal_dialog)(
struct _cef_window_t* self,
struct _cef_browser_view_t* browser_view);
///
/// Hide the Window.
///
@@ -303,7 +286,7 @@ typedef struct _cef_window_t {
///
void(CEF_CALLBACK* send_key_press)(struct _cef_window_t* self,
int key_code,
uint32_t event_flags);
uint32 event_flags);
///
/// Simulate a mouse move. The mouse cursor will be moved to the specified

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=61099a1ba8b16a5e46f5a80d326d1f9bfc99317d$
// $hash=019abf16be4e151d31181a6bdcb1ad8dfef03d00$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_
@@ -110,18 +110,6 @@ typedef struct _cef_window_delegate_t {
int* is_menu,
int* can_activate_menu);
///
/// Return true (1) if |window| should be created as a window modal dialog.
/// Only called when a Window is returned via get_parent_window() with
/// |is_menu| set to false (0). All controls in the parent Window will be
/// disabled while |window| is visible. This functionality is not supported by
/// all Linux window managers. Alternately, use
/// cef_window_t::show_as_browser_modal_dialog() for a browser modal dialog
/// that works on all platforms.
///
int(CEF_CALLBACK* is_window_modal_dialog)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
/// Return the initial bounds for |window| in density independent pixel (DIP)
/// coordinates. If this function returns an NULL CefRect then
@@ -149,25 +137,6 @@ typedef struct _cef_window_delegate_t {
int(CEF_CALLBACK* is_frameless)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
/// Return true (1) if |window| should be created with standard window buttons
/// like close, minimize and zoom. This function is only supported on macOS.
///
int(CEF_CALLBACK* with_standard_window_buttons)(
struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
/// Return whether the titlebar height should be overridden, and sets the
/// height of the titlebar in |titlebar_height|. On macOS, it can also be used
/// to adjust the vertical position of the traffic light buttons in frameless
/// windows. The buttons will be positioned halfway down the titlebar at a
/// height of |titlebar_height| / 2.
///
int(CEF_CALLBACK* get_titlebar_height)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window,
float* titlebar_height);
///
/// Return true (1) if |window| can be resized.
///
@@ -210,17 +179,6 @@ typedef struct _cef_window_delegate_t {
int(CEF_CALLBACK* on_key_event)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window,
const cef_key_event_t* event);
///
/// Called when the |window| is transitioning to or from fullscreen mode. The
/// transition occurs in two stages, with |is_competed| set to false (0) when
/// the transition starts and true (1) when the transition completes. This
/// function is only supported on macOS.
///
void(CEF_CALLBACK* on_window_fullscreen_transition)(
struct _cef_window_delegate_t* self,
struct _cef_window_t* window,
int is_completed);
} cef_window_delegate_t;
#ifdef __cplusplus

View File

@@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "9c9fbc9d59a544c8e0c2f0cbed4b6622f2786f1c"
#define CEF_API_HASH_UNIVERSAL "80dc2ef26a1ac3a35c798a01adc88240759ac85a"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "240e06747f2ea2d7d4a3071042d45cf80d170420"
#define CEF_API_HASH_PLATFORM "c3f39d68cb97e87872a59a42c9255460ef4d7170"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "cd4a815153a919ad30b95c659688b564823d92fc"
#define CEF_API_HASH_PLATFORM "589830b49e03e9f4ae2c050125bcdafacbb248dd"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "4c372cb13e3446b2a54aaaea51b0d47ba7766152"
#define CEF_API_HASH_PLATFORM "e3e836b304098732708acf972e82fb6fcb2516a7"
#endif
#ifdef __cplusplus

View File

@@ -45,6 +45,9 @@
// Use the existing CrAppProtocol definition.
#import "base/message_loop/message_pump_mac.h"
// Use the existing UnderlayableSurface definition.
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
// Use the existing empty protocol definitions.
#import "base/mac/cocoa_protocols.h"
@@ -67,6 +70,13 @@
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent;
@end
// Copy of definition from ui/base/cocoa/underlay_opengl_hosting_window.h.
// Common base class for windows that host a OpenGL surface that renders under
// the window. Contains methods relating to hole punching so that the OpenGL
// surface is visible through the window.
@interface UnderlayOpenGLHostingWindow : NSWindow
@end
#endif // USING_CHROMIUM_INCLUDES
// All CEF client applications must subclass NSApplication and implement this

View File

@@ -87,7 +87,7 @@ class CefAudioHandler : public virtual CefBaseRefCounted {
virtual void OnAudioStreamPacket(CefRefPtr<CefBrowser> browser,
const float** data,
int frames,
int64_t pts) = 0;
int64 pts) = 0;
///
/// Called on the UI thread when the stream has stopped. OnAudioSteamStopped

View File

@@ -124,26 +124,22 @@ class CefRefCount {
/// Macro that provides a reference counting implementation for classes
/// extending CefBase.
///
#define IMPLEMENT_REFCOUNTING(ClassName) \
public: \
void AddRef() const override { \
ref_count_.AddRef(); \
} \
bool Release() const override { \
if (ref_count_.Release()) { \
delete static_cast<const ClassName*>(this); \
return true; \
} \
return false; \
} \
bool HasOneRef() const override { \
return ref_count_.HasOneRef(); \
} \
bool HasAtLeastOneRef() const override { \
return ref_count_.HasAtLeastOneRef(); \
} \
\
private: \
#define IMPLEMENT_REFCOUNTING(ClassName) \
public: \
void AddRef() const override { ref_count_.AddRef(); } \
bool Release() const override { \
if (ref_count_.Release()) { \
delete static_cast<const ClassName*>(this); \
return true; \
} \
return false; \
} \
bool HasOneRef() const override { return ref_count_.HasOneRef(); } \
bool HasAtLeastOneRef() const override { \
return ref_count_.HasAtLeastOneRef(); \
} \
\
private: \
CefRefCount ref_count_
#endif // CEF_INCLUDE_CEF_BASE_H_

View File

@@ -170,7 +170,7 @@ class CefBrowser : public virtual CefBaseRefCounted {
/// Returns the frame with the specified identifier, or NULL if not found.
///
/*--cef(capi_name=get_frame_byident)--*/
virtual CefRefPtr<CefFrame> GetFrame(int64_t identifier) = 0;
virtual CefRefPtr<CefFrame> GetFrame(int64 identifier) = 0;
///
/// Returns the frame with the specified name, or NULL if not found.
@@ -188,7 +188,7 @@ class CefBrowser : public virtual CefBaseRefCounted {
/// Returns the identifiers of all existing frames.
///
/*--cef(count_func=identifiers:GetFrameCount)--*/
virtual void GetFrameIdentifiers(std::vector<int64_t>& identifiers) = 0;
virtual void GetFrameIdentifiers(std::vector<int64>& identifiers) = 0;
///
/// Returns the names of all existing frames.
@@ -456,7 +456,7 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual void DownloadImage(const CefString& image_url,
bool is_favicon,
uint32_t max_image_size,
uint32 max_image_size,
bool bypass_cache,
CefRefPtr<CefDownloadImageCallback> callback) = 0;

View File

@@ -111,7 +111,7 @@ class CefBrowserProcessHandler : public virtual CefBaseRefCounted {
/// pending scheduled call should be cancelled.
///
/*--cef()--*/
virtual void OnScheduleMessagePumpWork(int64_t delay_ms) {}
virtual void OnScheduleMessagePumpWork(int64 delay_ms) {}
///
/// Return the default client for use with a newly created browser window. If

View File

@@ -63,52 +63,6 @@ class CefCommandHandler : public virtual CefBaseRefCounted {
cef_window_open_disposition_t disposition) {
return false;
}
///
/// Called to check if a Chrome app menu item should be visible. Values for
/// |command_id| can be found in the cef_command_ids.h file. Only called for
/// menu items that would be visible by default. Only used with the Chrome
/// runtime.
///
/*--cef()--*/
virtual bool IsChromeAppMenuItemVisible(CefRefPtr<CefBrowser> browser,
int command_id) {
return true;
}
///
/// Called to check if a Chrome app menu item should be enabled. Values for
/// |command_id| can be found in the cef_command_ids.h file. Only called for
/// menu items that would be enabled by default. Only used with the Chrome
/// runtime.
///
/*--cef()--*/
virtual bool IsChromeAppMenuItemEnabled(CefRefPtr<CefBrowser> browser,
int command_id) {
return true;
}
///
/// Called during browser creation to check if a Chrome page action icon
/// should be visible. Only called for icons that would be visible by default.
/// Only used with the Chrome runtime.
///
/*--cef(optional_param=browser)--*/
virtual bool IsChromePageActionIconVisible(
cef_chrome_page_action_icon_type_t icon_type) {
return true;
}
///
/// Called during browser creation to check if a Chrome toolbar button
/// should be visible. Only called for buttons that would be visible by
/// default. Only used with the Chrome runtime.
///
/*--cef(optional_param=browser)--*/
virtual bool IsChromeToolbarButtonVisible(
cef_chrome_toolbar_button_type_t button_type) {
return true;
}
};
#endif // CEF_INCLUDE_CEF_COMMAND_HANDLER_H_

View File

@@ -168,14 +168,14 @@ class CefCommandLine : public virtual CefBaseRefCounted {
virtual void GetSwitches(SwitchMap& switches) = 0;
///
/// Add a switch to the end of the command line.
/// Add a switch to the end of the command line. If the switch has no value
/// pass an empty value string.
///
/*--cef()--*/
virtual void AppendSwitch(const CefString& name) = 0;
///
/// Add a switch with the specified value to the end of the command line. If
/// the switch has no value pass an empty value string.
/// Add a switch with the specified value to the end of the command line.
///
/*--cef()--*/
virtual void AppendSwitchWithValue(const CefString& name,

View File

@@ -82,7 +82,7 @@
/// 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 cef_settings_t.root_cache_path value will be used.
/// platforms the cef_settings_t.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

View File

@@ -66,28 +66,16 @@ class CefDownloadItem : public virtual CefBaseRefCounted {
virtual bool IsComplete() = 0;
///
/// Returns true if the download has been canceled.
/// Returns true if the download has been canceled or interrupted.
///
/*--cef()--*/
virtual bool IsCanceled() = 0;
///
/// Returns true if the download has been interrupted.
///
/*--cef()--*/
virtual bool IsInterrupted() = 0;
///
/// Returns the most recent interrupt reason.
///
/*--cef(default_retval=CEF_DOWNLOAD_INTERRUPT_REASON_NONE)--*/
virtual cef_download_interrupt_reason_t GetInterruptReason() = 0;
///
/// Returns a simple speed estimate in bytes/s.
///
/*--cef()--*/
virtual int64_t GetCurrentSpeed() = 0;
virtual int64 GetCurrentSpeed() = 0;
///
/// Returns the rough percent complete or -1 if the receive total size is
@@ -100,13 +88,13 @@ class CefDownloadItem : public virtual CefBaseRefCounted {
/// Returns the total number of bytes.
///
/*--cef()--*/
virtual int64_t GetTotalBytes() = 0;
virtual int64 GetTotalBytes() = 0;
///
/// Returns the number of received bytes.
///
/*--cef()--*/
virtual int64_t GetReceivedBytes() = 0;
virtual int64 GetReceivedBytes() = 0;
///
/// Returns the time that the download started.
@@ -130,7 +118,7 @@ class CefDownloadItem : public virtual CefBaseRefCounted {
/// Returns the unique identifier for this download.
///
/*--cef()--*/
virtual uint32_t GetId() = 0;
virtual uint32 GetId() = 0;
///
/// Returns the URL.

View File

@@ -184,7 +184,7 @@ class CefFrame : public virtual CefBaseRefCounted {
/// underlying frame does not yet exist.
///
/*--cef()--*/
virtual int64_t GetIdentifier() = 0;
virtual int64 GetIdentifier() = 0;
///
/// Returns the parent of this frame or NULL if this is the main (top-level)
@@ -221,16 +221,24 @@ class CefFrame : public virtual CefBaseRefCounted {
///
/// Create a new URL request that will be treated as originating from this
/// frame and the associated browser. Use CefURLRequest::Create instead if you
/// do not want the request to have this association, in which case it may be
/// handled differently (see documentation on that method). A request created
/// with this method may only originate from the browser process, and will
/// behave as follows:
/// - It may be intercepted by the client via CefResourceRequestHandler or
/// CefSchemeHandlerFactory.
/// frame and the associated browser. This request may be intercepted by the
/// client via CefResourceRequestHandler or CefSchemeHandlerFactory. Use
/// CefURLRequest::Create instead if you do not want the request to have this
/// association, in which case it may be handled differently (see
/// documentation on that method). Requests may originate from both the
/// browser process and the render process.
///
/// For requests originating from the browser process:
/// - POST data may only contain a single element of type PDE_TYPE_FILE or
/// PDE_TYPE_BYTES.
///
/// For requests originating from the render process:
/// - POST data may only contain a single element of type PDE_TYPE_BYTES.
/// - If the response contains Content-Disposition or Mime-Type header
/// values that would not normally be rendered then the response may
/// receive special handling inside the browser (for example, via the
/// file download code path instead of the URL request code path).
///
/// The |request| object will be marked as read-only after calling this
/// method.
///

View File

@@ -239,6 +239,12 @@ class CefMediaSink : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual CefString GetName() = 0;
///
/// Returns the description of this sink.
///
/*--cef()--*/
virtual CefString GetDescription() = 0;
///
/// Returns the icon type for this sink.
///

View File

@@ -63,7 +63,7 @@
/// the same-origin policy. Scripts hosted underneath the fully qualified
/// |source_origin| URL (like http://www.example.com) will be allowed access to
/// all resources hosted on the specified |target_protocol| and |target_domain|.
/// If |target_domain| is non-empty and |allow_target_subdomains| is false only
/// If |target_domain| is non-empty and |allow_target_subdomains| if false only
/// exact domain matches will be allowed. If |target_domain| contains a top-
/// level domain component (like "example.com") and |allow_target_subdomains| is
/// true sub-domain matches will be allowed. If |target_domain| is empty and

View File

@@ -57,7 +57,7 @@ class CefMediaAccessCallback : public virtual CefBaseRefCounted {
/// OnRequestMediaAccessPermission.
///
/*--cef(capi_name=cont)--*/
virtual void Continue(uint32_t allowed_permissions) = 0;
virtual void Continue(uint32 allowed_permissions) = 0;
///
/// Cancel the media access request.
@@ -104,7 +104,7 @@ class CefPermissionHandler : public virtual CefBaseRefCounted {
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& requesting_origin,
uint32_t requested_permissions,
uint32 requested_permissions,
CefRefPtr<CefMediaAccessCallback> callback) {
return false;
}
@@ -123,9 +123,9 @@ class CefPermissionHandler : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual bool OnShowPermissionPrompt(
CefRefPtr<CefBrowser> browser,
uint64_t prompt_id,
uint64 prompt_id,
const CefString& requesting_origin,
uint32_t requested_permissions,
uint32 requested_permissions,
CefRefPtr<CefPermissionPromptCallback> callback) {
return false;
}
@@ -142,7 +142,7 @@ class CefPermissionHandler : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual void OnDismissPermissionPrompt(
CefRefPtr<CefBrowser> browser,
uint64_t prompt_id,
uint64 prompt_id,
cef_permission_request_result_t result) {}
};

View File

@@ -217,7 +217,7 @@ class CefRequest : public virtual CefBaseRefCounted {
/// browser process to track a single request across multiple callbacks.
///
/*--cef()--*/
virtual uint64_t GetIdentifier() = 0;
virtual uint64 GetIdentifier() = 0;
};
///

View File

@@ -46,7 +46,6 @@
#include "include/cef_extension_handler.h"
#include "include/cef_media_router.h"
#include "include/cef_preference.h"
#include "include/cef_values.h"
class CefRequestContextHandler;
class CefSchemeHandlerFactory;
@@ -315,72 +314,6 @@ class CefRequestContext : public CefPreferenceManager {
/*--cef(optional_param=callback)--*/
virtual CefRefPtr<CefMediaRouter> GetMediaRouter(
CefRefPtr<CefCompletionCallback> callback) = 0;
///
/// Returns the current value for |content_type| that applies for the
/// specified URLs. If both URLs are empty the default value will be returned.
/// Returns nullptr if no value is configured. Must be called on the browser
/// process UI thread.
///
/*--cef(optional_param=requesting_url,optional_param=top_level_url)--*/
virtual CefRefPtr<CefValue> GetWebsiteSetting(
const CefString& requesting_url,
const CefString& top_level_url,
cef_content_setting_types_t content_type) = 0;
///
/// Sets the current value for |content_type| for the specified URLs in the
/// default scope. If both URLs are empty, and the context is not incognito,
/// the default value will be set. Pass nullptr for |value| to remove the
/// default value for this content type.
///
/// WARNING: Incorrect usage of this method may cause instability or security
/// issues in Chromium. Make sure that you first understand the potential
/// impact of any changes to |content_type| by reviewing the related source
/// code in Chromium. For example, if you plan to modify
/// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
/// ContentSettingsType::POPUPS in Chromium:
/// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
///
/*--cef(optional_param=requesting_url,optional_param=top_level_url,
optional_param=value)--*/
virtual void SetWebsiteSetting(const CefString& requesting_url,
const CefString& top_level_url,
cef_content_setting_types_t content_type,
CefRefPtr<CefValue> value) = 0;
///
/// Returns the current value for |content_type| that applies for the
/// specified URLs. If both URLs are empty the default value will be returned.
/// Returns CEF_CONTENT_SETTING_VALUE_DEFAULT if no value is configured. Must
/// be called on the browser process UI thread.
///
/*--cef(optional_param=requesting_url,optional_param=top_level_url,
default_retval=CEF_CONTENT_SETTING_VALUE_DEFAULT)--*/
virtual cef_content_setting_values_t GetContentSetting(
const CefString& requesting_url,
const CefString& top_level_url,
cef_content_setting_types_t content_type) = 0;
///
/// Sets the current value for |content_type| for the specified URLs in the
/// default scope. If both URLs are empty, and the context is not incognito,
/// the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for
/// |value| to use the default value for this content type.
///
/// WARNING: Incorrect usage of this method may cause instability or security
/// issues in Chromium. Make sure that you first understand the potential
/// impact of any changes to |content_type| by reviewing the related source
/// code in Chromium. For example, if you plan to modify
/// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
/// ContentSettingsType::POPUPS in Chromium:
/// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
///
/*--cef(optional_param=requesting_url,optional_param=top_level_url)--*/
virtual void SetContentSetting(const CefString& requesting_url,
const CefString& top_level_url,
cef_content_setting_types_t content_type,
cef_content_setting_values_t value) = 0;
};
#endif // CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_

View File

@@ -58,7 +58,7 @@ class CefResourceSkipCallback : public virtual CefBaseRefCounted {
/// <= 0 the request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE.
///
/*--cef(capi_name=cont)--*/
virtual void Continue(int64_t bytes_skipped) = 0;
virtual void Continue(int64 bytes_skipped) = 0;
};
///
@@ -136,7 +136,7 @@ class CefResourceHandler : public virtual CefBaseRefCounted {
///
/*--cef()--*/
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,
int64_t& response_length,
int64& response_length,
CefString& redirectUrl) = 0;
///
@@ -149,8 +149,8 @@ class CefResourceHandler : public virtual CefBaseRefCounted {
/// method will be called in sequence but not from a dedicated thread.
///
/*--cef()--*/
virtual bool Skip(int64_t bytes_to_skip,
int64_t& bytes_skipped,
virtual bool Skip(int64 bytes_to_skip,
int64& bytes_skipped,
CefRefPtr<CefResourceSkipCallback> callback) {
bytes_skipped = -2;
return false;

View File

@@ -187,7 +187,7 @@ class CefResourceRequestHandler : public virtual CefBaseRefCounted {
CefRefPtr<CefRequest> request,
CefRefPtr<CefResponse> response,
URLRequestStatus status,
int64_t received_content_length) {}
int64 received_content_length) {}
///
/// Called on the IO thread to handle requests for URLs with an unknown

View File

@@ -74,7 +74,7 @@ class CefServer : public CefBaseRefCounted {
///
/*--cef()--*/
static void CreateServer(const CefString& address,
uint16_t port,
uint16 port,
int backlog,
CefRefPtr<CefServerHandler> handler);
@@ -170,7 +170,7 @@ class CefServer : public CefBaseRefCounted {
virtual void SendHttpResponse(int connection_id,
int response_code,
const CefString& content_type,
int64_t content_length,
int64 content_length,
const HeaderMap& extra_headers) = 0;
///

View File

@@ -58,13 +58,13 @@ class CefReadHandler : public virtual CefBaseRefCounted {
/// failure.
///
/*--cef()--*/
virtual int Seek(int64_t offset, int whence) = 0;
virtual int Seek(int64 offset, int whence) = 0;
///
/// Return the current offset position.
///
/*--cef()--*/
virtual int64_t Tell() = 0;
virtual int64 Tell() = 0;
///
/// Return non-zero if at end of file.
@@ -119,13 +119,13 @@ class CefStreamReader : public virtual CefBaseRefCounted {
/// failure.
///
/*--cef()--*/
virtual int Seek(int64_t offset, int whence) = 0;
virtual int Seek(int64 offset, int whence) = 0;
///
/// Return the current offset position.
///
/*--cef()--*/
virtual int64_t Tell() = 0;
virtual int64 Tell() = 0;
///
/// Return non-zero if at end of file.
@@ -161,13 +161,13 @@ class CefWriteHandler : public virtual CefBaseRefCounted {
/// failure.
///
/*--cef()--*/
virtual int Seek(int64_t offset, int whence) = 0;
virtual int Seek(int64 offset, int whence) = 0;
///
/// Return the current offset position.
///
/*--cef()--*/
virtual int64_t Tell() = 0;
virtual int64 Tell() = 0;
///
/// Flush the stream.
@@ -215,13 +215,13 @@ class CefStreamWriter : public virtual CefBaseRefCounted {
/// failure.
///
/*--cef()--*/
virtual int Seek(int64_t offset, int whence) = 0;
virtual int Seek(int64 offset, int whence) = 0;
///
/// Return the current offset position.
///
/*--cef()--*/
virtual int64_t Tell() = 0;
virtual int64 Tell() = 0;
///
/// Flush the stream.

View File

@@ -118,7 +118,7 @@ class CefTaskRunner : public virtual CefBaseRefCounted {
/// specified delay.
///
/*--cef()--*/
virtual bool PostDelayedTask(CefRefPtr<CefTask> task, int64_t delay_ms) = 0;
virtual bool PostDelayedTask(CefRefPtr<CefTask> task, int64 delay_ms) = 0;
};
///
@@ -143,6 +143,6 @@ bool CefPostTask(CefThreadId threadId, CefRefPtr<CefTask> task);
/*--cef()--*/
bool CefPostDelayedTask(CefThreadId threadId,
CefRefPtr<CefTask> task,
int64_t delay_ms);
int64 delay_ms);
#endif // CEF_INCLUDE_CEF_TASK_H_

View File

@@ -106,6 +106,6 @@ bool CefEndTracing(const CefString& tracing_file,
/// information in trace events.
///
/*--cef()--*/
int64_t CefNowFromSystemTraceTime();
int64 CefNowFromSystemTraceTime();
#endif // CEF_INCLUDE_CEF_TRACE_H_

View File

@@ -152,8 +152,8 @@ class CefURLRequestClient : public virtual CefBaseRefCounted {
///
/*--cef()--*/
virtual void OnUploadProgress(CefRefPtr<CefURLRequest> request,
int64_t current,
int64_t total) = 0;
int64 current,
int64 total) = 0;
///
/// Notifies the client of download progress. |current| denotes the number of
@@ -162,8 +162,8 @@ class CefURLRequestClient : public virtual CefBaseRefCounted {
///
/*--cef()--*/
virtual void OnDownloadProgress(CefRefPtr<CefURLRequest> request,
int64_t current,
int64_t total) = 0;
int64 current,
int64 total) = 0;
///
/// Called when some part of the response is read. |data| contains the current

View File

@@ -459,13 +459,13 @@ class CefV8Value : public virtual CefBaseRefCounted {
/// Create a new CefV8Value object of type int.
///
/*--cef()--*/
static CefRefPtr<CefV8Value> CreateInt(int32_t value);
static CefRefPtr<CefV8Value> CreateInt(int32 value);
///
/// Create a new CefV8Value object of type unsigned int.
///
/*--cef()--*/
static CefRefPtr<CefV8Value> CreateUInt(uint32_t value);
static CefRefPtr<CefV8Value> CreateUInt(uint32 value);
///
/// Create a new CefV8Value object of type double.
@@ -648,13 +648,13 @@ class CefV8Value : public virtual CefBaseRefCounted {
/// Return an int value.
///
/*--cef()--*/
virtual int32_t GetIntValue() = 0;
virtual int32 GetIntValue() = 0;
///
/// Return an unsigned int value.
///
/*--cef()--*/
virtual uint32_t GetUIntValue() = 0;
virtual uint32 GetUIntValue() = 0;
///
/// Return a double value.

View File

@@ -103,7 +103,7 @@ class CefWaitableEvent : public CefBaseRefCounted {
/// called on the browser process UI or IO threads.
///
/*--cef()--*/
virtual bool TimedWait(int64_t max_ms) = 0;
virtual bool TimedWait(int64 max_ms) = 0;
};
#endif // CEF_INCLUDE_CEF_WAITABLE_EVENT_H_

View File

@@ -81,6 +81,12 @@ class CefX509CertPrincipal : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual CefString GetCountryName() = 0;
///
/// Retrieve the list of street addresses.
///
/*--cef()--*/
virtual void GetStreetAddresses(std::vector<CefString>& addresses) = 0;
///
/// Retrieve the list of organization names.
///
@@ -92,6 +98,12 @@ class CefX509CertPrincipal : public virtual CefBaseRefCounted {
///
/*--cef()--*/
virtual void GetOrganizationUnitNames(std::vector<CefString>& names) = 0;
///
/// Retrieve the list of domain components.
///
/*--cef()--*/
virtual void GetDomainComponents(std::vector<CefString>& components) = 0;
};
///

View File

@@ -96,7 +96,7 @@ class CefZipReader : public virtual CefBaseRefCounted {
/// Returns the uncompressed size of the file.
///
/*--cef()--*/
virtual int64_t GetFileSize() = 0;
virtual int64 GetFileSize() = 0;
///
/// Returns the last modified timestamp for the file.
@@ -128,7 +128,7 @@ class CefZipReader : public virtual CefBaseRefCounted {
/// Returns the current offset in the uncompressed file contents.
///
/*--cef()--*/
virtual int64_t Tell() = 0;
virtual int64 Tell() = 0;
///
/// Returns true if at end of the file contents.

View File

@@ -86,6 +86,13 @@ CEF_EXPORT int cef_run_main_with_preferred_stack_size(mainPtr main,
char* argv[]);
#endif // defined(ARCH_CPU_32_BITS)
///
/// Call during process startup to enable High-DPI support on Windows 7 or
/// newer. Older versions of Windows should be left DPI-unaware because they do
/// not support DirectWrite and GDI fonts are kerned very badly.
///
CEF_EXPORT void cef_enable_highdpi_support(void);
///
/// Set to true (1) before calling Windows APIs like TrackPopupMenu that enter a
/// modal message loop. Set to false (0) after exiting the modal message loop.

View File

@@ -74,7 +74,7 @@ typedef cef_string_userfree_utf8_t cef_string_userfree_t;
#define cef_string_to_wide cef_string_utf8_to_wide
#define cef_string_from_wide cef_string_wide_to_utf8
#elif defined(CEF_STRING_TYPE_UTF16)
typedef char16_t cef_char_t;
typedef char16 cef_char_t;
typedef cef_string_userfree_utf16_t cef_string_userfree_t;
typedef cef_string_utf16_t cef_string_t;
#define cef_string_set cef_string_utf16_set

View File

@@ -41,7 +41,7 @@ extern "C" {
///
/// CEF string maps are a set of key/value string pairs.
///
typedef struct _cef_string_list_t* cef_string_list_t;
typedef void* cef_string_list_t;
///
/// Allocate a new string map.

View File

@@ -41,7 +41,7 @@ extern "C" {
///
/// CEF string maps are a set of key/value string pairs.
///
typedef struct _cef_string_map_t* cef_string_map_t;
typedef void* cef_string_map_t;
///
/// Allocate a new string map.
@@ -75,8 +75,7 @@ CEF_EXPORT int cef_string_map_value(cef_string_map_t map,
cef_string_t* value);
///
/// Append a new key/value pair at the end of the string map. If the key exists,
/// overwrite the existing value with a new value w/o changing the pair order.
/// Append a new key/value pair at the end of the string map.
///
CEF_EXPORT int cef_string_map_append(cef_string_map_t map,
const cef_string_t* key,

View File

@@ -42,7 +42,7 @@ extern "C" {
/// CEF string multimaps are a set of key/value string pairs.
/// More than one value can be assigned to a single key.
///
typedef struct _cef_string_multimap_t* cef_string_multimap_t;
typedef void* cef_string_multimap_t;
///
/// Allocate a new string multimap.

View File

@@ -33,18 +33,7 @@
#include <stddef.h>
#ifdef __clang__
// On macOS, <uchar.h> is only available with Xcode 14.3+.
#if __has_include(<uchar.h>)
#include <uchar.h>
#elif !defined(__cplusplus)
#include <stdint.h>
typedef uint_least16_t char16_t;
#endif
#else
#include <uchar.h>
#endif
#include "include/base/cef_basictypes.h"
#include "include/internal/cef_export.h"
///
@@ -81,9 +70,9 @@ typedef struct _cef_string_utf8_t {
} cef_string_utf8_t;
typedef struct _cef_string_utf16_t {
char16_t* str;
char16* str;
size_t length;
void (*dtor)(char16_t* str);
void (*dtor)(char16* str);
} cef_string_utf16_t;
///
@@ -100,7 +89,7 @@ CEF_EXPORT int cef_string_utf8_set(const char* src,
size_t src_len,
cef_string_utf8_t* output,
int copy);
CEF_EXPORT int cef_string_utf16_set(const char16_t* src,
CEF_EXPORT int cef_string_utf16_set(const char16* src,
size_t src_len,
cef_string_utf16_t* output,
int copy);
@@ -152,14 +141,14 @@ CEF_EXPORT int cef_string_utf8_to_wide(const char* src,
CEF_EXPORT int cef_string_wide_to_utf16(const wchar_t* src,
size_t src_len,
cef_string_utf16_t* output);
CEF_EXPORT int cef_string_utf16_to_wide(const char16_t* src,
CEF_EXPORT int cef_string_utf16_to_wide(const char16* src,
size_t src_len,
cef_string_wide_t* output);
CEF_EXPORT int cef_string_utf8_to_utf16(const char* src,
size_t src_len,
cef_string_utf16_t* output);
CEF_EXPORT int cef_string_utf16_to_utf8(const char16_t* src,
CEF_EXPORT int cef_string_utf16_to_utf8(const char16* src,
size_t src_len,
cef_string_utf8_t* output);
@@ -209,10 +198,10 @@ CEF_EXPORT void cef_string_userfree_utf16_free(cef_string_userfree_utf16_t str);
/// may change the length of the string in some cases.
///
CEF_EXPORT int cef_string_utf16_to_lower(const char16_t* src,
CEF_EXPORT int cef_string_utf16_to_lower(const char16* src,
size_t src_len,
cef_string_utf16_t* output);
CEF_EXPORT int cef_string_utf16_to_upper(const char16_t* src,
CEF_EXPORT int cef_string_utf16_to_upper(const char16* src,
size_t src_len,
cef_string_utf16_t* output);

View File

@@ -74,9 +74,8 @@ struct CefStringTraitsWide {
memset(&cstr, 0, sizeof(cstr));
cef_string_wide_to_utf8(s->str, s->length, &cstr);
std::string str;
if (cstr.length > 0) {
if (cstr.length > 0)
str = std::string(cstr.str, cstr.length);
}
cef_string_utf8_clear(&cstr);
return str;
}
@@ -115,7 +114,7 @@ struct CefStringTraitsWide {
static inline bool from_string16(const std::u16string::value_type* data,
size_t length,
struct_type* s) {
return cef_string_utf16_to_wide(reinterpret_cast<const char16_t*>(data),
return cef_string_utf16_to_wide(reinterpret_cast<const char16*>(data),
length, s)
? true
: false;
@@ -184,9 +183,8 @@ struct CefStringTraitsUTF8 {
memset(&cstr, 0, sizeof(cstr));
cef_string_utf8_to_wide(s->str, s->length, &cstr);
std::wstring str;
if (cstr.length > 0) {
if (cstr.length > 0)
str = std::wstring(cstr.str, cstr.length);
}
cef_string_wide_clear(&cstr);
return str;
}
@@ -213,7 +211,7 @@ struct CefStringTraitsUTF8 {
static inline bool from_string16(const std::u16string::value_type* data,
size_t length,
struct_type* s) {
return cef_string_utf16_to_utf8(reinterpret_cast<const char16_t*>(data),
return cef_string_utf16_to_utf8(reinterpret_cast<const char16*>(data),
length, s)
? true
: false;
@@ -227,7 +225,7 @@ struct CefStringTraitsUTF8 {
/// Traits implementation for utf16 character strings.
///
struct CefStringTraitsUTF16 {
typedef char16_t char_type;
typedef char16 char_type;
typedef cef_string_utf16_t struct_type;
typedef cef_string_userfree_utf16_t userfree_struct_type;
@@ -257,9 +255,8 @@ struct CefStringTraitsUTF16 {
memset(&cstr, 0, sizeof(cstr));
cef_string_utf16_to_utf8(s->str, s->length, &cstr);
std::string str;
if (cstr.length > 0) {
if (cstr.length > 0)
str = std::string(cstr.str, cstr.length);
}
cef_string_utf8_clear(&cstr);
return str;
}
@@ -277,9 +274,8 @@ struct CefStringTraitsUTF16 {
memset(&cstr, 0, sizeof(cstr));
cef_string_utf16_to_wide(s->str, s->length, &cstr);
std::wstring str;
if (cstr.length > 0) {
if (cstr.length > 0)
str = std::wstring(cstr.str, cstr.length);
}
cef_string_wide_clear(&cstr);
return str;
}
@@ -290,15 +286,12 @@ struct CefStringTraitsUTF16 {
}
#else // WCHAR_T_IS_UTF32
static inline std::wstring to_wstring(const struct_type* s) {
return std::wstring(reinterpret_cast<wchar_t*>(s->str), s->length);
return std::wstring(s->str, s->length);
}
static inline bool from_wstring(const std::wstring::value_type* data,
size_t length,
struct_type* s) {
return cef_string_utf16_set(reinterpret_cast<const char16_t*>(data), length,
s, true)
? true
: false;
return cef_string_utf16_set(data, length, s, true) ? true : false;
}
#endif // WCHAR_T_IS_UTF32
static inline bool from_wstring(const std::wstring& str, struct_type* s) {
@@ -311,7 +304,7 @@ struct CefStringTraitsUTF16 {
static inline bool from_string16(const std::u16string::value_type* data,
size_t length,
struct_type* s) {
return cef_string_utf16_set(reinterpret_cast<const char16_t*>(data), length,
return cef_string_utf16_set(reinterpret_cast<const char16*>(data), length,
s, true)
? true
: false;
@@ -381,9 +374,8 @@ class CefStringBase {
}
CefStringBase(const char* src, size_t length = 0)
: string_(NULL), owner_(false) {
if (src) {
if (src)
FromString(src, length);
}
}
///
@@ -396,9 +388,8 @@ class CefStringBase {
}
CefStringBase(const wchar_t* src, size_t length = 0)
: string_(NULL), owner_(false) {
if (src) {
if (src)
FromWString(src, length);
}
}
///
@@ -411,10 +402,18 @@ class CefStringBase {
}
CefStringBase(const std::u16string::value_type* src, size_t length = 0)
: string_(NULL), owner_(false) {
if (src) {
if (src)
FromString16(src, length);
}
#if defined(WCHAR_T_IS_UTF32)
CefStringBase(const char16* src, size_t length = 0)
: string_(NULL), owner_(false) {
if (src) {
FromString16(reinterpret_cast<const std::u16string::value_type*>(src),
length);
}
}
#endif // WCHAR_T_IS_UTF32
///
/// Create a new string from an existing character array. If |copy| is true
@@ -424,9 +423,8 @@ class CefStringBase {
///
CefStringBase(const char_type* src, size_t src_len, bool copy)
: string_(NULL), owner_(false) {
if (src && src_len > 0) {
if (src && src_len > 0)
FromString(src, src_len, copy);
}
}
///
@@ -435,9 +433,8 @@ class CefStringBase {
/// this class and will not be freed by this class.
///
CefStringBase(const struct_type* src) : string_(NULL), owner_(false) {
if (!src) {
if (!src)
return;
}
// Reference the existing structure without taking ownership.
Attach(const_cast<struct_type*>(src), false);
}
@@ -471,15 +468,12 @@ class CefStringBase {
/// Compare this string to the specified string.
///
int compare(const CefStringBase& str) const {
if (empty() && str.empty()) {
if (empty() && str.empty())
return 0;
}
if (empty()) {
if (empty())
return -1;
}
if (str.empty()) {
if (str.empty())
return 1;
}
return traits::compare(string_, str.GetStruct());
}
@@ -487,9 +481,8 @@ class CefStringBase {
/// Clear the string data.
///
void clear() {
if (string_) {
if (string_)
traits::clear(string_);
}
}
///
@@ -531,9 +524,8 @@ class CefStringBase {
/// will be freed if this class owns the structure.
///
void ClearAndFree() {
if (!string_) {
if (!string_)
return;
}
if (owner_) {
clear();
delete string_;
@@ -563,9 +555,8 @@ class CefStringBase {
// Free the previous structure and data, if any.
ClearAndFree();
if (!str) {
if (!str)
return;
}
AllocIfNeeded();
owner_ = true;
@@ -592,9 +583,8 @@ class CefStringBase {
/// this string class currently contains no data.
///
userfree_struct_type DetachToUserFree() {
if (empty()) {
if (empty())
return NULL;
}
userfree_struct_type str = traits::userfree_alloc();
if (owner_) {
@@ -647,9 +637,8 @@ class CefStringBase {
/// necessary based on the underlying string type.
///
std::string ToString() const {
if (empty()) {
if (empty())
return std::string();
}
return traits::to_string(string_);
}
@@ -689,9 +678,8 @@ class CefStringBase {
/// necessary based on the underlying string type.
///
std::wstring ToWString() const {
if (empty()) {
if (empty())
return std::wstring();
}
return traits::to_wstring(string_);
}
@@ -731,9 +719,8 @@ class CefStringBase {
/// necessary based on the underlying string type.
///
std::u16string ToString16() const {
if (empty()) {
if (empty())
return std::u16string();
}
return traits::to_string16(string_);
}
@@ -820,6 +807,12 @@ class CefStringBase {
FromString16(str);
return *this;
}
#if defined(WCHAR_T_IS_UTF32)
CefStringBase& operator=(const char16* str) {
FromString16(reinterpret_cast<const std::u16string::value_type*>(str));
return *this;
}
#endif // WCHAR_T_IS_UTF32
#if defined(USING_CHROMIUM_INCLUDES)
// The base::FilePath constructor is marked as explicit so provide the
// conversion here for convenience.

View File

@@ -35,9 +35,8 @@
extern "C" {
#endif
#include <stdint.h>
#include <time.h>
#include "include/base/cef_basictypes.h"
#include "include/internal/cef_export.h"
///
@@ -48,7 +47,7 @@ extern "C" {
/// This is equivalent of Chromium `base::Time` (see base/time/time.h).
///
typedef struct _cef_basetime_t {
int64_t val;
int64 val;
} cef_basetime_t;
///
@@ -123,7 +122,7 @@ CEF_EXPORT int cef_time_now(cef_time_t* cef_time);
///
/// Retrieve the current system time.
///
CEF_EXPORT cef_basetime_t cef_basetime_now(void);
CEF_EXPORT cef_basetime_t cef_basetime_now();
///
/// Retrieve the delta in milliseconds between two time values. Returns true (1)

View File

@@ -45,66 +45,77 @@ extern "C" {
// may not include "(quotes) chars.
// - |argX_name|, |argX_val|, |valueX_name|, |valeX_val| are optional parameters
// and represent pairs of name and values of arguments
// - |copy| is used to avoid memory scoping issues with the |name| and
// |arg_name| parameters by copying them
// - |id| is used to disambiguate counters with the same name, or match async
// trace events
CEF_EXPORT void cef_trace_event_instant(const char* category,
const char* name,
const char* arg1_name,
uint64_t arg1_val,
uint64 arg1_val,
const char* arg2_name,
uint64_t arg2_val);
uint64 arg2_val,
int copy);
CEF_EXPORT void cef_trace_event_begin(const char* category,
const char* name,
const char* arg1_name,
uint64_t arg1_val,
uint64 arg1_val,
const char* arg2_name,
uint64_t arg2_val);
uint64 arg2_val,
int copy);
CEF_EXPORT void cef_trace_event_end(const char* category,
const char* name,
const char* arg1_name,
uint64_t arg1_val,
uint64 arg1_val,
const char* arg2_name,
uint64_t arg2_val);
uint64 arg2_val,
int copy);
CEF_EXPORT void cef_trace_counter(const char* category,
const char* name,
const char* value1_name,
uint64_t value1_val,
uint64 value1_val,
const char* value2_name,
uint64_t value2_val);
uint64 value2_val,
int copy);
CEF_EXPORT void cef_trace_counter_id(const char* category,
const char* name,
uint64_t id,
uint64 id,
const char* value1_name,
uint64_t value1_val,
uint64 value1_val,
const char* value2_name,
uint64_t value2_val);
uint64 value2_val,
int copy);
CEF_EXPORT void cef_trace_event_async_begin(const char* category,
const char* name,
uint64_t id,
uint64 id,
const char* arg1_name,
uint64_t arg1_val,
uint64 arg1_val,
const char* arg2_name,
uint64_t arg2_val);
uint64 arg2_val,
int copy);
CEF_EXPORT void cef_trace_event_async_step_into(const char* category,
const char* name,
uint64_t id,
uint64_t step,
uint64 id,
uint64 step,
const char* arg1_name,
uint64_t arg1_val);
uint64 arg1_val,
int copy);
CEF_EXPORT void cef_trace_event_async_step_past(const char* category,
const char* name,
uint64_t id,
uint64_t step,
uint64 id,
uint64 step,
const char* arg1_name,
uint64_t arg1_val);
uint64 arg1_val,
int copy);
CEF_EXPORT void cef_trace_event_async_end(const char* category,
const char* name,
uint64_t id,
uint64 id,
const char* arg1_name,
uint64_t arg1_val,
uint64 arg1_val,
const char* arg2_name,
uint64_t arg2_val);
uint64 arg2_val,
int copy);
#ifdef __cplusplus
}

View File

@@ -31,14 +31,10 @@
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
#pragma once
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include "include/base/cef_basictypes.h"
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_time.h"
#include "include/internal/cef_types_content_settings.h"
#include "include/internal/cef_types_geometry.h"
// Bring in platform-specific definitions.
@@ -52,7 +48,7 @@
// 32-bit ARGB color value, not premultiplied. The color components are always
// in a known order. Equivalent to the SkColor type.
typedef uint32_t cef_color_t;
typedef uint32 cef_color_t;
// Return the alpha byte from a cef_color_t value.
#define CefColorGetA(color) (((color) >> 24) & 0xFF)
@@ -69,18 +65,17 @@ typedef uint32_t cef_color_t;
(static_cast<unsigned>(a) << 24) | (static_cast<unsigned>(r) << 16) | \
(static_cast<unsigned>(g) << 8) | (static_cast<unsigned>(b) << 0))
// Return an int64_t value with the specified low and high int32_t component
// values.
#define CefInt64Set(int32_low, int32_high) \
static_cast<int64_t>( \
(static_cast<uint32_t>(int32_low)) | \
(static_cast<int64_t>(static_cast<int32_t>(int32_high))) << 32)
// Return an int64 value with the specified low and high int32 component values.
#define CefInt64Set(int32_low, int32_high) \
static_cast<int64>((static_cast<uint32>(int32_low)) | \
(static_cast<int64>(static_cast<int32>(int32_high))) \
<< 32)
// Return the low int32_t value from an int64_t value.
#define CefInt64GetLow(int64_val) static_cast<int32_t>(int64_val)
// Return the high int32_t value from an int64_t value.
// Return the low int32 value from an int64 value.
#define CefInt64GetLow(int64_val) static_cast<int32>(int64_val)
// Return the high int32 value from an int64 value.
#define CefInt64GetHigh(int64_val) \
static_cast<int32_t>((static_cast<int64_t>(int64_val) >> 32) & 0xFFFFFFFFL)
static_cast<int32>((static_cast<int64>(int64_val) >> 32) & 0xFFFFFFFFL)
#ifdef __cplusplus
extern "C" {
@@ -260,16 +255,24 @@ typedef struct _cef_settings_t {
/// The root directory that all CefSettings.cache_path and
/// CefRequestContextSettings.cache_path values must have in common. If this
/// value is empty and CefSettings.cache_path is non-empty then it will
/// default to the CefSettings.cache_path value. If both values are empty
/// then the default platform-specific directory will be used
/// default to the CefSettings.cache_path value. If this value is non-empty
/// then it must be an absolute path. Failure to set this value correctly may
/// result in the sandbox blocking read/write access to the cache_path
/// directory.
///
cef_string_t root_cache_path;
///
/// The location where user data such as the Widevine CDM module and spell
/// checking dictionary files will be stored on disk. If this value is empty
/// then the default platform-specific user data directory will be used
/// ("~/.config/cef_user_data" directory on Linux, "~/Library/Application
/// Support/CEF/User Data" directory on MacOS, "AppData\Local\CEF\User Data"
/// directory under the user profile directory on Windows). If this value is
/// non-empty then it must be an absolute path. Failure to set this value
/// correctly may result in the sandbox blocking read/write access to certain
/// files.
/// non-empty then it must be an absolute path. When using the Chrome runtime
/// this value will be ignored in favor of the |root_cache_path| value.
///
cef_string_t root_cache_path;
cef_string_t user_data_path;
///
/// To persist session cookies (cookies without an expiry date or validity
@@ -1775,7 +1778,7 @@ typedef struct _cef_mouse_event_t {
/// Bit flags describing any pressed modifier keys. See
/// cef_event_flags_t for values.
///
uint32_t modifiers;
uint32 modifiers;
} cef_mouse_event_t;
///
@@ -1853,7 +1856,7 @@ typedef struct _cef_touch_event_t {
/// Bit flags describing any pressed modifier keys. See
/// cef_event_flags_t for values.
///
uint32_t modifiers;
uint32 modifiers;
///
/// The device type that caused the event.
@@ -2066,7 +2069,7 @@ typedef struct _cef_key_event_t {
/// Bit flags describing any pressed modifier keys. See
/// cef_event_flags_t for values.
///
uint32_t modifiers;
uint32 modifiers;
///
/// The Windows key code for the key event. This value is used by the DOM
@@ -2091,13 +2094,13 @@ typedef struct _cef_key_event_t {
///
/// The character generated by the keystroke.
///
char16_t character;
char16 character;
///
/// Same as |character| but unmodified by any concurrently-held modifiers
/// (except shift). This is useful for working out shortcut keys.
///
char16_t unmodified_character;
char16 unmodified_character;
///
/// True if the focus is currently on an editable field on the page. This is
@@ -2176,8 +2179,10 @@ typedef struct _cef_popup_features_t {
int height;
int heightSet;
/// True (1) if browser interface elements should be hidden.
int isPopup;
int menuBarVisible;
int statusBarVisible;
int toolBarVisible;
int scrollbarsVisible;
} cef_popup_features_t;
///
@@ -2997,8 +3002,8 @@ typedef enum {
/// Structure representing a range.
///
typedef struct _cef_range_t {
uint32_t from;
uint32_t to;
int from;
int to;
} cef_range_t;
///
@@ -3248,7 +3253,7 @@ typedef enum {
} cef_text_field_commands_t;
///
/// Chrome toolbar types.
/// Supported Chrome toolbar types.
///
typedef enum {
CEF_CTT_NONE = 1,
@@ -3256,52 +3261,6 @@ typedef enum {
CEF_CTT_LOCATION,
} cef_chrome_toolbar_type_t;
///
/// Chrome page action icon types. Should be kept in sync with Chromium's
/// PageActionIconType type.
///
typedef enum {
CEF_CPAIT_BOOKMARK_STAR = 0,
CEF_CPAIT_CLICK_TO_CALL,
CEF_CPAIT_COOKIE_CONTROLS,
CEF_CPAIT_FILE_SYSTEM_ACCESS,
CEF_CPAIT_FIND,
CEF_CPAIT_HIGH_EFFICIENCY,
CEF_CPAIT_INTENT_PICKER,
CEF_CPAIT_LOCAL_CARD_MIGRATION,
CEF_CPAIT_MANAGE_PASSWORDS,
CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION,
CEF_CPAIT_PRICE_TRACKING,
CEF_CPAIT_PWA_INSTALL,
CEF_CPAIT_QR_CODE_GENERATOR,
CEF_CPAIT_READER_MODE,
CEF_CPAIT_SAVE_AUTOFILL_ADDRESS,
CEF_CPAIT_SAVE_CARD,
CEF_CPAIT_SEND_TAB_TO_SELF,
CEF_CPAIT_SHARING_HUB,
CEF_CPAIT_SIDE_SEARCH,
CEF_CPAIT_SMS_REMOTE_FETCHER,
CEF_CPAIT_TRANSLATE,
CEF_CPAIT_VIRTUAL_CARD_ENROLL,
CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK,
CEF_CPAIT_ZOOM,
CEF_CPAIT_SAVE_IBAN,
CEF_CPAIT_MANDATORY_REAUTH,
CEF_CPAIT_MAX_VALUE = CEF_CPAIT_MANDATORY_REAUTH,
} cef_chrome_page_action_icon_type_t;
///
/// Chrome toolbar button types. Should be kept in sync with CEF's internal
/// ToolbarButtonType type.
///
typedef enum {
CEF_CTBT_CAST = 0,
CEF_CTBT_DOWNLOAD,
CEF_CTBT_SEND_TAB_TO_SELF,
CEF_CTBT_SIDE_PANEL,
CEF_CTBT_MAX_VALUE = CEF_CTBT_SIDE_PANEL,
} cef_chrome_toolbar_button_type_t;
///
/// Docking modes supported by CefWindow::AddOverlay.
///
@@ -3344,7 +3303,7 @@ typedef struct _cef_touch_handle_state_t {
/// Combination of cef_touch_handle_state_flags_t values indicating what state
/// is set.
///
uint32_t flags;
uint32 flags;
///
/// Enabled state. Only set if |flags| contains CEF_THS_FLAG_ENABLED.
@@ -3411,22 +3370,21 @@ typedef enum {
CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = 1 << 2,
CEF_PERMISSION_TYPE_CAMERA_STREAM = 1 << 3,
CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 4,
CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 5,
CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 6,
CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 7,
CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 8,
CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 9,
CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 10,
CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 11,
CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 12,
CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 13,
CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 14,
CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 15,
CEF_PERMISSION_TYPE_SECURITY_ATTESTATION = 1 << 16,
CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 17,
CEF_PERMISSION_TYPE_U2F_API_REQUEST = 1 << 18,
CEF_PERMISSION_TYPE_VR_SESSION = 1 << 19,
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 20,
CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 5,
CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 6,
CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 7,
CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 8,
CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 9,
CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 10,
CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 11,
CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 12,
CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 13,
CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 14,
CEF_PERMISSION_TYPE_SECURITY_ATTESTATION = 1 << 15,
CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 16,
CEF_PERMISSION_TYPE_U2F_API_REQUEST = 1 << 17,
CEF_PERMISSION_TYPE_VR_SESSION = 1 << 18,
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 19,
} cef_permission_request_types_t;
///
@@ -3486,131 +3444,6 @@ typedef enum {
CEF_PREFERENCES_TYPE_REQUEST_CONTEXT,
} cef_preferences_type_t;
///
/// Download interrupt reasons. Should be kept in sync with
/// Chromium's download::DownloadInterruptReason type.
///
typedef enum {
CEF_DOWNLOAD_INTERRUPT_REASON_NONE = 0,
/// Generic file operation failure.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = 1,
/// The file cannot be accessed due to security restrictions.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = 2,
/// There is not enough room on the drive.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = 3,
/// The directory or file name is too long.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = 5,
/// The file is too large for the file system to handle.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = 6,
/// The file contains a virus.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = 7,
/// The file was in use. Too many files are opened at once. We have run out of
/// memory.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = 10,
/// The file was blocked due to local policy.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = 11,
/// An attempt to check the safety of the download failed due to unexpected
/// reasons. See http://crbug.com/153212.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = 12,
/// An attempt was made to seek past the end of a file in opening
/// a file (as part of resuming a previously interrupted download).
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = 13,
/// The partial file didn't match the expected hash.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = 14,
/// The source and the target of the download were the same.
CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = 15,
// Network errors.
/// Generic network failure.
CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = 20,
/// The network operation timed out.
CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = 21,
/// The network connection has been lost.
CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = 22,
/// The server has gone down.
CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = 23,
/// The network request was invalid. This may be due to the original URL or a
/// redirected URL:
/// - Having an unsupported scheme.
/// - Being an invalid URL.
/// - Being disallowed by policy.
CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = 24,
// Server responses.
/// The server indicates that the operation has failed (generic).
CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = 30,
/// The server does not support range requests.
/// Internal use only: must restart from the beginning.
CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = 31,
/// The server does not have the requested data.
CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = 33,
/// Server didn't authorize access to resource.
CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = 34,
/// Server certificate problem.
CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = 35,
/// Server access forbidden.
CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = 36,
/// Unexpected server response. This might indicate that the responding server
/// may not be the intended server.
CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = 37,
/// The server sent fewer bytes than the content-length header. It may
/// indicate that the connection was closed prematurely, or the Content-Length
/// header was invalid. The download is only interrupted if strong validators
/// are present. Otherwise, it is treated as finished.
CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = 38,
/// An unexpected cross-origin redirect happened.
CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = 39,
// User input.
/// The user canceled the download.
CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = 40,
/// The user shut down the browser.
/// Internal use only: resume pending downloads if possible.
CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = 41,
// Crash.
/// The browser crashed.
/// Internal use only: resume pending downloads if possible.
CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = 50,
} cef_download_interrupt_reason_t;
///
/// Specifies the gesture commands.
///
typedef enum {
CEF_GESTURE_COMMAND_BACK,
CEF_GESTURE_COMMAND_FORWARD,
} cef_gesture_command_t;
#ifdef __cplusplus
}
#endif

View File

@@ -1,368 +0,0 @@
// Copyright (c) 2023 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.
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_CONTENT_SETTINGS_H_
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_CONTENT_SETTINGS_H_
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
///
/// Supported content setting types. Some types are platform-specific or only
/// supported with the Chrome runtime. Should be kept in sync with Chromium's
/// ContentSettingsType type.
///
typedef enum {
CEF_CONTENT_SETTING_TYPE_COOKIES = 0,
CEF_CONTENT_SETTING_TYPE_IMAGES,
CEF_CONTENT_SETTING_TYPE_JAVASCRIPT,
/// This setting governs both popups and unwanted redirects like tab-unders
/// and framebusting.
CEF_CONTENT_SETTING_TYPE_POPUPS,
CEF_CONTENT_SETTING_TYPE_GEOLOCATION,
CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS,
CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE,
CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT,
CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC,
CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA,
CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS,
CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER,
CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS,
CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX,
CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS,
CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER,
CEF_CONTENT_SETTING_TYPE_APP_BANNER,
CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT,
CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE,
CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA,
CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD,
CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC,
CEF_CONTENT_SETTING_TYPE_AUTOPLAY,
CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO,
CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA,
CEF_CONTENT_SETTING_TYPE_ADS,
/// Website setting which stores metadata for the subresource filter to aid in
/// decisions for whether or not to show the UI.
CEF_CONTENT_SETTING_TYPE_ADS_DATA,
/// This is special-cased in the permissions layer to always allow, and as
/// such doesn't have associated prefs data.
CEF_CONTENT_SETTING_TYPE_MIDI,
/// This content setting type is for caching password protection service's
/// verdicts of each origin.
CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION,
/// Website setting which stores engagement data for media related to a
/// specific origin.
CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT,
/// Content setting which stores whether or not the site can play audible
/// sound. This will not block playback but instead the user will not hear it.
CEF_CONTENT_SETTING_TYPE_SOUND,
/// Website setting which stores the list of client hints that the origin
/// requested the browser to remember. The browser is expected to send all
/// client hints in the HTTP request headers for every resource requested
/// from that origin.
CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS,
/// Generic Sensor API covering ambient-light-sensor, accelerometer, gyroscope
/// and magnetometer are all mapped to a single content_settings_type.
/// Setting for the Generic Sensor API covering ambient-light-sensor,
/// accelerometer, gyroscope and magnetometer. These are all mapped to a
/// single ContentSettingsType.
CEF_CONTENT_SETTING_TYPE_SENSORS,
/// Content setting which stores whether or not the user has granted the site
/// permission to respond to accessibility events, which can be used to
/// provide a custom accessibility experience. Requires explicit user consent
/// because some users may not want sites to know they're using assistive
/// technology.
CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS,
/// Used to store whether to allow a website to install a payment handler.
CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER,
/// Content setting which stores whether to allow sites to ask for permission
/// to access USB devices. If this is allowed specific device permissions are
/// stored under USB_CHOOSER_DATA.
CEF_CONTENT_SETTING_TYPE_USB_GUARD,
/// Nothing is stored in this setting at present. Please refer to
/// BackgroundFetchPermissionContext for details on how this permission
/// is ascertained.
CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH,
/// Website setting which stores the amount of times the user has dismissed
/// intent picker UI without explicitly choosing an option.
CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY,
/// Used to store whether to allow a website to detect user active/idle state.
CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION,
/// Setting for enabling auto-select of all screens for getDisplayMediaSet.
CEF_CONTENT_SETTING_TYPE_GET_DISPLAY_MEDIA_SET_SELECT_ALL_SCREENS,
/// Content settings for access to serial ports. The "guard" content setting
/// stores whether to allow sites to ask for permission to access a port. The
/// permissions granted to access particular ports are stored in the "chooser
/// data" website setting.
CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD,
CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA,
/// Nothing is stored in this setting at present. Please refer to
/// PeriodicBackgroundSyncPermissionContext for details on how this permission
/// is ascertained.
/// This content setting is not registered because it does not require access
/// to any existing providers.
CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC,
/// Content setting which stores whether to allow sites to ask for permission
/// to do Bluetooth scanning.
CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING,
/// Content settings for access to HID devices. The "guard" content setting
/// stores whether to allow sites to ask for permission to access a device.
/// The permissions granted to access particular devices are stored in the
/// "chooser data" website setting.
CEF_CONTENT_SETTING_TYPE_HID_GUARD,
CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA,
/// Wake Lock API, which has two lock types: screen and system locks.
/// Currently, screen locks do not need any additional permission, and system
/// locks are always denied while the right UI is worked out.
CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN,
CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM,
/// Legacy SameSite cookie behavior. This disables SameSite=Lax-by-default,
/// SameSite=None requires Secure, and Schemeful Same-Site, forcing the
/// legacy behavior wherein 1) cookies that don't specify SameSite are treated
/// as SameSite=None, 2) SameSite=None cookies are not required to be Secure,
/// and 3) schemeful same-site is not active.
///
/// This will also be used to revert to legacy behavior when future changes
/// in cookie handling are introduced.
CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS,
/// Content settings which stores whether to allow sites to ask for permission
/// to save changes to an original file selected by the user through the
/// File System Access API.
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD,
/// Used to store whether to allow a website to exchange data with NFC
/// devices.
CEF_CONTENT_SETTING_TYPE_NFC,
/// Website setting to store permissions granted to access particular
/// Bluetooth devices.
CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA,
/// Full access to the system clipboard (sanitized read without user gesture,
/// and unsanitized read and write with user gesture).
CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE,
/// This is special-cased in the permissions layer to always allow, and as
/// such doesn't have associated prefs data.
CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE,
/// This content setting type is for caching safe browsing real time url
/// check's verdicts of each origin.
CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA,
/// Used to store whether a site is allowed to request AR or VR sessions with
/// the WebXr Device API.
CEF_CONTENT_SETTING_TYPE_VR,
CEF_CONTENT_SETTING_TYPE_AR,
/// Content setting which stores whether to allow site to open and read files
/// and directories selected through the File System Access API.
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD,
/// Access to first party storage in a third-party context. Exceptions are
/// scoped to the combination of requesting/top-level origin, and are managed
/// through the Storage Access API. For the time being, this content setting
/// exists in parallel to third-party cookie rules stored in COOKIES.
CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS,
/// Content setting which stores whether to allow a site to control camera
/// movements. It does not give access to camera.
CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM,
/// Content setting for Screen Enumeration and Screen Detail functionality.
/// Permits access to detailed multi-screen information, like size and
/// position. Permits placing fullscreen and windowed content on specific
/// screens. See also: https://w3c.github.io/window-placement
CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT,
/// Stores whether to allow insecure websites to make local network requests.
/// See also: https://wicg.github.io/local-network-access
/// Set through enterprise policies only.
CEF_CONTENT_SETTING_TYPE_INSECURE_LOCAL_NETWORK,
/// Content setting which stores whether or not a site can access low-level
/// locally installed font data using the Local Fonts Access API.
CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS,
/// Stores per-origin state for permission auto-revocation (for all permission
/// types).
CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA,
/// Stores per-origin state of the most recently selected directory for the
/// use by the File System Access API.
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY,
/// Controls access to the getDisplayMedia API when {preferCurrentTab: true}
/// is specified.
CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE,
/// Website setting to store permissions metadata granted to paths on the
/// local file system via the File System Access API.
/// |FILE_SYSTEM_WRITE_GUARD| is the corresponding "guard" setting.
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA,
/// Stores a grant that allows a relying party to send a request for identity
/// information to specified identity providers, potentially through any
/// anti-tracking measures that would otherwise prevent it. This setting is
/// associated with the relying party's origin.
CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING,
/// Whether to use the v8 optimized JIT for running JavaScript on the page.
CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT,
/// Content setting which stores user decisions to allow loading a site over
/// HTTP. Entries are added by hostname when a user bypasses the HTTPS-First
/// Mode interstitial warning when a site does not support HTTPS. Allowed
/// hosts are exact hostname matches -- subdomains of a host on the allowlist
/// must be separately allowlisted.
CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED,
/// Stores metadata related to form fill, such as e.g. whether user data was
/// autofilled on a specific website.
CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA,
/// Setting to indicate that there is an active federated sign-in session
/// between a specified relying party and a specified identity provider for
/// a specified account. When this is present it allows access to session
/// management capabilities between the sites. This setting is associated
/// with the relying party's origin.
CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION,
/// Setting to indicate whether Chrome should automatically apply darkening to
/// web content.
CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT,
/// Setting to indicate whether Chrome should request the desktop view of a
/// site instead of the mobile one.
CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE,
/// Setting to indicate whether browser should allow signing into a website
/// via the browser FedCM API.
CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API,
/// Stores notification interactions per origin for the past 90 days.
/// Interactions per origin are pre-aggregated over seven-day windows: A
/// notification interaction or display is assigned to the last Monday
/// midnight in local time.
CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS,
/// Website setting which stores the last reduced accept language negotiated
/// for a given origin, to be used on future visits to the origin.
CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE,
/// Website setting which is used for NotificationPermissionReviewService to
/// store origin blocklist from review notification permissions feature.
CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW,
/// Website setting to store permissions granted to access particular devices
/// in private network.
CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD,
CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA,
/// Website setting which stores whether the browser has observed the user
/// signing into an identity-provider based on observing the IdP-SignIn-Status
/// HTTP header.
CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS,
/// Website setting which is used for UnusedSitePermissionsService to
/// store revoked permissions of unused sites from unused site permissions
/// feature.
CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS,
/// Similar to STORAGE_ACCESS, but applicable at the page-level rather than
/// being specific to a frame.
CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS,
/// Setting to indicate whether user has opted in to allowing auto re-authn
/// via the FedCM API.
CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION,
/// Website setting which stores whether the user has explicitly registered
/// a website as an identity-provider.
CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION,
/// Content setting which is used to indicate whether anti-abuse functionality
/// should be enabled.
CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE,
/// Content setting used to indicate whether third-party storage partitioning
/// should be enabled.
CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING,
/// Used to indicate whether HTTPS-First Mode is enabled on the hostname.
CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED,
CEF_CONTENT_SETTING_TYPE_NUM_TYPES,
} cef_content_setting_types_t;
///
/// Supported content setting values. Should be kept in sync with Chromium's
/// ContentSetting type.
///
typedef enum {
CEF_CONTENT_SETTING_VALUE_DEFAULT = 0,
CEF_CONTENT_SETTING_VALUE_ALLOW,
CEF_CONTENT_SETTING_VALUE_BLOCK,
CEF_CONTENT_SETTING_VALUE_ASK,
CEF_CONTENT_SETTING_VALUE_SESSION_ONLY,
CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT,
CEF_CONTENT_SETTING_VALUE_NUM_VALUES
} cef_content_setting_values_t;
#ifdef __cplusplus
}
#endif
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_CONTENT_SETTINGS_H_

View File

@@ -31,8 +31,6 @@
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
#pragma once
#include <limits>
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_types.h"
@@ -51,9 +49,8 @@ class CefStructBase : public traits::struct_type {
virtual ~CefStructBase() {
// Only clear this object's data if it isn't currently attached to a
// structure.
if (!attached_to_) {
if (!attached_to_)
Clear(this);
}
}
CefStructBase(const CefStructBase& r) {
@@ -72,9 +69,8 @@ class CefStructBase : public traits::struct_type {
void AttachTo(struct_type& source) {
// Only clear this object's data if it isn't currently attached to a
// structure.
if (!attached_to_) {
if (!attached_to_)
Clear(this);
}
// This object is now attached to the new structure.
attached_to_ = &source;
@@ -217,12 +213,7 @@ class CefRange : public cef_range_t {
public:
CefRange() : cef_range_t{} {}
CefRange(const cef_range_t& r) : cef_range_t(r) {}
CefRange(uint32_t from, uint32_t to) : cef_range_t{from, to} {}
static CefRange InvalidRange() {
return CefRange((std::numeric_limits<uint32_t>::max)(),
(std::numeric_limits<uint32_t>::max)());
}
CefRange(int from, int to) : cef_range_t{from, to} {}
void Set(int from_val, int to_val) { from = from_val, to = to_val; }
};
@@ -364,6 +355,7 @@ struct CefSettingsTraits {
cef_string_clear(&s->main_bundle_path);
cef_string_clear(&s->cache_path);
cef_string_clear(&s->root_cache_path);
cef_string_clear(&s->user_data_path);
cef_string_clear(&s->user_agent);
cef_string_clear(&s->user_agent_product);
cef_string_clear(&s->locale);
@@ -396,6 +388,8 @@ struct CefSettingsTraits {
&target->cache_path, copy);
cef_string_set(src->root_cache_path.str, src->root_cache_path.length,
&target->root_cache_path, copy);
cef_string_set(src->user_data_path.str, src->user_data_path.length,
&target->user_data_path, copy);
target->persist_session_cookies = src->persist_session_cookies;
target->persist_user_preferences = src->persist_user_preferences;

View File

@@ -168,6 +168,13 @@ int CefRunWinMainWithPreferredStackSize(wWinMainPtr wWinMain,
int CefRunMainWithPreferredStackSize(mainPtr main, int argc, char* argv[]);
#endif // defined(ARCH_CPU_32_BITS)
///
/// Call during process startup to enable High-DPI support on Windows 7 or
/// newer. Older versions of Windows should be left DPI-unaware because they do
/// not support DirectWrite and GDI fonts are kerned very badly.
///
void CefEnableHighDPISupport();
///
/// Set to true before calling Windows APIs like TrackPopupMenu that enter a
/// modal message loop. Set to false after exiting the modal message loop.

View File

@@ -86,7 +86,7 @@ class CefTestServer : public CefBaseRefCounted {
///
/*--cef()--*/
static CefRefPtr<CefTestServer> CreateAndStart(
uint16_t port,
uint16 port,
bool https_server,
cef_test_cert_type_t https_cert_type,
CefRefPtr<CefTestServerHandler> handler);

Some files were not shown because too many files have changed in this diff Show More