mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Update to CEF 88.2.1
- Added xlib error handlers to the "interface" unit in the Lazarus demos for Linux. - Added the "broker" CEF process type. - Add the Zygote process to all the MustCreate* functions in TCefApplicationCore
This commit is contained in:
parent
12cce1cbba
commit
5c93e5c49a
14
README.md
14
README.md
@ -3,14 +3,14 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
|
||||
|
||||
CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
|
||||
|
||||
CEF4Delphi uses CEF 88.1.6 which includes Chromium 88.0.4324.96.
|
||||
CEF4Delphi uses CEF 88.2.1 which includes Chromium 88.0.4324.146.
|
||||
The CEF binaries used by CEF4Delphi are available for download at spotify :
|
||||
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_windows32.tar.bz2)
|
||||
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_windows64.tar.bz2)
|
||||
* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linux32.tar.bz2)
|
||||
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linux64.tar.bz2)
|
||||
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linuxarm.tar.bz2)
|
||||
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linuxarm64.tar.bz2)
|
||||
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_88.2.1%2Bg0b18d0b%2Bchromium-88.0.4324.146_windows32.tar.bz2)
|
||||
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_88.2.1%2Bg0b18d0b%2Bchromium-88.0.4324.146_windows64.tar.bz2)
|
||||
* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_88.2.1%2Bg0b18d0b%2Bchromium-88.0.4324.146_linux32.tar.bz2)
|
||||
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_88.2.1%2Bg0b18d0b%2Bchromium-88.0.4324.146_linux64.tar.bz2
|
||||
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_88.2.1%2Bg0b18d0b%2Bchromium-88.0.4324.146_linuxarm.tar.bz2)
|
||||
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_88.2.1%2Bg0b18d0b%2Bchromium-88.0.4324.146_linuxarm64.tar.bz2)
|
||||
|
||||
CEF4Delphi was developed and tested on Delphi 10.4.1 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3 and Lazarus 2.0.10/FPC 3.2.0. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
||||
|
||||
|
@ -15,11 +15,29 @@ uses
|
||||
{$IFNDEF EnableLibOverlay}
|
||||
gtk2DisableLibOverlay,
|
||||
{$ENDIF}
|
||||
Gtk2Int, Forms;
|
||||
Gtk2Int, Forms, xlib;
|
||||
|
||||
function CustomX11ErrorHandler(Display:PDisplay; ErrorEv:PXErrorEvent):longint;cdecl;
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
XError := ErrorEv^.error_code;
|
||||
WriteLn('Error: ' + IntToStr(XError));
|
||||
{$ENDIF}
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function CustomXIOErrorHandler(Display:PDisplay):longint;cdecl;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetInitialization;
|
||||
begin
|
||||
CreateWidgetset(TGtk2WidgetSet);
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors. Must be done after initializing GTK.
|
||||
XSetErrorHandler(@CustomX11ErrorHandler);
|
||||
XSetIOErrorHandler(@CustomXIOErrorHandler);
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetFinalization;
|
||||
|
@ -15,11 +15,29 @@ uses
|
||||
{$IFNDEF EnableLibOverlay}
|
||||
gtk2DisableLibOverlay,
|
||||
{$ENDIF}
|
||||
Gtk2Int, Forms;
|
||||
Gtk2Int, Forms, xlib;
|
||||
|
||||
function CustomX11ErrorHandler(Display:PDisplay; ErrorEv:PXErrorEvent):longint;cdecl;
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
XError := ErrorEv^.error_code;
|
||||
WriteLn('Error: ' + IntToStr(XError));
|
||||
{$ENDIF}
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function CustomXIOErrorHandler(Display:PDisplay):longint;cdecl;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetInitialization;
|
||||
begin
|
||||
CreateWidgetset(TGtk2WidgetSet);
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors. Must be done after initializing GTK.
|
||||
XSetErrorHandler(@CustomX11ErrorHandler);
|
||||
XSetIOErrorHandler(@CustomXIOErrorHandler);
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetFinalization;
|
||||
|
@ -15,11 +15,29 @@ uses
|
||||
{$IFNDEF EnableLibOverlay}
|
||||
gtk2DisableLibOverlay,
|
||||
{$ENDIF}
|
||||
Gtk2Int, Forms;
|
||||
Gtk2Int, Forms, xlib;
|
||||
|
||||
function CustomX11ErrorHandler(Display:PDisplay; ErrorEv:PXErrorEvent):longint;cdecl;
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
XError := ErrorEv^.error_code;
|
||||
WriteLn('Error: ' + IntToStr(XError));
|
||||
{$ENDIF}
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function CustomXIOErrorHandler(Display:PDisplay):longint;cdecl;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetInitialization;
|
||||
begin
|
||||
CreateWidgetset(TGtk2WidgetSet);
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors. Must be done after initializing GTK.
|
||||
XSetErrorHandler(@CustomX11ErrorHandler);
|
||||
XSetIOErrorHandler(@CustomXIOErrorHandler);
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetFinalization;
|
||||
|
@ -15,11 +15,29 @@ uses
|
||||
{$IFNDEF EnableLibOverlay}
|
||||
gtk2DisableLibOverlay,
|
||||
{$ENDIF}
|
||||
Gtk2Int, Forms;
|
||||
Gtk2Int, Forms, xlib;
|
||||
|
||||
function CustomX11ErrorHandler(Display:PDisplay; ErrorEv:PXErrorEvent):longint;cdecl;
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
XError := ErrorEv^.error_code;
|
||||
WriteLn('Error: ' + IntToStr(XError));
|
||||
{$ENDIF}
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function CustomXIOErrorHandler(Display:PDisplay):longint;cdecl;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetInitialization;
|
||||
begin
|
||||
CreateWidgetset(TGtk2WidgetSet);
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors. Must be done after initializing GTK.
|
||||
XSetErrorHandler(@CustomX11ErrorHandler);
|
||||
XSetIOErrorHandler(@CustomXIOErrorHandler);
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetFinalization;
|
||||
|
@ -15,11 +15,29 @@ uses
|
||||
{$IFNDEF EnableLibOverlay}
|
||||
gtk2DisableLibOverlay,
|
||||
{$ENDIF}
|
||||
Gtk2Int, Forms;
|
||||
Gtk2Int, Forms, xlib;
|
||||
|
||||
function CustomX11ErrorHandler(Display:PDisplay; ErrorEv:PXErrorEvent):longint;cdecl;
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
XError := ErrorEv^.error_code;
|
||||
WriteLn('Error: ' + IntToStr(XError));
|
||||
{$ENDIF}
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function CustomXIOErrorHandler(Display:PDisplay):longint;cdecl;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetInitialization;
|
||||
begin
|
||||
CreateWidgetset(TGtk2WidgetSet);
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors. Must be done after initializing GTK.
|
||||
XSetErrorHandler(@CustomX11ErrorHandler);
|
||||
XSetIOErrorHandler(@CustomXIOErrorHandler);
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetFinalization;
|
||||
|
@ -15,11 +15,29 @@ uses
|
||||
{$IFNDEF EnableLibOverlay}
|
||||
gtk2DisableLibOverlay,
|
||||
{$ENDIF}
|
||||
Gtk2Int, Forms;
|
||||
Gtk2Int, Forms, xlib;
|
||||
|
||||
function CustomX11ErrorHandler(Display:PDisplay; ErrorEv:PXErrorEvent):longint;cdecl;
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
XError := ErrorEv^.error_code;
|
||||
WriteLn('Error: ' + IntToStr(XError));
|
||||
{$ENDIF}
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function CustomXIOErrorHandler(Display:PDisplay):longint;cdecl;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetInitialization;
|
||||
begin
|
||||
CreateWidgetset(TGtk2WidgetSet);
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors. Must be done after initializing GTK.
|
||||
XSetErrorHandler(@CustomX11ErrorHandler);
|
||||
XSetIOErrorHandler(@CustomXIOErrorHandler);
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetFinalization;
|
||||
|
@ -15,11 +15,29 @@ uses
|
||||
{$IFNDEF EnableLibOverlay}
|
||||
gtk2DisableLibOverlay,
|
||||
{$ENDIF}
|
||||
Gtk2Int, Forms;
|
||||
Gtk2Int, Forms, xlib;
|
||||
|
||||
function CustomX11ErrorHandler(Display:PDisplay; ErrorEv:PXErrorEvent):longint;cdecl;
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
XError := ErrorEv^.error_code;
|
||||
WriteLn('Error: ' + IntToStr(XError));
|
||||
{$ENDIF}
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function CustomXIOErrorHandler(Display:PDisplay):longint;cdecl;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetInitialization;
|
||||
begin
|
||||
CreateWidgetset(TGtk2WidgetSet);
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors. Must be done after initializing GTK.
|
||||
XSetErrorHandler(@CustomX11ErrorHandler);
|
||||
XSetIOErrorHandler(@CustomXIOErrorHandler);
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetFinalization;
|
||||
|
@ -15,11 +15,29 @@ uses
|
||||
{$IFNDEF EnableLibOverlay}
|
||||
gtk2DisableLibOverlay,
|
||||
{$ENDIF}
|
||||
Gtk2Int, Forms;
|
||||
Gtk2Int, Forms, xlib;
|
||||
|
||||
function CustomX11ErrorHandler(Display:PDisplay; ErrorEv:PXErrorEvent):longint;cdecl;
|
||||
begin
|
||||
{$IFDEF DEBUG}
|
||||
XError := ErrorEv^.error_code;
|
||||
WriteLn('Error: ' + IntToStr(XError));
|
||||
{$ENDIF}
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function CustomXIOErrorHandler(Display:PDisplay):longint;cdecl;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetInitialization;
|
||||
begin
|
||||
CreateWidgetset(TGtk2WidgetSet);
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors. Must be done after initializing GTK.
|
||||
XSetErrorHandler(@CustomX11ErrorHandler);
|
||||
XSetIOErrorHandler(@CustomXIOErrorHandler);
|
||||
end;
|
||||
|
||||
procedure CustomWidgetSetFinalization;
|
||||
|
@ -342,6 +342,9 @@
|
||||
<DCCReference Include="..\source\uCEFPrintHandler.pas"/>
|
||||
<DCCReference Include="..\source\uCEFPrintDialogCallback.pas"/>
|
||||
<DCCReference Include="..\source\uCEFPrintJobCallback.pas"/>
|
||||
<DCCReference Include="..\source\uCEFLinuxConstants.pas"/>
|
||||
<DCCReference Include="..\source\uCEFLinuxTypes.pas"/>
|
||||
<DCCReference Include="..\source\uCEFLinuxFunctions.pas"/>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
|
@ -454,3 +454,15 @@
|
||||
{$DEFINE TARGET_32BITS}
|
||||
{$IFEND}
|
||||
|
||||
// Delphi uses MACOS for the new MacOSX and DARWIN is not defined
|
||||
// FPC uses DARWIN for the new MacOSX and MACOS is defined for the classic Macintosh OS (System 7)
|
||||
// We define MACOSX to avoid conflicts in both situations
|
||||
{$IFDEF FPC}
|
||||
{$IFDEF DARWIN}
|
||||
{$DEFINE MACOSX}
|
||||
{$IFEND}
|
||||
{$ELSE}
|
||||
{$IFDEF MACOS}
|
||||
{$DEFINE MACOSX}
|
||||
{$IFEND}
|
||||
{$IFEND}
|
||||
|
@ -21,7 +21,7 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
|
||||
<License Value="MPL 1.1"/>
|
||||
<Version Major="88" Minor="1" Release="6"/>
|
||||
<Version Major="88" Minor="2" Release="1"/>
|
||||
<Files Count="196">
|
||||
<Item1>
|
||||
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
||||
|
@ -65,14 +65,14 @@ uses
|
||||
|
||||
const
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 88;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 1;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 6;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 2;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 88;
|
||||
CEF_CHROMEELF_VERSION_MINOR = 0;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 4324;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 96;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 146;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
LIBCEF_DLL = 'libcef.dll';
|
||||
@ -1552,7 +1552,10 @@ begin
|
||||
if (CompareText(TempValue, 'utility') = 0) then
|
||||
Result := ptUtility
|
||||
else
|
||||
Result := ptOther;
|
||||
if (CompareText(TempValue, 'broker') = 0) then
|
||||
Result := ptBroker
|
||||
else
|
||||
Result := ptOther;
|
||||
end;
|
||||
|
||||
dec(i);
|
||||
@ -2159,7 +2162,7 @@ end;
|
||||
|
||||
function TCefApplicationCore.GetMustCreateResourceBundleHandler : boolean;
|
||||
begin
|
||||
Result := ((FSingleProcess or (FProcessType in [ptBrowser, ptRenderer])) and
|
||||
Result := ((FSingleProcess or (FProcessType in [ptBrowser, ptRenderer, ptZygote])) and
|
||||
(FMustCreateResourceBundleHandler or
|
||||
assigned(FOnGetLocalizedString) or
|
||||
assigned(FOnGetDataResource) or
|
||||
@ -2180,7 +2183,7 @@ end;
|
||||
|
||||
function TCefApplicationCore.GetMustCreateRenderProcessHandler : boolean;
|
||||
begin
|
||||
Result := ((FSingleProcess or (FProcessType = ptRenderer)) and
|
||||
Result := ((FSingleProcess or (FProcessType in [ptRenderer, ptZygote])) and
|
||||
(FMustCreateRenderProcessHandler or
|
||||
MustCreateLoadHandler or
|
||||
assigned(FOnWebKitInitialized) or
|
||||
@ -2195,7 +2198,7 @@ end;
|
||||
|
||||
function TCefApplicationCore.GetMustCreateLoadHandler : boolean;
|
||||
begin
|
||||
Result := ((FSingleProcess or (FProcessType = ptRenderer)) and
|
||||
Result := ((FSingleProcess or (FProcessType in [ptRenderer, ptZygote])) and
|
||||
(FMustCreateLoadHandler or
|
||||
assigned(FOnLoadingStateChange) or
|
||||
assigned(FOnLoadStart) or
|
||||
|
@ -915,7 +915,7 @@ begin
|
||||
begin
|
||||
TempMonitor := TempForm.Monitor;
|
||||
|
||||
if (TempMonitor <> nil) then
|
||||
if (TempMonitor <> nil) and (TempMonitor.PixelsPerInch > 0) then
|
||||
begin
|
||||
aResultScale := TempMonitor.PixelsPerInch / USER_DEFAULT_SCREEN_DPI;
|
||||
Result := True;
|
||||
|
@ -444,7 +444,7 @@ type
|
||||
// in the main thread before closing the browser.
|
||||
TCefCloseBrowserAction = (cbaClose, cbaDelay, cbaCancel);
|
||||
|
||||
TCefProcessType = (ptBrowser, ptRenderer, ptZygote, ptGPU, ptUtility, ptOther);
|
||||
TCefProcessType = (ptBrowser, ptRenderer, ptZygote, ptGPU, ptUtility, ptBroker, ptOther);
|
||||
|
||||
// Used in TChromium preferences to allow or block cookies.
|
||||
TCefCookiePref = (cpDefault, cpAllow, cpBlock);
|
||||
|
@ -2,9 +2,9 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 247,
|
||||
"InternalVersion" : 248,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "88.1.6.0"
|
||||
"Version" : "88.2.1.0"
|
||||
}
|
||||
],
|
||||
"UpdatePackageData" : {
|
||||
|
Loading…
Reference in New Issue
Block a user