You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-09-30 21:28:55 +02:00
Update to CEF 140.1.14
This commit is contained in:
@@ -200,6 +200,10 @@ type
|
||||
FMissingLibFiles : string;
|
||||
FMustFreeLibrary : boolean;
|
||||
FLastErrorMessage : ustring;
|
||||
FSharedTextureEnabled : boolean;
|
||||
FExternalBeginFrameEnabled : boolean;
|
||||
FUseGL : TCefGLImplementation;
|
||||
FUseAngle : TCefAngleImplementation;
|
||||
|
||||
// Internal fields
|
||||
FLibHandle : {$IFDEF FPC}TLibHandle{$ELSE}THandle{$ENDIF};
|
||||
@@ -1556,6 +1560,33 @@ type
|
||||
/// Last error message that is usually shown when CEF finds a problem at initialization.
|
||||
/// </summary>
|
||||
property LastErrorMessage : ustring read FLastErrorMessage;
|
||||
/// <summary>
|
||||
/// Set to true (1) to enable shared textures for windowless rendering. Only
|
||||
/// valid if windowless_rendering_enabled above is also set to true. Currently
|
||||
/// only supported on Windows (D3D11).
|
||||
/// </summary>
|
||||
property SharedTextureEnabled : boolean read FSharedTextureEnabled write FSharedTextureEnabled;
|
||||
/// <summary>
|
||||
/// Set to true (1) to enable the ability to issue BeginFrame requests from
|
||||
/// the client application by calling ICefBrowserHost.SendExternalBeginFrame.
|
||||
/// </summary>
|
||||
property ExternalBeginFrameEnabled : boolean read FExternalBeginFrameEnabled write FExternalBeginFrameEnabled;
|
||||
/// <summary>
|
||||
/// Select which implementation of GL the GPU process should use.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para><see href="https://peter.sh/experiments/chromium-command-line-switches/#use-gl">Uses the following command line switch: --use-gl</see></para>
|
||||
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:ui/gl/gl_switches.cc">See the gl_switches.cc file</see></para>
|
||||
/// </remarks>
|
||||
property UseGL : TCefGLImplementation read FUseGL write FUseGL;
|
||||
/// <summary>
|
||||
/// Select which ANGLE backend to use.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para><see href="https://peter.sh/experiments/chromium-command-line-switches/#use-angle">Uses the following command line switch: --use-angle</see></para>
|
||||
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:ui/gl/gl_switches.cc">See the gl_switches.cc file</see></para>
|
||||
/// </remarks>
|
||||
property UseAngle : TCefAngleImplementation read FUseAngle write FUseAngle;
|
||||
{$IFDEF LINUX}
|
||||
/// <summary>
|
||||
/// Return the singleton X11 display shared with Chromium. The display is not
|
||||
@@ -2106,6 +2137,10 @@ begin
|
||||
FMissingLibFiles := '';
|
||||
FMustFreeLibrary := False;
|
||||
FLastErrorMessage := '';
|
||||
FSharedTextureEnabled := False;
|
||||
FExternalBeginFrameEnabled := False;
|
||||
FUseGL := glimDefault;
|
||||
FUseAngle := animDefault;
|
||||
{$IFDEF MSWINDOWS}
|
||||
case FProcessType of
|
||||
ptBrowser : GetDLLVersion(ChromeElfPath, FChromeVersionInfo);
|
||||
@@ -3751,6 +3786,24 @@ begin
|
||||
end;
|
||||
|
||||
{$IFDEF LINUX}
|
||||
if FWindowlessRenderingEnabled and FSharedTextureEnabled then
|
||||
begin
|
||||
// On Linux, in off screen rendering (OSR) shared texture mode, we must
|
||||
// ensure that ANGLE uses the EGL backend. Without this, DMABUF based
|
||||
// rendering will fail. The Chromium fallback path uses X11 pixmaps,
|
||||
// which are only supported by Mesa drivers (e.g., AMD and Intel).
|
||||
//
|
||||
// While Mesa supports DMABUFs via both EGL and pixmaps, the EGL based
|
||||
// DMA BUF import path is more robust and required for compatibility with
|
||||
// drivers like NVIDIA that do not support pixmaps.
|
||||
//
|
||||
// We also append the kOzonePlatform switch with value x11 to ensure
|
||||
// that X11 semantics are preserved, which is necessary for compatibility
|
||||
// with some GDK/X11 integrations (e.g. Wayland with AMD).
|
||||
if (FUseAngle = animDefault) then FUseAngle := animOpenGLEGL;
|
||||
if (FOzonePlatform = ozpDefault) then FOzonePlatform := ozpX11;
|
||||
end;
|
||||
|
||||
case FPasswordStorage of
|
||||
psGnomeLibsecret : ReplaceSwitch(aKeys, aValues, '--password-store', 'gnome-libsecret');
|
||||
psKWallet : ReplaceSwitch(aKeys, aValues, '--password-store', 'kwallet');
|
||||
@@ -3771,6 +3824,31 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
case FUseGL of
|
||||
glimEGL : ReplaceSwitch(aKeys, aValues, '--use-gl', 'egl');
|
||||
glimANGLE : ReplaceSwitch(aKeys, aValues, '--use-gl', 'angle');
|
||||
glimMock : ReplaceSwitch(aKeys, aValues, '--use-gl', 'mock');
|
||||
glimStub : ReplaceSwitch(aKeys, aValues, '--use-gl', 'stub');
|
||||
glimDisabled : ReplaceSwitch(aKeys, aValues, '--use-gl', 'disabled');
|
||||
end;
|
||||
|
||||
case FUseAngle of
|
||||
animD3D9 : ReplaceSwitch(aKeys, aValues, '--use-angle', 'd3d9');
|
||||
animD3D11 : ReplaceSwitch(aKeys, aValues, '--use-angle', 'd3d11');
|
||||
animD3D11on12 : ReplaceSwitch(aKeys, aValues, '--use-angle', 'd3d11on12');
|
||||
animD3D11Warp : ReplaceSwitch(aKeys, aValues, '--use-angle', 'd3d11-warp');
|
||||
animD3D11WarpForWebGL : ReplaceSwitch(aKeys, aValues, '--use-angle', 'd3d11-warp-webgl');
|
||||
animOpenGL : ReplaceSwitch(aKeys, aValues, '--use-angle', 'gl');
|
||||
animOpenGLEGL : ReplaceSwitch(aKeys, aValues, '--use-angle', 'gl-egl');
|
||||
animOpenGLES : ReplaceSwitch(aKeys, aValues, '--use-angle', 'gles');
|
||||
animOpenGLESEGL : ReplaceSwitch(aKeys, aValues, '--use-angle', 'gles-egl');
|
||||
animNull : ReplaceSwitch(aKeys, aValues, '--use-angle', 'null');
|
||||
animVulkan : ReplaceSwitch(aKeys, aValues, '--use-angle', 'vulkan');
|
||||
animSwiftShader : ReplaceSwitch(aKeys, aValues, '--use-angle', 'swiftshader');
|
||||
animSwiftShaderForWebGL : ReplaceSwitch(aKeys, aValues, '--use-angle', 'swiftshader-webgl');
|
||||
animMetal : ReplaceSwitch(aKeys, aValues, '--use-angle', 'metal');
|
||||
end;
|
||||
|
||||
// The list of features you can enable is here :
|
||||
// https://chromium.googlesource.com/chromium/src/+/master/chrome/common/chrome_features.cc
|
||||
// https://source.chromium.org/chromium/chromium/src/+/main:content/public/common/content_features.cc
|
||||
|
@@ -4998,7 +4998,6 @@ begin
|
||||
begin
|
||||
GetSettings(FBrowserSettings);
|
||||
|
||||
|
||||
if aForceAsPopup then
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
@@ -5093,7 +5092,15 @@ procedure TChromiumCore.InitializeWindowInfo( aParentHandle : TCefWindowHan
|
||||
const aWindowName : ustring);
|
||||
begin
|
||||
if FIsOSR then
|
||||
FWindowInfo.SetAsWindowless(ParentFormHandle)
|
||||
begin
|
||||
FWindowInfo.SetAsWindowless(ParentFormHandle);
|
||||
|
||||
if assigned(GlobalCEFApp) then
|
||||
begin
|
||||
FWindowInfo.SharedTextureEnabled := GlobalCEFApp.SharedTextureEnabled;
|
||||
FWindowInfo.ExternalBeginFrameEnabled := GlobalCEFApp.ExternalBeginFrameEnabled;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
FWindowInfo.SetAsChild(aParentHandle, aParentRect);
|
||||
@@ -5535,8 +5542,12 @@ end;
|
||||
procedure TChromiumCore.InitializeSettings(var aSettings : TCefBrowserSettings);
|
||||
begin
|
||||
FillChar(aSettings, SizeOf(TCefBrowserSettings), 0);
|
||||
aSettings.size := SizeOf(TCefBrowserSettings);
|
||||
aSettings.windowless_frame_rate := CEF_OSR_FRAMERATE_DEFAULT; // Use CEF_OSR_SHARED_TEXTURES_FRAMERATE_DEFAULT if the shared textures are enabled.
|
||||
aSettings.size := SizeOf(TCefBrowserSettings);
|
||||
|
||||
if assigned(GlobalCEFApp) and GlobalCEFApp.SharedTextureEnabled then
|
||||
aSettings.windowless_frame_rate := CEF_OSR_SHARED_TEXTURES_FRAMERATE_DEFAULT
|
||||
else
|
||||
aSettings.windowless_frame_rate := CEF_OSR_FRAMERATE_DEFAULT;
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.LoadURL(const aURL : ustring; const aFrameName, aFrameIdentifier : ustring);
|
||||
|
@@ -152,9 +152,16 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
uCEFApplication;
|
||||
|
||||
constructor TChromiumOptions.Create;
|
||||
begin
|
||||
FWindowlessFrameRate := CEF_OSR_FRAMERATE_DEFAULT;
|
||||
if assigned(GlobalCEFApp) and GlobalCEFApp.SharedTextureEnabled then
|
||||
FWindowlessFrameRate := CEF_OSR_SHARED_TEXTURES_FRAMERATE_DEFAULT
|
||||
else
|
||||
FWindowlessFrameRate := CEF_OSR_FRAMERATE_DEFAULT;
|
||||
|
||||
FJavascript := STATE_DEFAULT;
|
||||
FJavascriptCloseWindows := STATE_DEFAULT;
|
||||
FJavascriptAccessClipboard := STATE_DEFAULT;
|
||||
|
@@ -381,7 +381,8 @@ const
|
||||
/// </remarks>
|
||||
ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110;
|
||||
/// <summary>
|
||||
/// A tunnel connection through the proxy could not be established.
|
||||
/// A tunnel connection through the proxy could not be established. For more info
|
||||
/// see the comment on PROXY_UNABLE_TO_CONNECT_TO_DESTINATION.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>TCefErrorCode value.</para>
|
||||
@@ -935,6 +936,26 @@ const
|
||||
/// </remarks>
|
||||
ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184;
|
||||
/// <summary>
|
||||
/// An attempt to proxy a request failed because the proxy wasn't able to
|
||||
/// successfully connect to the destination. This likely indicates an issue with
|
||||
/// the request itself (for instance, the hostname failed to resolve to an IP
|
||||
/// address or the destination server refused the connection). This error code
|
||||
/// is used to indicate that the error is outside the control of the proxy server
|
||||
/// and thus the proxy chain should not be marked as bad. This is in contrast to
|
||||
/// ERR_TUNNEL_CONNECTION_FAILED which is used for general purpose errors
|
||||
/// connecting to the proxy and by the proxy request response handling when a
|
||||
/// proxy delegate doesn't indicate via a different error code whether proxy
|
||||
/// fallback should occur. Note that for IP Protection proxies this error code
|
||||
/// causes the proxy to be marked as bad since the preference is to fail open for
|
||||
/// general purpose errors, but for other proxies this error does not cause the
|
||||
/// proxy to be marked as bad.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>TCefErrorCode value.</para>
|
||||
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_errorcode_t)</see></para>
|
||||
/// </remarks>
|
||||
ERR_PROXY_UNABLE_TO_CONNECT_TO_DESTINATION = -186;
|
||||
/// <summary>
|
||||
/// The server responded with a certificate whose common name did not match
|
||||
/// the host name. This could mean:
|
||||
//
|
||||
@@ -2231,6 +2252,7 @@ const
|
||||
IDC_OPEN_IN_CHROME = 34061;
|
||||
IDC_WEB_APP_SETTINGS = 34062;
|
||||
IDC_WEB_APP_MENU_APP_INFO = 34063;
|
||||
IDC_WEB_APP_UPGRADE_DIALOG = 34064;
|
||||
IDC_VISIT_DESKTOP_OF_LRU_USER_2 = 34080;
|
||||
IDC_VISIT_DESKTOP_OF_LRU_USER_3 = 34081;
|
||||
IDC_VISIT_DESKTOP_OF_LRU_USER_4 = 34082;
|
||||
@@ -2404,6 +2426,7 @@ const
|
||||
IDC_OPEN_GLIC = 40294;
|
||||
IDC_FIND_EXTENSIONS = 40295;
|
||||
IDC_SHOW_SEARCH_TOOLS = 40296;
|
||||
IDC_SHOW_COMMENTS_SIDE_PANEL = 40297;
|
||||
IDC_SPELLCHECK_SUGGESTION_0 = 41000;
|
||||
IDC_SPELLCHECK_SUGGESTION_1 = 41001;
|
||||
IDC_SPELLCHECK_SUGGESTION_2 = 41002;
|
||||
|
@@ -505,6 +505,47 @@ type
|
||||
);
|
||||
{$ENDIF}
|
||||
|
||||
/// <summary>
|
||||
/// Select which implementation of GL the GPU process should use.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para><see href="https://peter.sh/experiments/chromium-command-line-switches/#use-gl">Uses the following command line switch: --use-gl</see></para>
|
||||
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:ui/gl/gl_switches.cc">See the gl_switches.cc file</see></para>
|
||||
/// </remarks>
|
||||
TCefGLImplementation = (
|
||||
glimDefault,
|
||||
glimEGL,
|
||||
glimANGLE,
|
||||
glimMock,
|
||||
glimStub,
|
||||
glimDisabled
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Select which ANGLE backend to use.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para><see href="https://peter.sh/experiments/chromium-command-line-switches/#use-angle">Uses the following command line switch: --use-angle</see></para>
|
||||
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:ui/gl/gl_switches.cc">See the gl_switches.cc file</see></para>
|
||||
/// </remarks>
|
||||
TCefAngleImplementation = (
|
||||
animDefault,
|
||||
animD3D9,
|
||||
animD3D11,
|
||||
animD3D11on12,
|
||||
animD3D11Warp,
|
||||
animD3D11WarpForWebGL,
|
||||
animOpenGL,
|
||||
animOpenGLEGL,
|
||||
animOpenGLES,
|
||||
animOpenGLESEGL,
|
||||
animNull,
|
||||
animVulkan,
|
||||
animSwiftShader,
|
||||
animSwiftShaderForWebGL,
|
||||
animMetal
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Structure representing a size.
|
||||
/// </summary>
|
||||
@@ -3446,6 +3487,7 @@ type
|
||||
CEF_CPAIT_COLLABORATION_MESSAGING, {* CEF_API_ADDED(13304) *}
|
||||
CEF_CPAIT_CHANGE_PASSWORD, {* CEF_API_ADDED(13400) *}
|
||||
CEF_CPAIT_LENS_OVERLAY_HOMEWORK, {* CEF_API_ADDED(13800) *}
|
||||
CEF_CPAIT_AI_MODE, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CPAIT_NUM_VALUES
|
||||
);
|
||||
|
||||
@@ -3489,7 +3531,7 @@ type
|
||||
/// <summary>
|
||||
/// A plugin process.
|
||||
/// </summary>
|
||||
CEF_TASK_TYPE_PLUGIN,
|
||||
CEF_TASK_TYPE_PLUGIN_DEPRECATED, {* CEF_API_ADDED(14000) *}
|
||||
/// <summary>
|
||||
/// A sandbox helper process.
|
||||
/// </summary>
|
||||
@@ -3622,10 +3664,14 @@ type
|
||||
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_chrome_toolbar_button_type_t)</see></para>
|
||||
/// </remarks>
|
||||
TCefChromeToolbarButtonType = (
|
||||
CEF_CTBT_CAST,
|
||||
CEF_CTBT_DOWNLOAD_DEPRECATED,
|
||||
CEF_CTBT_SEND_TAB_TO_SELF_DEPRECATED,
|
||||
CEF_CTBT_SIDE_PANEL,
|
||||
CEF_CTBT_CAST_DEPRECATED, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CTBT_DOWNLOAD_DEPRECATED, {* CEF_API_ADDED(13600) *}
|
||||
CEF_CTBT_SEND_TAB_TO_SELF_DEPRECATED, {* CEF_API_ADDED(13600) *}
|
||||
CEF_CTBT_SIDE_PANEL_DEPRECATED, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CTBT_MEDIA, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CTBT_TAB_SEARCH, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CTBT_BATTERY_SAVER, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CTBT_AVATAR, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CTBT_NUM_VALUES
|
||||
);
|
||||
|
||||
@@ -5334,8 +5380,8 @@ type
|
||||
/// Website setting to store permissions granted to access particular devices
|
||||
/// in private network.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD,
|
||||
CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA,
|
||||
CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD_DEPRECATED, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA_DEPRECATED, {* CEF_API_ADDED(14000) *}
|
||||
/// <summary>
|
||||
/// Website setting which stores whether the browser has observed the user
|
||||
/// signing into an identity-provider based on observing the IdP-SignIn-Status
|
||||
@@ -5571,6 +5617,18 @@ type
|
||||
/// user decides they would like to see all of these notifications.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_SUSPICIOUS_NOTIFICATION_IDS, {* CEF_API_ADDED(13800) *}
|
||||
/// <summary>
|
||||
/// To support approximate geolocation, the permission is migrating to use
|
||||
/// permissions with options, which won't be stored as ContentSettings. Upon
|
||||
/// launch of the feature, GEOLOCATION and GEOLOCATION_WITH_OPTIONS should be
|
||||
/// merged.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_GEOLOCATION_WITH_OPTIONS, {* CEF_API_ADDED(14000) *}
|
||||
/// <summary>
|
||||
/// Setting for enabling the Device Attributes API. Spec link:
|
||||
/// https://wicg.github.io/WebApiDevice/device_attributes/
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_DEVICE_ATTRIBUTES, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CONTENT_SETTING_TYPE_NUM_VALUES
|
||||
);
|
||||
|
||||
@@ -5587,7 +5645,7 @@ type
|
||||
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_DETECT_IMPORTANT_CONTENT_DEPRECATED, {* CEF_API_ADDED(14000) *}
|
||||
CEF_CONTENT_SETTING_VALUE_NUM_VALUES
|
||||
);
|
||||
|
||||
|
@@ -1,22 +1,22 @@
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 139;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 0;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 40;
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 140;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 1;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 14;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR;
|
||||
CEF_CHROMEELF_VERSION_MINOR = 0;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 7258;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 139;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 7339;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 185;
|
||||
|
||||
// values defined in cef_api_versions.json
|
||||
CEF_API_VERSION_MIN = 13300;
|
||||
CEF_API_VERSION_LAST = 13900;
|
||||
CEF_API_VERSION_LAST = 14000;
|
||||
CEF_API_VERSION = CEF_API_VERSION_LAST;
|
||||
|
||||
// value defined in /include/cef_api_hash.h
|
||||
CEF_API_VERSION_EXPERIMENTAL = 999999;
|
||||
|
||||
// values defined in cef_api_versions.json
|
||||
CEF_API_HASH_PLATFORM_LINUX = 'fd0b7f8ab5869224972340454690a42e91939488';
|
||||
CEF_API_HASH_PLATFORM_MAC = '9b3ef316d9a3f554899c36139cfccb17767ca254';
|
||||
CEF_API_HASH_PLATFORM_WINDOWS = '707508ab72072116ce0500e3d2bdd9f34b2d5cd8';
|
||||
CEF_API_HASH_PLATFORM_LINUX = 'a9f5630f5a4fd8f43e003aff6f8a2cba7bcff18f';
|
||||
CEF_API_HASH_PLATFORM_MAC = 'a280e368310e8ea75a21dc7ba8f192657b7c8455';
|
||||
CEF_API_HASH_PLATFORM_WINDOWS = 'a77810510fbf0ff5ee9768cf572941a9311c316c';
|
||||
|
Reference in New Issue
Block a user