mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Update to CEF 97.1.1
This commit is contained in:
parent
9b3b8feefa
commit
2ef6568a3f
16
README.md
16
README.md
@ -3,16 +3,16 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
|
||||
|
||||
CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
|
||||
|
||||
CEF4Delphi uses CEF 96.0.18 which includes Chromium 96.0.4664.110.
|
||||
CEF4Delphi uses CEF 97.1.1 which includes Chromium 97.0.4692.71.
|
||||
|
||||
The CEF binaries used by CEF4Delphi are available for download at Spotify :
|
||||
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_96.0.18%2Bgfe551e4%2Bchromium-96.0.4664.110_windows32.tar.bz2)
|
||||
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_96.0.18%2Bgfe551e4%2Bchromium-96.0.4664.110_windows64.tar.bz2)
|
||||
* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_96.0.18%2Bgfe551e4%2Bchromium-96.0.4664.110_linux32.tar.bz2)
|
||||
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_96.0.18%2Bgfe551e4%2Bchromium-96.0.4664.110_linux64.tar.bz2)
|
||||
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_96.0.18%2Bgfe551e4%2Bchromium-96.0.4664.110_linuxarm.tar.bz2)
|
||||
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_96.0.18%2Bgfe551e4%2Bchromium-96.0.4664.110_linuxarm64.tar.bz2)
|
||||
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_96.0.18%2Bgfe551e4%2Bchromium-96.0.4664.110_macosx64.tar.bz2)
|
||||
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_97.1.1%2Bg50067f2%2Bchromium-97.0.4692.71_windows32.tar.bz2)
|
||||
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_97.1.1%2Bg50067f2%2Bchromium-97.0.4692.71_windows64.tar.bz2)
|
||||
* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_97.1.1%2Bg50067f2%2Bchromium-97.0.4692.71_linux32.tar.bz2)
|
||||
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_97.1.1%2Bg50067f2%2Bchromium-97.0.4692.71_linux64.tar.bz2)
|
||||
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_97.1.1%2Bg50067f2%2Bchromium-97.0.4692.71_linuxarm.tar.bz2)
|
||||
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_97.1.1%2Bg50067f2%2Bchromium-97.0.4692.71_linuxarm64.tar.bz2)
|
||||
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_97.1.1%2Bg50067f2%2Bchromium-97.0.4692.71_macosx64.tar.bz2)
|
||||
|
||||
CEF4Delphi was developed and tested on Delphi 11.0 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3, Delphi 10.4 and Lazarus 2.2.0/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
||||
|
||||
|
@ -291,7 +291,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
OnBeforeResourceLoad = Chromium1BeforeResourceLoad
|
||||
OnResourceResponse = Chromium1ResourceResponse
|
||||
OnFileDialog = Chromium1FileDialog
|
||||
OnBeforePluginLoad = Chromium1BeforePluginLoad
|
||||
OnDevToolsMethodResult = Chromium1DevToolsMethodResult
|
||||
Left = 32
|
||||
Top = 224
|
||||
|
@ -177,7 +177,6 @@ type
|
||||
procedure Chromium1NavigationVisitorResultAvailable(Sender: TObject; const entry: ICefNavigationEntry; current: Boolean; index, total: Integer; var aResult: Boolean);
|
||||
procedure Chromium1DownloadImageFinished(Sender: TObject; const imageUrl: ustring; httpStatusCode: Integer; const image: ICefImage);
|
||||
procedure Chromium1CookiesFlushed(Sender: TObject);
|
||||
procedure Chromium1BeforePluginLoad(Sender: TObject; const mimeType, pluginUrl: ustring; isMainFrame: Boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy; var aResult: Boolean);
|
||||
procedure Chromium1ZoomPctAvailable(Sender: TObject; const aZoomPct: Double);
|
||||
procedure Chromium1DevToolsMethodResult(Sender: TObject; const browser: ICefBrowser; message_id: Integer; success: Boolean; const result: ICefValue);
|
||||
procedure Chromium1FileDialog(Sender: TObject; const browser: ICefBrowser; mode: Cardinal; const title, defaultFilePath: ustring; const acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback; out Result: Boolean);
|
||||
@ -462,22 +461,6 @@ begin
|
||||
callback.cont(TempFullPath, True);
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.Chromium1BeforePluginLoad(Sender: TObject;
|
||||
const mimeType, pluginUrl: ustring; isMainFrame: Boolean;
|
||||
const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo;
|
||||
var pluginPolicy: TCefPluginPolicy; var aResult: Boolean);
|
||||
begin
|
||||
// Always allow the PDF plugin to load.
|
||||
if (pluginPolicy <> PLUGIN_POLICY_ALLOW) and
|
||||
(CompareText(mimeType, 'application/pdf') = 0) then
|
||||
begin
|
||||
pluginPolicy := PLUGIN_POLICY_ALLOW;
|
||||
aResult := True;
|
||||
end
|
||||
else
|
||||
aResult := False;
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.Chromium1BeforeResourceLoad(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const request: ICefRequest; const callback: ICefCallback;
|
||||
|
@ -1,10 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<Version Value="12"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="MiniBrowser"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
@ -23,7 +25,6 @@
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
@ -65,6 +66,9 @@
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf3"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
|
Binary file not shown.
@ -15,7 +15,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '2.0.12.0'
|
||||
LCLVersion = '2.2.0.4'
|
||||
object NavControlPnl: TPanel
|
||||
Left = 0
|
||||
Height = 25
|
||||
@ -240,7 +240,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
OnAfterCreated = Chromium1AfterCreated
|
||||
OnBeforeClose = Chromium1BeforeClose
|
||||
OnClose = Chromium1Close
|
||||
OnBeforePluginLoad = Chromium1BeforePluginLoad
|
||||
OnPrintStart = Chromium1PrintStart
|
||||
OnPrintSettings = Chromium1PrintSettings
|
||||
OnPrintDialog = Chromium1PrintDialog
|
||||
|
@ -98,7 +98,6 @@ type
|
||||
procedure Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser; var aAction : TCefCloseBrowserAction);
|
||||
procedure Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
procedure Chromium1BeforePluginLoad(Sender: TObject; const mimeType, pluginUrl: ustring; isMainFrame: boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy; var aResult: boolean);
|
||||
procedure Chromium1GetPDFPaperSize(Sender: TObject; const browser: ICefBrowser; deviceUnitsPerInch: Integer; var aResult: TCefSize);
|
||||
procedure Chromium1GotFocus(Sender: TObject; const browser: ICefBrowser);
|
||||
procedure Chromium1Jsdialog(Sender: TObject; const browser: ICefBrowser; const originUrl: ustring; dialogType: TCefJsDialogType; const messageText, defaultPromptText: ustring; const callback: ICefJsDialogCallback; out suppressMessage: Boolean; out Result: Boolean);
|
||||
@ -904,22 +903,6 @@ begin
|
||||
SendCompMessage(CEF_UPDATETITLE);
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.Chromium1BeforePluginLoad(Sender: TObject;
|
||||
const mimeType, pluginUrl: ustring; isMainFrame: boolean;
|
||||
const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo;
|
||||
var pluginPolicy: TCefPluginPolicy; var aResult: boolean);
|
||||
begin
|
||||
// Always allow the PDF plugin to load.
|
||||
if (pluginPolicy <> PLUGIN_POLICY_ALLOW) and
|
||||
(CompareText(mimeType, 'application/pdf') = 0) then
|
||||
begin
|
||||
pluginPolicy := PLUGIN_POLICY_ALLOW;
|
||||
aResult := True;
|
||||
end
|
||||
else
|
||||
aResult := False;
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.Chromium1GetPDFPaperSize(Sender: TObject;
|
||||
const browser: ICefBrowser; deviceUnitsPerInch: Integer; var aResult: TCefSize
|
||||
);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
@ -9,9 +9,9 @@
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
<MainUnitHasScaledStatement Value="False"/>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="MiniBrowser"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
<ResourceType Value="res"/>
|
||||
@ -25,7 +25,6 @@
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
|
@ -15,7 +15,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '2.0.12.0'
|
||||
LCLVersion = '2.2.0.4'
|
||||
object Splitter1: TSplitter
|
||||
Left = 1179
|
||||
Height = 663
|
||||
@ -265,7 +265,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
OnCertificateError = Chromium1CertificateError
|
||||
OnBeforeResourceLoad = Chromium1BeforeResourceLoad
|
||||
OnResourceResponse = Chromium1ResourceResponse
|
||||
OnBeforePluginLoad = Chromium1BeforePluginLoad
|
||||
OnDevToolsMethodResult = Chromium1DevToolsMethodResult
|
||||
Left = 32
|
||||
Top = 224
|
||||
|
@ -130,10 +130,6 @@ type
|
||||
N5: TMenuItem;
|
||||
Memoryinfo1: TMenuItem;
|
||||
procedure CEFWindowParent1DragDrop(Sender, Source: TObject; X, Y: Integer);
|
||||
procedure Chromium1BeforePluginLoad(Sender: TObject; const mimeType,
|
||||
pluginUrl: ustring; isMainFrame: boolean; const topOriginUrl: ustring;
|
||||
const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy;
|
||||
var aResult: boolean);
|
||||
procedure Chromium1CookiesFlushed(Sender: TObject);
|
||||
procedure Chromium1DevToolsMethodResult(Sender: TObject;
|
||||
const browser: ICefBrowser; message_id: integer; success: boolean;
|
||||
@ -1175,22 +1171,6 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.Chromium1BeforePluginLoad(Sender: TObject;
|
||||
const mimeType, pluginUrl: ustring; isMainFrame: boolean;
|
||||
const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo;
|
||||
var pluginPolicy: TCefPluginPolicy; var aResult: boolean);
|
||||
begin
|
||||
// Always allow the PDF plugin to load.
|
||||
if (pluginPolicy <> PLUGIN_POLICY_ALLOW) and
|
||||
(CompareText(mimeType, 'application/pdf') = 0) then
|
||||
begin
|
||||
pluginPolicy := PLUGIN_POLICY_ALLOW;
|
||||
aResult := True;
|
||||
end
|
||||
else
|
||||
aResult := False;
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.CookiesFlushedMsg(var aMessage : TMessage);
|
||||
begin
|
||||
showmessage('The cookies were flushed successfully');
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<Package Version="5">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="CEF4Delphi_Lazarus"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
@ -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="96" Release="18"/>
|
||||
<Version Major="97" Minor="1" Release="1"/>
|
||||
<Files Count="203">
|
||||
<Item1>
|
||||
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
||||
@ -854,6 +854,7 @@
|
||||
<UnitName Value="uCEFFileDialogInfo"/>
|
||||
</Item203>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<RequiredPkgs Count="5">
|
||||
<Item1>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
|
@ -64,15 +64,15 @@ uses
|
||||
uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar;
|
||||
|
||||
const
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 96;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 0;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 18;
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 97;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 1;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 96;
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 97;
|
||||
CEF_CHROMEELF_VERSION_MINOR = 0;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 4664;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 110;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 4692;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 71;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
LIBCEF_DLL = 'libcef.dll';
|
||||
|
@ -268,7 +268,6 @@ type
|
||||
|
||||
// ICefRequestContextHandler
|
||||
FOnRequestContextInitialized : TOnRequestContextInitialized;
|
||||
FOnBeforePluginLoad : TOnBeforePluginLoad;
|
||||
FOnGetResourceRequestHandler_ReqCtxHdlr : TOnGetResourceRequestHandler;
|
||||
|
||||
// ICefMediaObserver
|
||||
@ -605,7 +604,6 @@ type
|
||||
|
||||
// ICefRequestContextHandler
|
||||
procedure doOnRequestContextInitialized(const request_context: ICefRequestContext); virtual;
|
||||
function doOnBeforePluginLoad(const mimeType, pluginUrl:ustring; isMainFrame : boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy): Boolean; virtual;
|
||||
procedure doGetResourceRequestHandler_ReqCtxHdlr(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; is_navigation, is_download: boolean; const request_initiator: ustring; var disable_default_handling: boolean; var aResourceRequestHandler : ICefResourceRequestHandler); virtual;
|
||||
|
||||
// ICefMediaObserver
|
||||
@ -1089,7 +1087,6 @@ type
|
||||
|
||||
// ICefRequestContextHandler
|
||||
property OnRequestContextInitialized : TOnRequestContextInitialized read FOnRequestContextInitialized write FOnRequestContextInitialized;
|
||||
property OnBeforePluginLoad : TOnBeforePluginLoad read FOnBeforePluginLoad write FOnBeforePluginLoad;
|
||||
property OnGetResourceRequestHandler_ReqCtxHdlr : TOnGetResourceRequestHandler read FOnGetResourceRequestHandler_ReqCtxHdlr write FOnGetResourceRequestHandler_ReqCtxHdlr;
|
||||
|
||||
// ICefMediaObserver
|
||||
@ -1809,7 +1806,6 @@ begin
|
||||
|
||||
// ICefRequestContextHandler
|
||||
FOnRequestContextInitialized := nil;
|
||||
FOnBeforePluginLoad := nil;
|
||||
FOnGetResourceRequestHandler_ReqCtxHdlr := nil;
|
||||
|
||||
// ICefMediaObserver
|
||||
@ -5490,19 +5486,6 @@ begin
|
||||
FOnRequestContextInitialized(self, request_context);
|
||||
end;
|
||||
|
||||
function TChromiumCore.doOnBeforePluginLoad(const mimeType : ustring;
|
||||
const pluginUrl : ustring;
|
||||
isMainFrame : boolean;
|
||||
const topOriginUrl : ustring;
|
||||
const pluginInfo : ICefWebPluginInfo;
|
||||
var pluginPolicy : TCefPluginPolicy): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if assigned(FOnBeforePluginLoad) then
|
||||
FOnBeforePluginLoad(self, mimeType, pluginUrl, isMainFrame, topOriginUrl, pluginInfo, pluginPolicy, Result);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.doGetResourceRequestHandler_ReqCtxHdlr(const browser : ICefBrowser;
|
||||
const frame : ICefFrame;
|
||||
const request : ICefRequest;
|
||||
|
@ -164,7 +164,6 @@ type
|
||||
|
||||
// ICefRequestContextHandler
|
||||
TOnRequestContextInitialized = procedure(Sender: TObject; const request_context: ICefRequestContext) of Object;
|
||||
TOnBeforePluginLoad = procedure(Sender: TObject; const mimeType, pluginUrl:ustring; isMainFrame : boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy; var aResult : boolean) of Object;
|
||||
// ICefRequestContextHandler uses the same TOnGetResourceRequestHandler event type defined for ICefRequestHandler
|
||||
|
||||
// ICefMediaObserver
|
||||
|
@ -418,7 +418,6 @@ type
|
||||
|
||||
// ICefRequestContextHandler
|
||||
procedure doOnRequestContextInitialized(const request_context: ICefRequestContext);
|
||||
function doOnBeforePluginLoad(const mimeType, pluginUrl:ustring; isMainFrame : boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy): Boolean;
|
||||
procedure doGetResourceRequestHandler_ReqCtxHdlr(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; is_navigation, is_download: boolean; const request_initiator: ustring; var disable_default_handling: boolean; var aResourceRequestHandler : ICefResourceRequestHandler);
|
||||
|
||||
// ICefMediaObserver
|
||||
@ -2222,7 +2221,6 @@ type
|
||||
ICefRequestContextHandler = interface(ICefBaseRefCounted)
|
||||
['{76EB1FA7-78DF-4FD5-ABB3-1CDD3E73A140}']
|
||||
procedure OnRequestContextInitialized(const request_context: ICefRequestContext);
|
||||
function OnBeforePluginLoad(const mimeType, pluginUrl:ustring; isMainFrame : boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy): Boolean;
|
||||
procedure GetResourceRequestHandler(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; is_navigation, is_download: boolean; const request_initiator: ustring; var disable_default_handling: boolean; var aResourceRequestHandler : ICefResourceRequestHandler);
|
||||
|
||||
procedure RemoveReferences; // custom procedure to clear all references
|
||||
@ -2248,7 +2246,6 @@ type
|
||||
function GetCookieManagerProc(const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
||||
function RegisterSchemeHandlerFactory(const schemeName, domainName: ustring; const factory: ICefSchemeHandlerFactory): Boolean;
|
||||
function ClearSchemeHandlerFactories: Boolean;
|
||||
procedure PurgePluginListCache(reloadPages: Boolean);
|
||||
function HasPreference(const name: ustring): Boolean;
|
||||
function GetPreference(const name: ustring): ICefValue;
|
||||
function GetAllPreferences(includeDefaults: Boolean): ICefDictionaryValue;
|
||||
|
@ -68,7 +68,6 @@ type
|
||||
function GetCookieManagerProc(const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
||||
function RegisterSchemeHandlerFactory(const schemeName, domainName: ustring; const factory: ICefSchemeHandlerFactory): Boolean;
|
||||
function ClearSchemeHandlerFactories: Boolean;
|
||||
procedure PurgePluginListCache(reloadPages: Boolean);
|
||||
function HasPreference(const name: ustring): Boolean;
|
||||
function GetPreference(const name: ustring): ICefValue;
|
||||
function GetAllPreferences(includeDefaults: Boolean): ICefDictionaryValue;
|
||||
@ -194,11 +193,6 @@ begin
|
||||
Result := UnWrap(cef_request_context_create_context(@TempSettings, CefGetData(handler)));
|
||||
end;
|
||||
|
||||
procedure TCefRequestContextRef.PurgePluginListCache(reloadPages: Boolean);
|
||||
begin
|
||||
PCefRequestContext(FData)^.purge_plugin_list_cache(PCefRequestContext(FData), Ord(reloadPages));
|
||||
end;
|
||||
|
||||
function TCefRequestContextRef.HasPreference(const name: ustring): Boolean;
|
||||
var
|
||||
TempName : TCefString;
|
||||
|
@ -60,7 +60,6 @@ type
|
||||
TCefRequestContextHandlerRef = class(TCefBaseRefCountedRef, ICefRequestContextHandler)
|
||||
protected
|
||||
procedure OnRequestContextInitialized(const request_context: ICefRequestContext);
|
||||
function OnBeforePluginLoad(const mimeType, pluginUrl: ustring; isMainFrame : boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy): Boolean;
|
||||
procedure GetResourceRequestHandler(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; is_navigation, is_download: boolean; const request_initiator: ustring; var disable_default_handling: boolean; var aResourceRequestHandler : ICefResourceRequestHandler);
|
||||
|
||||
procedure RemoveReferences; virtual;
|
||||
@ -72,7 +71,6 @@ type
|
||||
TCefRequestContextHandlerOwn = class(TCefBaseRefCountedOwn, ICefRequestContextHandler)
|
||||
protected
|
||||
procedure OnRequestContextInitialized(const request_context: ICefRequestContext); virtual;
|
||||
function OnBeforePluginLoad(const mimeType, pluginUrl: ustring; isMainFrame : boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy): Boolean; virtual;
|
||||
procedure GetResourceRequestHandler(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; is_navigation, is_download: boolean; const request_initiator: ustring; var disable_default_handling: boolean; var aResourceRequestHandler : ICefResourceRequestHandler); virtual;
|
||||
|
||||
procedure RemoveReferences; virtual;
|
||||
@ -86,7 +84,6 @@ type
|
||||
FEvents : Pointer;
|
||||
|
||||
procedure OnRequestContextInitialized(const request_context: ICefRequestContext); override;
|
||||
function OnBeforePluginLoad(const mimeType, pluginUrl: ustring; isMainFrame : boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy): Boolean; override;
|
||||
procedure GetResourceRequestHandler(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; is_navigation, is_download: boolean; const request_initiator: ustring; var disable_default_handling: boolean; var aResourceRequestHandler : ICefResourceRequestHandler); override;
|
||||
|
||||
public
|
||||
@ -114,31 +111,6 @@ begin
|
||||
TCefRequestContextHandlerOwn(TempObject).OnRequestContextInitialized(TCefRequestContextRef.UnWrap(request_context));
|
||||
end;
|
||||
|
||||
function cef_request_context_handler_on_before_plugin_load( self : PCefRequestContextHandler;
|
||||
const mime_type : PCefString;
|
||||
const plugin_url : PCefString;
|
||||
is_main_frame : integer;
|
||||
const top_origin_url : PCefString;
|
||||
plugin_info : PCefWebPluginInfo;
|
||||
plugin_policy : PCefPluginPolicy): Integer; stdcall;
|
||||
var
|
||||
TempObject : TObject;
|
||||
TempPolicy : TCefPluginPolicy;
|
||||
begin
|
||||
Result := Ord(False);
|
||||
TempObject := CefGetObject(self);
|
||||
TempPolicy := plugin_policy^;
|
||||
|
||||
if (TempObject <> nil) and (TempObject is TCefRequestContextHandlerOwn) then
|
||||
Result := Ord(TCefRequestContextHandlerOwn(TempObject).OnBeforePluginLoad(CefString(mime_type),
|
||||
CefString(plugin_url),
|
||||
(is_main_frame <> 0),
|
||||
CefString(top_origin_url),
|
||||
TCefWebPluginInfoRef.UnWrap(plugin_info),
|
||||
TempPolicy));
|
||||
plugin_policy^ := TempPolicy;
|
||||
end;
|
||||
|
||||
function cef_request_context_handler_get_resource_request_handler( self : PCefRequestContextHandler;
|
||||
browser : PCefBrowser;
|
||||
frame : PCefFrame;
|
||||
@ -182,7 +154,6 @@ begin
|
||||
with PCefRequestContextHandler(FData)^ do
|
||||
begin
|
||||
on_request_context_initialized := {$IFDEF FPC}@{$ENDIF}cef_request_context_handler_on_request_context_initialized;
|
||||
on_before_plugin_load := {$IFDEF FPC}@{$ENDIF}cef_request_context_handler_on_before_plugin_load;
|
||||
get_resource_request_handler := {$IFDEF FPC}@{$ENDIF}cef_request_context_handler_get_resource_request_handler;
|
||||
end;
|
||||
end;
|
||||
@ -192,16 +163,6 @@ begin
|
||||
//
|
||||
end;
|
||||
|
||||
function TCefRequestContextHandlerOwn.OnBeforePluginLoad(const mimeType : ustring;
|
||||
const pluginUrl : ustring;
|
||||
isMainFrame : boolean;
|
||||
const topOriginUrl : ustring;
|
||||
const pluginInfo : ICefWebPluginInfo;
|
||||
var pluginPolicy : TCefPluginPolicy): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
procedure TCefRequestContextHandlerOwn.GetResourceRequestHandler(const browser : ICefBrowser;
|
||||
const frame : ICefFrame;
|
||||
const request : ICefRequest;
|
||||
@ -228,29 +189,6 @@ begin
|
||||
PCefRequestContextHandler(FData)^.on_request_context_initialized(PCefRequestContextHandler(FData), CefGetData(request_context));
|
||||
end;
|
||||
|
||||
function TCefRequestContextHandlerRef.OnBeforePluginLoad(const mimeType : ustring;
|
||||
const pluginUrl : ustring;
|
||||
isMainFrame : boolean;
|
||||
const topOriginUrl : ustring;
|
||||
const pluginInfo : ICefWebPluginInfo;
|
||||
var pluginPolicy : TCefPluginPolicy): Boolean;
|
||||
var
|
||||
TempType, TempPluginURL, TempOriginURL : TCefString;
|
||||
begin
|
||||
TempType := CefString(mimeType);
|
||||
TempPluginURL := CefString(pluginUrl);
|
||||
TempOriginURL := CefString(topOriginUrl);
|
||||
|
||||
Result := PCefRequestContextHandler(FData)^.on_before_plugin_load(PCefRequestContextHandler(FData),
|
||||
@TempType,
|
||||
@TempPluginURL,
|
||||
ord(isMainFrame),
|
||||
@TempOriginURL,
|
||||
CefGetData(pluginInfo),
|
||||
@pluginPolicy) <> 0;
|
||||
end;
|
||||
|
||||
|
||||
procedure TCefRequestContextHandlerRef.GetResourceRequestHandler(const browser : ICefBrowser;
|
||||
const frame : ICefFrame;
|
||||
const request : ICefRequest;
|
||||
@ -330,29 +268,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCustomRequestContextHandler.OnBeforePluginLoad(const mimeType : ustring;
|
||||
const pluginUrl : ustring;
|
||||
isMainFrame : boolean;
|
||||
const topOriginUrl : ustring;
|
||||
const pluginInfo : ICefWebPluginInfo;
|
||||
var pluginPolicy : TCefPluginPolicy): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
try
|
||||
if (FEvents <> nil) then
|
||||
Result := IChromiumEvents(FEvents).doOnBeforePluginLoad(mimeType,
|
||||
pluginUrl,
|
||||
isMainFrame,
|
||||
topOriginUrl,
|
||||
pluginInfo,
|
||||
pluginPolicy);
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('TCustomRequestContextHandler.OnBeforePluginLoad', e) then raise;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomRequestContextHandler.GetResourceRequestHandler(const browser : ICefBrowser;
|
||||
const frame : ICefFrame;
|
||||
const request : ICefRequest;
|
||||
|
@ -2099,7 +2099,6 @@ type
|
||||
get_cookie_manager : function(self: PCefRequestContext; callback: PCefCompletionCallback): PCefCookieManager; stdcall;
|
||||
register_scheme_handler_factory : function(self: PCefRequestContext; const scheme_name, domain_name: PCefString; factory: PCefSchemeHandlerFactory): Integer; stdcall;
|
||||
clear_scheme_handler_factories : function(self: PCefRequestContext): Integer; stdcall;
|
||||
purge_plugin_list_cache : procedure(self: PCefRequestContext; reload_pages: Integer); stdcall;
|
||||
has_preference : function(self: PCefRequestContext; const name: PCefString): Integer; stdcall;
|
||||
get_preference : function(self: PCefRequestContext; const name: PCefString): PCefValue; stdcall;
|
||||
get_all_preferences : function(self: PCefRequestContext; include_defaults: Integer): PCefDictionaryValue; stdcall;
|
||||
@ -2121,7 +2120,6 @@ type
|
||||
TCefRequestContextHandler = record
|
||||
base : TCefBaseRefCounted;
|
||||
on_request_context_initialized : procedure(self: PCefRequestContextHandler; request_context: PCefRequestContext); stdcall;
|
||||
on_before_plugin_load : function(self: PCefRequestContextHandler; const mime_type, plugin_url : PCefString; is_main_frame : integer; const top_origin_url: PCefString; plugin_info: PCefWebPluginInfo; plugin_policy: PCefPluginPolicy): Integer; stdcall;
|
||||
get_resource_request_handler : function(self: PCefRequestContextHandler; browser: PCefBrowser; frame: PCefFrame; request: PCefRequest; is_navigation, is_download: Integer; const request_initiator: PCefString; disable_default_handling: PInteger): PCefResourceRequestHandler; stdcall;
|
||||
end;
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 346,
|
||||
"InternalVersion" : 347,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "96.0.18.0"
|
||||
"Version" : "97.1.1.0"
|
||||
}
|
||||
],
|
||||
"UpdatePackageData" : {
|
||||
|
Loading…
Reference in New Issue
Block a user