1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-02 21:57:37 +02:00

Update to CEF 80.1.14

This commit is contained in:
Salvador Díaz Fau 2020-04-03 17:57:52 +02:00
parent 45db1a3ef9
commit c55283acb1
10 changed files with 110 additions and 101 deletions

View File

@ -3,10 +3,10 @@ CEF4Delphi is an open source project created by Salvador D
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 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 80.1.4 which includes Chromium 80.0.3987.149. CEF4Delphi uses CEF 80.1.14 which includes Chromium 80.0.3987.149.
The CEF binaries used by CEF4Delphi are available for download at spotify : The CEF binaries used by CEF4Delphi are available for download at spotify :
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_80.1.4%2Bg8927396%2Bchromium-80.0.3987.149_windows32.tar.bz2) * [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_80.1.14%2Bga33bdbc%2Bchromium-80.0.3987.149_windows32.tar.bz2)
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_80.1.4%2Bg8927396%2Bchromium-80.0.3987.149_windows64.tar.bz2) * [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_80.1.14%2Bga33bdbc%2Bchromium-80.0.3987.149_windows64.tar.bz2)
CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.6/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.6/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.

View File

@ -21,7 +21,7 @@
</CompilerOptions> </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."/> <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"/> <License Value="MPL 1.1"/>
<Version Major="80" Minor="1" Release="4"/> <Version Major="80" Minor="1" Release="14"/>
<Files Count="156"> <Files Count="156">
<Item1> <Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@ -62,7 +62,7 @@ uses
const const
CEF_SUPPORTED_VERSION_MAJOR = 80; CEF_SUPPORTED_VERSION_MAJOR = 80;
CEF_SUPPORTED_VERSION_MINOR = 1; CEF_SUPPORTED_VERSION_MINOR = 1;
CEF_SUPPORTED_VERSION_RELEASE = 4; CEF_SUPPORTED_VERSION_RELEASE = 14;
CEF_SUPPORTED_VERSION_BUILD = 0; CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = 80; CEF_CHROMEELF_VERSION_MAJOR = 80;

View File

@ -402,10 +402,10 @@ begin
end; end;
function TBufferPanel.CopyBuffer : boolean; function TBufferPanel.CopyBuffer : boolean;
{$IFDEF MSWINDOWS}
var var
{$IFDEF MSWINDOWS}
TempFunction : TBlendFunction; TempFunction : TBlendFunction;
{$ENDIF} {$ENDIF}
begin begin
Result := False; Result := False;

View File

@ -50,7 +50,8 @@ interface
uses uses
{$IFDEF DELPHI16_UP} {$IFDEF DELPHI16_UP}
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages, WinApi.ActiveX, WinApi.CommCtrl,{$ENDIF} System.Classes, System.SyncObjs, {$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages, WinApi.ActiveX, WinApi.CommCtrl,{$ENDIF}
System.Classes, System.SyncObjs, System.Types,
{$ELSE} {$ELSE}
{$IFDEF MSWINDOWS}Windows, ActiveX, CommCtrl,{$ENDIF} Classes, {$IFDEF MSWINDOWS}Windows, ActiveX, CommCtrl,{$ENDIF} Classes,
{$IFDEF FPC} {$IFDEF FPC}
@ -570,6 +571,7 @@ type
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
procedure InitializeDragAndDrop(const aDropTargetWnd : HWND); procedure InitializeDragAndDrop(const aDropTargetWnd : HWND);
procedure ShutdownDragAndDrop; procedure ShutdownDragAndDrop;
function SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
{$ENDIF MSWINDOWS} {$ENDIF MSWINDOWS}
function CreateBrowser(aParentHandle : TCefWindowHandle; aParentRect : TRect; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual; function CreateBrowser(aParentHandle : TCefWindowHandle; aParentRect : TRect; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual;
@ -611,7 +613,6 @@ type
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrameIdentifier : int64; aStartLine : integer = 0); overload; procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrameIdentifier : int64; aStartLine : integer = 0); overload;
procedure UpdatePreferences; procedure UpdatePreferences;
procedure SavePreferences(const aFileName : string); procedure SavePreferences(const aFileName : string);
function SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
procedure ResolveHost(const aURL : ustring); procedure ResolveHost(const aURL : ustring);
function IsSameBrowser(const aBrowser : ICefBrowser) : boolean; function IsSameBrowser(const aBrowser : ICefBrowser) : boolean;
function ExecuteTaskOnCefThread(aCefThreadId : TCefThreadId; aTaskID : cardinal; aDelayMs : Int64 = 0) : boolean; function ExecuteTaskOnCefThread(aCefThreadId : TCefThreadId; aTaskID : cardinal; aDelayMs : Int64 = 0) : boolean;
@ -687,77 +688,77 @@ type
procedure IMECancelComposition; procedure IMECancelComposition;
property DefaultUrl : ustring read FDefaultUrl write FDefaultUrl; property DefaultUrl : ustring read FDefaultUrl write FDefaultUrl;
property Options : TChromiumOptions read FOptions write FOptions; property Options : TChromiumOptions read FOptions write FOptions;
property FontOptions : TChromiumFontOptions read FFontOptions write FFontOptions; property FontOptions : TChromiumFontOptions read FFontOptions write FFontOptions;
property PDFPrintOptions : TPDFPrintOptions read FPDFPrintOptions write FPDFPrintOptions; property PDFPrintOptions : TPDFPrintOptions read FPDFPrintOptions write FPDFPrintOptions;
property DefaultEncoding : ustring read FDefaultEncoding write FDefaultEncoding; property DefaultEncoding : ustring read FDefaultEncoding write FDefaultEncoding;
property BrowserId : integer read FBrowserId; property BrowserId : integer read FBrowserId;
property Browser : ICefBrowser read FBrowser; property Browser : ICefBrowser read FBrowser;
property CefClient : ICefClient read FHandler; property CefClient : ICefClient read FHandler;
property ReqContextHandler : ICefRequestContextHandler read FReqContextHandler; property ReqContextHandler : ICefRequestContextHandler read FReqContextHandler;
property ResourceRequestHandler : ICefResourceRequestHandler read FResourceRequestHandler; property ResourceRequestHandler : ICefResourceRequestHandler read FResourceRequestHandler;
property CefWindowInfo : TCefWindowInfo read FWindowInfo; property CefWindowInfo : TCefWindowInfo read FWindowInfo;
property VisibleNavigationEntry : ICefNavigationEntry read GetVisibleNavigationEntry; property VisibleNavigationEntry : ICefNavigationEntry read GetVisibleNavigationEntry;
property MultithreadApp : boolean read GetMultithreadApp; property MultithreadApp : boolean read GetMultithreadApp;
property IsLoading : boolean read GetIsLoading; property IsLoading : boolean read GetIsLoading;
property HasDocument : boolean read GetHasDocument; property HasDocument : boolean read GetHasDocument;
property HasView : boolean read GetHasView; property HasView : boolean read GetHasView;
property HasDevTools : boolean read GetHasDevTools; property HasDevTools : boolean read GetHasDevTools;
property HasClientHandler : boolean read GetHasClientHandler; property HasClientHandler : boolean read GetHasClientHandler;
property HasBrowser : boolean read GetHasBrowser; property HasBrowser : boolean read GetHasBrowser;
property CanGoBack : boolean read GetCanGoBack; property CanGoBack : boolean read GetCanGoBack;
property CanGoForward : boolean read GetCanGoForward; property CanGoForward : boolean read GetCanGoForward;
property IsPopUp : boolean read GetIsPopUp; property IsPopUp : boolean read GetIsPopUp;
property WindowHandle : TCefWindowHandle read GetWindowHandle; property WindowHandle : TCefWindowHandle read GetWindowHandle;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
property BrowserHandle : THandle read FBrowserCompHWND; property BrowserHandle : THandle read FBrowserCompHWND;
property WidgetHandle : THandle read FWidgetCompHWND; property WidgetHandle : THandle read FWidgetCompHWND;
property RenderHandle : THandle read FRenderCompHWND; property RenderHandle : THandle read FRenderCompHWND;
{$ENDIF} {$ENDIF}
property FrameIsFocused : boolean read GetFrameIsFocused; property FrameIsFocused : boolean read GetFrameIsFocused;
property Initialized : boolean read GetInitialized; property Initialized : boolean read GetInitialized;
property RequestContextCache : ustring read GetRequestContextCache; property RequestContextCache : ustring read GetRequestContextCache;
property RequestContextIsGlobal : boolean read GetRequestContextIsGlobal; property RequestContextIsGlobal : boolean read GetRequestContextIsGlobal;
property DocumentURL : ustring read GetDocumentURL; property DocumentURL : ustring read GetDocumentURL;
property ZoomLevel : double read GetZoomLevel write SetZoomLevel; property ZoomLevel : double read GetZoomLevel write SetZoomLevel;
property ZoomPct : double read GetZoomPct write SetZoomPct; property ZoomPct : double read GetZoomPct write SetZoomPct;
property ZoomStep : byte read GetZoomStep write SetZoomStep; property ZoomStep : byte read GetZoomStep write SetZoomStep;
property WindowlessFrameRate : integer read GetWindowlessFrameRate write SetWindowlessFrameRate; property WindowlessFrameRate : integer read GetWindowlessFrameRate write SetWindowlessFrameRate;
property CustomHeaderName : ustring read FCustomHeaderName write SetCustomHeaderName; property CustomHeaderName : ustring read FCustomHeaderName write SetCustomHeaderName;
property CustomHeaderValue : ustring read FCustomHeaderValue write SetCustomHeaderValue; property CustomHeaderValue : ustring read FCustomHeaderValue write SetCustomHeaderValue;
property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack; property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack;
property SendReferrer : boolean read FSendReferrer write SetSendReferrer; property SendReferrer : boolean read FSendReferrer write SetSendReferrer;
property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing; property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing;
property RunAllFlashInAllowMode : boolean read FRunAllFlashInAllowMode write SetRunAllFlashInAllowMode; property RunAllFlashInAllowMode : boolean read FRunAllFlashInAllowMode write SetRunAllFlashInAllowMode;
property AllowOutdatedPlugins : boolean read FAllowOutdatedPlugins write SetAllowOutdatedPlugins; property AllowOutdatedPlugins : boolean read FAllowOutdatedPlugins write SetAllowOutdatedPlugins;
property AlwaysAuthorizePlugins : boolean read FAlwaysAuthorizePlugins write SetAlwaysAuthorizePlugins; property AlwaysAuthorizePlugins : boolean read FAlwaysAuthorizePlugins write SetAlwaysAuthorizePlugins;
property SpellChecking : boolean read FSpellChecking write SetSpellChecking; property SpellChecking : boolean read FSpellChecking write SetSpellChecking;
property SpellCheckerDicts : ustring read FSpellCheckerDicts write SetSpellCheckerDicts; property SpellCheckerDicts : ustring read FSpellCheckerDicts write SetSpellCheckerDicts;
property HasValidMainFrame : boolean read GetHasValidMainFrame; property HasValidMainFrame : boolean read GetHasValidMainFrame;
property FrameCount : NativeUInt read GetFrameCount; property FrameCount : NativeUInt read GetFrameCount;
property DragOperations : TCefDragOperations read FDragOperations write FDragOperations; property DragOperations : TCefDragOperations read FDragOperations write FDragOperations;
property AudioMuted : boolean read GetAudioMuted write SetAudioMuted; property AudioMuted : boolean read GetAudioMuted write SetAudioMuted;
property SafeSearch : boolean read FSafeSearch write SetSafeSearch; property SafeSearch : boolean read FSafeSearch write SetSafeSearch;
property YouTubeRestrict : integer read FYouTubeRestrict write SetYouTubeRestrict; property YouTubeRestrict : integer read FYouTubeRestrict write SetYouTubeRestrict;
property PrintingEnabled : boolean read FPrintingEnabled write SetPrintingEnabled; property PrintingEnabled : boolean read FPrintingEnabled write SetPrintingEnabled;
property AcceptLanguageList : ustring read FAcceptLanguageList write SetAcceptLanguageList; property AcceptLanguageList : ustring read FAcceptLanguageList write SetAcceptLanguageList;
property AcceptCookies : TCefCookiePref read FAcceptCookies write SetAcceptCookies; property AcceptCookies : TCefCookiePref read FAcceptCookies write SetAcceptCookies;
property Block3rdPartyCookies : boolean read FBlock3rdPartyCookies write SetBlock3rdPartyCookies; property Block3rdPartyCookies : boolean read FBlock3rdPartyCookies write SetBlock3rdPartyCookies;
property WebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy read FWebRTCIPHandlingPolicy write SetWebRTCIPHandlingPolicy; property WebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy read FWebRTCIPHandlingPolicy write SetWebRTCIPHandlingPolicy;
property WebRTCMultipleRoutes : TCefState read FWebRTCMultipleRoutes write SetWebRTCMultipleRoutes; property WebRTCMultipleRoutes : TCefState read FWebRTCMultipleRoutes write SetWebRTCMultipleRoutes;
property WebRTCNonproxiedUDP : TCefState read FWebRTCNonProxiedUDP write SetWebRTCNonProxiedUDP; property WebRTCNonproxiedUDP : TCefState read FWebRTCNonProxiedUDP write SetWebRTCNonProxiedUDP;
property ProxyType : integer read FProxyType write SetProxyType; property ProxyType : integer read FProxyType write SetProxyType;
property ProxyScheme : TCefProxyScheme read FProxyScheme write SetProxyScheme; property ProxyScheme : TCefProxyScheme read FProxyScheme write SetProxyScheme;
property ProxyServer : ustring read FProxyServer write SetProxyServer; property ProxyServer : ustring read FProxyServer write SetProxyServer;
property ProxyPort : integer read FProxyPort write SetProxyPort; property ProxyPort : integer read FProxyPort write SetProxyPort;
property ProxyUsername : ustring read FProxyUsername write SetProxyUsername; property ProxyUsername : ustring read FProxyUsername write SetProxyUsername;
property ProxyPassword : ustring read FProxyPassword write SetProxyPassword; property ProxyPassword : ustring read FProxyPassword write SetProxyPassword;
property ProxyScriptURL : ustring read FProxyScriptURL write SetProxyScriptURL; property ProxyScriptURL : ustring read FProxyScriptURL write SetProxyScriptURL;
property ProxyByPassList : ustring read FProxyByPassList write SetProxyByPassList; property ProxyByPassList : ustring read FProxyByPassList write SetProxyByPassList;
property MaxConnectionsPerProxy : integer read FMaxConnectionsPerProxy write SetMaxConnectionsPerProxy; property MaxConnectionsPerProxy : integer read FMaxConnectionsPerProxy write SetMaxConnectionsPerProxy;
published published
property OnTextResultAvailable : TOnTextResultAvailableEvent read FOnTextResultAvailable write FOnTextResultAvailable; property OnTextResultAvailable : TOnTextResultAvailableEvent read FOnTextResultAvailable write FOnTextResultAvailable;
@ -1464,7 +1465,7 @@ begin
(FBrowserId = 0) and (FBrowserId = 0) and
(GlobalCEFApp <> nil) and (GlobalCEFApp <> nil) and
GlobalCEFApp.GlobalContextInitialized and GlobalCEFApp.GlobalContextInitialized and
CreateClientHandler(aParentHandle = 0) then CreateClientHandler(not(ValidCefWindowHandle(aParentHandle))) then
begin begin
GetSettings(FBrowserSettings); GetSettings(FBrowserSettings);
InitializeWindowInfo(aParentHandle, aParentRect, aWindowName); InitializeWindowInfo(aParentHandle, aParentRect, aWindowName);
@ -1519,13 +1520,12 @@ procedure TChromiumCore.DefaultInitializeDevToolsWindowInfo( aDevToolsWnd :
const aClientRect : TRect; const aClientRect : TRect;
const aWindowName : ustring); const aWindowName : ustring);
begin begin
if (ValidCefWindowHandle(aDevToolsWnd)) then
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
if (aDevToolsWnd <> 0) then
WindowInfoAsChild(FDevWindowInfo, aDevToolsWnd, aClientRect, aWindowName) WindowInfoAsChild(FDevWindowInfo, aDevToolsWnd, aClientRect, aWindowName)
else else
WindowInfoAsPopUp(FDevWindowInfo, WindowHandle, DEVTOOLS_WINDOWNAME); WindowInfoAsPopUp(FDevWindowInfo, WindowHandle, DEVTOOLS_WINDOWNAME);
{$ELSE} {$ELSE}
if (aDevToolsWnd <> 0) then
WindowInfoAsChild(FDevWindowInfo, aDevToolsWnd, aClientRect) WindowInfoAsChild(FDevWindowInfo, aDevToolsWnd, aClientRect)
else else
WindowInfoAsPopUp(FDevWindowInfo, WindowHandle); WindowInfoAsPopUp(FDevWindowInfo, WindowHandle);
@ -3119,22 +3119,20 @@ begin
end; end;
end; end;
function TChromiumCore.SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
function TChromiumCore.SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
var var
TempHandle : HWND; TempHandle : HWND;
{$ENDIF}
begin begin
Result := False; Result := False;
{$IFDEF MSWINDOWS}
if Initialized then if Initialized then
begin begin
TempHandle := FBrowser.Host.WindowHandle; TempHandle := FBrowser.Host.WindowHandle;
Result := (TempHandle <> 0) and (SetParent(TempHandle, aNewParentHwnd) <> 0); Result := (TempHandle <> 0) and (SetParent(TempHandle, aNewParentHwnd) <> 0);
end; end;
{$ENDIF}
end; end;
{$ENDIF}
procedure TChromiumCore.ResolveHost(const aURL : ustring); procedure TChromiumCore.ResolveHost(const aURL : ustring);
var var

View File

@ -424,8 +424,7 @@ const
UU_SPACES = 1 shl 1; UU_SPACES = 1 shl 1;
UU_PATH_SEPARATORS = 1 shl 2; UU_PATH_SEPARATORS = 1 shl 2;
UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 shl 3; UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 shl 3;
UU_SPOOFING_AND_CONTROL_CHARS = 1 shl 4; UU_REPLACE_PLUS_WITH_SPACE = 1 shl 4;
UU_REPLACE_PLUS_WITH_SPACE = 1 shl 5;
// /include/internal/cef_types.h (cef_menu_id_t) // /include/internal/cef_types.h (cef_menu_id_t)
MENU_ID_BACK = 100; MENU_ID_BACK = 100;
@ -630,9 +629,8 @@ const
CEF_IMAGE_FILE_MACHINE_I386 = $014C; CEF_IMAGE_FILE_MACHINE_I386 = $014C;
CEF_IMAGE_FILE_MACHINE_AMD64 = $8664; CEF_IMAGE_FILE_MACHINE_AMD64 = $8664;
{$IFDEF FPC}
USER_DEFAULT_SCREEN_DPI = 96; USER_DEFAULT_SCREEN_DPI = 96;
{$ENDIF}
implementation implementation
end. end.

View File

@ -377,14 +377,18 @@ begin
end; end;
function TFMXBufferPanel.GetScreenScale : Single; function TFMXBufferPanel.GetScreenScale : Single;
{$IFDEF MSWINDOWS}
var var
TempHandle : TCefWindowHandle; TempHandle : TCefWindowHandle;
{$ENDIF}
begin begin
{$IFDEF MSWINDOWS}
TempHandle := GetParentFormHandle; TempHandle := GetParentFormHandle;
if (TempHandle <> 0) then if (TempHandle <> 0) then
Result := GetWndScale(TempHandle) Result := GetWndScale(TempHandle)
else else
{$ENDIF}
if (GlobalCEFApp <> nil) then if (GlobalCEFApp <> nil) then
Result := GlobalCEFApp.DeviceScaleFactor Result := GlobalCEFApp.DeviceScaleFactor
else else

View File

@ -565,12 +565,12 @@ type
procedure SetAudioMuted(mute: boolean); procedure SetAudioMuted(mute: boolean);
function IsAudioMuted : boolean; function IsAudioMuted : boolean;
property Browser : ICefBrowser read GetBrowser; property Browser : ICefBrowser read GetBrowser;
property WindowHandle : TCefWindowHandle read GetWindowHandle; property WindowHandle : TCefWindowHandle read GetWindowHandle;
property OpenerWindowHandle : TCefWindowHandle read GetOpenerWindowHandle; property OpenerWindowHandle : TCefWindowHandle read GetOpenerWindowHandle;
property ZoomLevel : Double read GetZoomLevel write SetZoomLevel; property ZoomLevel : Double read GetZoomLevel write SetZoomLevel;
property RequestContext : ICefRequestContext read GetRequestContext; property RequestContext : ICefRequestContext read GetRequestContext;
property VisibleNavigationEntry : ICefNavigationEntry read GetVisibleNavigationEntry; property VisibleNavigationEntry : ICefNavigationEntry read GetVisibleNavigationEntry;
end; end;
// TCefProcessMessage // TCefProcessMessage

View File

@ -53,11 +53,12 @@ uses
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
WinApi.Windows, WinApi.ActiveX, {$IFDEF FMX}FMX.Types,{$ENDIF} WinApi.Windows, WinApi.ActiveX, {$IFDEF FMX}FMX.Types,{$ENDIF}
{$ELSE} {$ELSE}
System.Types, {$IFDEF FMX}FMX.Types,{$ENDIF} {$IFDEF MACOS}Macapi.Foundation, FMX.Helpers.Mac,{$ENDIF} {$IFDEF FMX}FMX.Types,{$ENDIF} {$IFDEF MACOS}Macapi.Foundation, FMX.Helpers.Mac,{$ENDIF}
{$ENDIF} {$ENDIF}
System.IOUtils, System.Classes, System.SysUtils, System.UITypes, System.Math, System.Types, System.IOUtils, System.Classes, System.SysUtils, System.UITypes, System.Math,
{$ELSE} {$ELSE}
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} Classes, SysUtils, Math, {$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF}
{$IFDEF DELPHI14_UP}Types, IOUtils,{$ENDIF} Classes, SysUtils, Math,
{$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase, Forms,{$ENDIF}{$ENDIF} {$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase, Forms,{$ENDIF}{$ENDIF}
{$ENDIF} {$ENDIF}
uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler, uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler,
@ -295,14 +296,13 @@ function MoveFileList(const aFileList : TStringList; const aSrcDirectory, aDstDi
function CefGetDataURI(const aString, aMimeType : ustring) : ustring; overload; function CefGetDataURI(const aString, aMimeType : ustring) : ustring; overload;
function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustring; const aCharset : ustring = '') : ustring; overload; function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustring; const aCharset : ustring = '') : ustring; overload;
function ValidCefWindowHandle(aHandle : TCefWindowHandle) : boolean;
implementation implementation
uses uses
{$IFDEF DELPHI16_UP} {$IFNDEF DELPHI16_UP}
System.Types,
{$ELSE}
{$IFDEF DELPHI14_UP}Types,{$ENDIF} {$IFDEF DELPHI14_UP}Types,{$ENDIF}
{$ENDIF} {$ENDIF}
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue, uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
@ -2334,4 +2334,13 @@ begin
Result := Result + ';base64,' + CefURIEncode(CefBase64Encode(aData, aSize), false); Result := Result + ';base64,' + CefURIEncode(CefBase64Encode(aData, aSize), false);
end; end;
function ValidCefWindowHandle(aHandle : TCefWindowHandle) : boolean;
begin
{$IFDEF MACOS}
Result := (aHandle <> nil);
{$ELSE}
Result := (aHandle <> 0);
{$ENDIF}
end;
end. end.

View File

@ -2,9 +2,9 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 112, "InternalVersion" : 113,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "80.1.4.0" "Version" : "80.1.14.0"
} }
], ],
"UpdatePackageData" : { "UpdatePackageData" : {