diff --git a/README.md b/README.md index 9e4518c5..9d9345e1 100644 --- a/README.md +++ b/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 99.2.15 which includes Chromium 99.0.4844.84. +CEF4Delphi uses CEF 100.0.14 which includes Chromium 100.0.4896.75. The CEF binaries used by CEF4Delphi are available for download at Spotify : -* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_99.2.15%2Bg71e9523%2Bchromium-99.0.4844.84_windows32.tar.bz2) -* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_99.2.15%2Bg71e9523%2Bchromium-99.0.4844.84_windows64.tar.bz2) -* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_99.2.15%2Bg71e9523%2Bchromium-99.0.4844.84_linux32.tar.bz2) -* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_99.2.15%2Bg71e9523%2Bchromium-99.0.4844.84_linux64.tar.bz2) -* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_99.2.15%2Bg71e9523%2Bchromium-99.0.4844.84_linuxarm.tar.bz2) -* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_99.2.15%2Bg71e9523%2Bchromium-99.0.4844.84_linuxarm64.tar.bz2) -* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_99.2.15%2Bg71e9523%2Bchromium-99.0.4844.84_macosx64.tar.bz2) +* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_100.0.14%2Bg4e5ba66%2Bchromium-100.0.4896.75_windows32.tar.bz2) +* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_100.0.14%2Bg4e5ba66%2Bchromium-100.0.4896.75_windows64.tar.bz2) +* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_100.0.14%2Bg4e5ba66%2Bchromium-100.0.4896.75_linux32.tar.bz2) +* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_100.0.14%2Bg4e5ba66%2Bchromium-100.0.4896.75_linux64.tar.bz2) +* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_100.0.14%2Bg4e5ba66%2Bchromium-100.0.4896.75_linuxarm.tar.bz2) +* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_100.0.14%2Bg4e5ba66%2Bchromium-100.0.4896.75_linuxarm64.tar.bz2) +* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_100.0.14%2Bg4e5ba66%2Bchromium-100.0.4896.75_macosx64.tar.bz2) CEF4Delphi was developed and tested on Delphi 11.1 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. diff --git a/demos/Lazarus_Windows/SimpleOSRBrowser/SimpleOSRBrowser.lpi b/demos/Lazarus_Windows/SimpleOSRBrowser/SimpleOSRBrowser.lpi index a5f34b45..d3b15e46 100644 --- a/demos/Lazarus_Windows/SimpleOSRBrowser/SimpleOSRBrowser.lpi +++ b/demos/Lazarus_Windows/SimpleOSRBrowser/SimpleOSRBrowser.lpi @@ -43,7 +43,7 @@ - + diff --git a/packages/CEF4Delphi.dpk b/packages/CEF4Delphi.dpk index ac5d73c7..d59b6d23 100644 --- a/packages/CEF4Delphi.dpk +++ b/packages/CEF4Delphi.dpk @@ -1,6 +1,7 @@ package CEF4Delphi; {$R *.res} +{$R *.otares} {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} {$ALIGN 8} {$ASSERTIONS ON} @@ -13,8 +14,8 @@ package CEF4Delphi; {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES ON} @@ -63,7 +64,6 @@ contains uCEFCookieManager in '..\source\uCEFCookieManager.pas', uCEFCompletionCallback in '..\source\uCEFCompletionCallback.pas', uCEFRequestContextHandler in '..\source\uCEFRequestContextHandler.pas', - uCEFWebPluginInfo in '..\source\uCEFWebPluginInfo.pas', uCEFDomDocument in '..\source\uCEFDomDocument.pas', uCEFDomNode in '..\source\uCEFDomNode.pas', uCEFv8Value in '..\source\uCEFv8Value.pas', @@ -116,8 +116,6 @@ contains uCEFRenderProcessHandler in '..\source\uCEFRenderProcessHandler.pas', uCEFUrlrequestClient in '..\source\uCEFUrlrequestClient.pas', uCEFUrlRequest in '..\source\uCEFUrlRequest.pas', - uCEFWebPluginInfoVisitor in '..\source\uCEFWebPluginInfoVisitor.pas', - uCEFWebPluginUnstableCallback in '..\source\uCEFWebPluginUnstableCallback.pas', uCEFEndTracingCallback in '..\source\uCEFEndTracingCallback.pas', uCEFFileDialogCallback in '..\source\uCEFFileDialogCallback.pas', uCEFDragData in '..\source\uCEFDragData.pas', diff --git a/packages/CEF4DelphiVCLRTL.dpk b/packages/CEF4DelphiVCLRTL.dpk index addd5847..1829114d 100644 --- a/packages/CEF4DelphiVCLRTL.dpk +++ b/packages/CEF4DelphiVCLRTL.dpk @@ -169,9 +169,6 @@ contains uCEFv8Value in '..\source\uCEFv8Value.pas', uCEFValue in '..\source\uCEFValue.pas', uCEFWaitableEvent in '..\source\uCEFWaitableEvent.pas', - uCEFWebPluginInfo in '..\source\uCEFWebPluginInfo.pas', - uCEFWebPluginInfoVisitor in '..\source\uCEFWebPluginInfoVisitor.pas', - uCEFWebPluginUnstableCallback in '..\source\uCEFWebPluginUnstableCallback.pas', uCEFWinControl in '..\source\uCEFWinControl.pas', uCEFWindowParent in '..\source\uCEFWindowParent.pas', uCEFWorkScheduler in '..\source\uCEFWorkScheduler.pas', diff --git a/packages/CEF4DelphiVCLRTL.dproj b/packages/CEF4DelphiVCLRTL.dproj index bfe4d396..481a7861 100644 --- a/packages/CEF4DelphiVCLRTL.dproj +++ b/packages/CEF4DelphiVCLRTL.dproj @@ -250,9 +250,6 @@ - - - @@ -345,7 +342,7 @@ true - + CEF4DelphiVCLRTL.bpl true diff --git a/packages/cef4delphi_lazarus.lpk b/packages/cef4delphi_lazarus.lpk index 29c41dcf..f82227fe 100644 --- a/packages/cef4delphi_lazarus.lpk +++ b/packages/cef4delphi_lazarus.lpk @@ -21,8 +21,8 @@ - - + + @@ -457,406 +457,394 @@ - - - - - - - - - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/packages/cef4delphi_lazarus.pas b/packages/cef4delphi_lazarus.pas index 6140ff34..a9c7fe4b 100644 --- a/packages/cef4delphi_lazarus.pas +++ b/packages/cef4delphi_lazarus.pas @@ -40,7 +40,6 @@ uses uCEFv8Accessor, uCEFv8ArrayBufferReleaseCallback, uCEFv8Context, uCEFv8Exception, uCEFv8Handler, uCEFv8Interceptor, uCEFv8StackFrame, uCEFv8StackTrace, uCEFv8Value, uCEFValue, uCEFWaitableEvent, - uCEFWebPluginInfo, uCEFWebPluginInfoVisitor, uCEFWebPluginUnstableCallback, uCEFWindowParent, uCEFWorkScheduler, uCEFWorkSchedulerThread, uCEFWriteHandler, uCEFX509Certificate, uCEFX509CertPrincipal, uCEFXmlReader, uCEFZipReader, uCEFChromiumCore, uCEFChromium, uCEFBufferPanel, uCEFServer, diff --git a/source/uCEFApplicationCore.pas b/source/uCEFApplicationCore.pas index e44bded9..98471537 100644 --- a/source/uCEFApplicationCore.pas +++ b/source/uCEFApplicationCore.pas @@ -66,15 +66,15 @@ uses uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar; const - CEF_SUPPORTED_VERSION_MAJOR = 99; - CEF_SUPPORTED_VERSION_MINOR = 2; - CEF_SUPPORTED_VERSION_RELEASE = 15; + CEF_SUPPORTED_VERSION_MAJOR = 100; + CEF_SUPPORTED_VERSION_MINOR = 0; + CEF_SUPPORTED_VERSION_RELEASE = 14; CEF_SUPPORTED_VERSION_BUILD = 0; - CEF_CHROMEELF_VERSION_MAJOR = 99; + CEF_CHROMEELF_VERSION_MAJOR = 100; CEF_CHROMEELF_VERSION_MINOR = 0; - CEF_CHROMEELF_VERSION_RELEASE = 4844; - CEF_CHROMEELF_VERSION_BUILD = 84; + CEF_CHROMEELF_VERSION_RELEASE = 4896; + CEF_CHROMEELF_VERSION_BUILD = 75; {$IFDEF MSWINDOWS} LIBCEF_DLL = 'libcef.dll'; @@ -163,7 +163,6 @@ type FAllowFileAccessFromFiles : boolean; FAllowRunningInsecureContent : boolean; FEnablePrintPreview : boolean; - FPluginPolicy : TCefPluginPolicySwitch; FDefaultEncoding : ustring; FDisableJavascript : boolean; FDisableJavascriptCloseWindows : boolean; @@ -174,7 +173,6 @@ type FImageShrinkStandaloneToFit : boolean; FDisableTextAreaResize : boolean; FDisableTabToLinks : boolean; - FDisablePlugins : boolean; FEnableProfanityFilter : boolean; FDisableSpellChecking : boolean; FOverrideSpellCheckLang : ustring; @@ -330,7 +328,6 @@ type function Load_cef_v8_capi_h : boolean; function Load_cef_values_capi_h : boolean; function Load_cef_waitable_event_capi_h : boolean; - function Load_cef_web_plugin_capi_h : boolean; function Load_cef_xml_reader_capi_h : boolean; function Load_cef_zip_reader_capi_h : boolean; function Load_cef_logging_internal_h : boolean; @@ -481,7 +478,6 @@ type property AllowFileAccessFromFiles : boolean read FAllowFileAccessFromFiles write FAllowFileAccessFromFiles; // --allow-file-access-from-files property AllowRunningInsecureContent : boolean read FAllowRunningInsecureContent write FAllowRunningInsecureContent; // --allow-running-insecure-content property EnablePrintPreview : boolean read FEnablePrintPreview write FEnablePrintPreview; // --enable-print-preview - property PluginPolicy : TCefPluginPolicySwitch read FPluginPolicy write FPluginPolicy; // --plugin-policy property DefaultEncoding : ustring read FDefaultEncoding write FDefaultEncoding; // --default-encoding property DisableJavascript : boolean read FDisableJavascript write FDisableJavascript; // --disable-javascript property DisableJavascriptCloseWindows : boolean read FDisableJavascriptCloseWindows write FDisableJavascriptCloseWindows; // --disable-javascript-close-windows @@ -492,7 +488,6 @@ type property ImageShrinkStandaloneToFit : boolean read FImageShrinkStandaloneToFit write FImageShrinkStandaloneToFit; // --image-shrink-standalone-to-fit property DisableTextAreaResize : boolean read FDisableTextAreaResize write FDisableTextAreaResize; // --disable-text-area-resize property DisableTabToLinks : boolean read FDisableTabToLinks write FDisableTabToLinks; // --disable-tab-to-links - property DisablePlugins : boolean read FDisablePlugins write FDisablePlugins; // --disable-plugins property EnableProfanityFilter : boolean read FEnableProfanityFilter write FEnableProfanityFilter; // --enable-profanity-filter property DisableSpellChecking : boolean read FDisableSpellChecking write FDisableSpellChecking; // --disable-spell-checking property OverrideSpellCheckLang : ustring read FOverrideSpellCheckLang write FOverrideSpellCheckLang; // --override-spell-check-lang @@ -731,7 +726,6 @@ begin FAllowFileAccessFromFiles := False; FAllowRunningInsecureContent := False; FEnablePrintPreview := False; - FPluginPolicy := PLUGIN_POLICY_SWITCH_ALLOW; FDefaultEncoding := ''; FDisableJavascript := False; FDisableJavascriptCloseWindows := False; @@ -742,7 +736,6 @@ begin FImageShrinkStandaloneToFit := False; FDisableTextAreaResize := False; FDisableTabToLinks := False; - FDisablePlugins := False; FEnableProfanityFilter := False; FDisableSpellChecking := False; FOverrideSpellCheckLang := ''; @@ -2020,11 +2013,6 @@ begin if (length(FDevToolsProtocolLogFile) > 0) then ReplaceSwitch(aKeys, aValues, '--devtools-protocol-log-file', FDevToolsProtocolLogFile); - case FPluginPolicy of - PLUGIN_POLICY_SWITCH_DETECT : ReplaceSwitch(aKeys, aValues, '--plugin-policy', 'detect'); - PLUGIN_POLICY_SWITCH_BLOCK : ReplaceSwitch(aKeys, aValues, '--plugin-policy', 'block'); - end; - if (length(FDefaultEncoding) > 0) then ReplaceSwitch(aKeys, aValues, '--default-encoding', FDefaultEncoding); @@ -2055,9 +2043,6 @@ begin if FDisableTabToLinks then ReplaceSwitch(aKeys, aValues, '--disable-tab-to-links'); - if FDisablePlugins then - ReplaceSwitch(aKeys, aValues, '--disable-plugins'); - if FEnableProfanityFilter then ReplaceSwitch(aKeys, aValues, '--enable-profanity-filter'); @@ -2551,7 +2536,6 @@ begin Load_cef_v8_capi_h and Load_cef_values_capi_h and Load_cef_waitable_event_capi_h and - Load_cef_web_plugin_capi_h and Load_cef_xml_reader_capi_h and Load_cef_zip_reader_capi_h and Load_cef_logging_internal_h and @@ -2953,21 +2937,6 @@ begin Result := assigned(cef_waitable_event_create); end; -function TCefApplicationCore.Load_cef_web_plugin_capi_h : boolean; -begin - {$IFDEF FPC}Pointer({$ENDIF}cef_visit_web_plugin_info{$IFDEF FPC}){$ENDIF} := GetProcAddress(FLibHandle, 'cef_visit_web_plugin_info'); - {$IFDEF FPC}Pointer({$ENDIF}cef_refresh_web_plugins{$IFDEF FPC}){$ENDIF} := GetProcAddress(FLibHandle, 'cef_refresh_web_plugins'); - {$IFDEF FPC}Pointer({$ENDIF}cef_unregister_internal_web_plugin{$IFDEF FPC}){$ENDIF} := GetProcAddress(FLibHandle, 'cef_unregister_internal_web_plugin'); - {$IFDEF FPC}Pointer({$ENDIF}cef_register_web_plugin_crash{$IFDEF FPC}){$ENDIF} := GetProcAddress(FLibHandle, 'cef_register_web_plugin_crash'); - {$IFDEF FPC}Pointer({$ENDIF}cef_is_web_plugin_unstable{$IFDEF FPC}){$ENDIF} := GetProcAddress(FLibHandle, 'cef_is_web_plugin_unstable'); - - Result := assigned(cef_visit_web_plugin_info) and - assigned(cef_refresh_web_plugins) and - assigned(cef_unregister_internal_web_plugin) and - assigned(cef_register_web_plugin_crash) and - assigned(cef_is_web_plugin_unstable); -end; - function TCefApplicationCore.Load_cef_xml_reader_capi_h : boolean; begin {$IFDEF FPC}Pointer({$ENDIF}cef_xml_reader_create{$IFDEF FPC}){$ENDIF} := GetProcAddress(FLibHandle, 'cef_xml_reader_create'); diff --git a/source/uCEFChromiumCore.pas b/source/uCEFChromiumCore.pas index e2ede841..0425515d 100644 --- a/source/uCEFChromiumCore.pas +++ b/source/uCEFChromiumCore.pas @@ -220,7 +220,6 @@ type FOnQuotaRequest : TOnQuotaRequest; FOnCertificateError : TOnCertificateError; FOnSelectClientCertificate : TOnSelectClientCertificate; - FOnPluginCrashed : TOnPluginCrashed; FOnRenderViewReady : TOnRenderViewReady; FOnRenderProcessTerminated : TOnRenderProcessTerminated; FOnGetResourceRequestHandler_ReqHdlr : TOnGetResourceRequestHandler; @@ -558,7 +557,6 @@ type function doOnQuotaRequest(const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefCallback): Boolean; virtual; function doOnCertificateError(const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefCallback): Boolean; virtual; function doOnSelectClientCertificate(const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback): boolean; virtual; - procedure doOnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); virtual; procedure doOnRenderViewReady(const browser: ICefBrowser); virtual; procedure doOnRenderProcessTerminated(const browser: ICefBrowser; status: TCefTerminationStatus); virtual; procedure doOnDocumentAvailableInMainFrame(const browser: ICefBrowser); virtual; @@ -1040,7 +1038,6 @@ type property OnQuotaRequest : TOnQuotaRequest read FOnQuotaRequest write FOnQuotaRequest; property OnCertificateError : TOnCertificateError read FOnCertificateError write FOnCertificateError; property OnSelectClientCertificate : TOnSelectClientCertificate read FOnSelectClientCertificate write FOnSelectClientCertificate; - property OnPluginCrashed : TOnPluginCrashed read FOnPluginCrashed write FOnPluginCrashed; property OnRenderViewReady : TOnRenderViewReady read FOnRenderViewReady write FOnRenderViewReady; property OnRenderProcessTerminated : TOnRenderProcessTerminated read FOnRenderProcessTerminated write FOnRenderProcessTerminated; property OnGetResourceRequestHandler_ReqHdlr : TOnGetResourceRequestHandler read FOnGetResourceRequestHandler_ReqHdlr write FOnGetResourceRequestHandler_ReqHdlr; @@ -1759,7 +1756,6 @@ begin FOnQuotaRequest := nil; FOnCertificateError := nil; FOnSelectClientCertificate := nil; - FOnPluginCrashed := nil; FOnRenderViewReady := nil; FOnRenderProcessTerminated := nil; FOnGetResourceRequestHandler_ReqHdlr := nil; @@ -2378,7 +2374,6 @@ begin aSettings.javascript_close_windows := FOptions.JavascriptCloseWindows; aSettings.javascript_access_clipboard := FOptions.JavascriptAccessClipboard; aSettings.javascript_dom_paste := FOptions.JavascriptDomPaste; - aSettings.plugins := FOptions.Plugins; aSettings.image_loading := FOptions.ImageLoading; aSettings.image_shrink_standalone_to_fit := FOptions.ImageShrinkStandaloneToFit; aSettings.text_area_resize := FOptions.TextAreaResize; @@ -6032,12 +6027,6 @@ begin FOnSelectClientCertificate(self, browser, isProxy, host, port, certificatesCount, certificates, callback, Result); end; -procedure TChromiumCore.doOnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); -begin - if assigned(FOnPluginCrashed) then - FOnPluginCrashed(Self, browser, pluginPath); -end; - procedure TChromiumCore.doOnPopupShow(const browser: ICefBrowser; show: Boolean); begin if assigned(FOnPopupShow) then diff --git a/source/uCEFChromiumEvents.pas b/source/uCEFChromiumEvents.pas index e1e5b0e9..d58eb169 100644 --- a/source/uCEFChromiumEvents.pas +++ b/source/uCEFChromiumEvents.pas @@ -116,7 +116,6 @@ type TOnQuotaRequest = procedure(Sender: TObject; const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefCallback; out Result: Boolean) of object; TOnCertificateError = procedure(Sender: TObject; const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefCallback; out Result: Boolean) of object; TOnSelectClientCertificate = procedure(Sender: TObject; const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback; var aResult : boolean) of object; - TOnPluginCrashed = procedure(Sender: TObject; const browser: ICefBrowser; const pluginPath: ustring) of object; TOnRenderViewReady = procedure(Sender: Tobject; const browser: ICefBrowser) of object; TOnRenderProcessTerminated = procedure(Sender: TObject; const browser: ICefBrowser; status: TCefTerminationStatus) of object; TOnGetResourceRequestHandler = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; is_navigation, is_download: boolean; const request_initiator: ustring; var disable_default_handling: boolean; var aExternalResourceRequestHandler : ICefResourceRequestHandler) of object; diff --git a/source/uCEFChromiumOptions.pas b/source/uCEFChromiumOptions.pas index e6105a1f..5b374b7b 100644 --- a/source/uCEFChromiumOptions.pas +++ b/source/uCEFChromiumOptions.pas @@ -64,7 +64,6 @@ type FJavascriptCloseWindows : TCefState; FJavascriptAccessClipboard : TCefState; FJavascriptDomPaste : TCefState; - FPlugins : TCefState; FImageLoading : TCefState; FImageShrinkStandaloneToFit : TCefState; FTextAreaResize : TCefState; @@ -83,7 +82,6 @@ type property JavascriptCloseWindows : TCefState read FJavascriptCloseWindows write FJavascriptCloseWindows default STATE_DEFAULT; property JavascriptAccessClipboard : TCefState read FJavascriptAccessClipboard write FJavascriptAccessClipboard default STATE_DEFAULT; property JavascriptDomPaste : TCefState read FJavascriptDomPaste write FJavascriptDomPaste default STATE_DEFAULT; - property Plugins : TCefState read FPlugins write FPlugins default STATE_DEFAULT; property ImageLoading : TCefState read FImageLoading write FImageLoading default STATE_DEFAULT; property ImageShrinkStandaloneToFit : TCefState read FImageShrinkStandaloneToFit write FImageShrinkStandaloneToFit default STATE_DEFAULT; property TextAreaResize : TCefState read FTextAreaResize write FTextAreaResize default STATE_DEFAULT; @@ -105,7 +103,6 @@ begin FJavascriptCloseWindows := STATE_DEFAULT; FJavascriptAccessClipboard := STATE_DEFAULT; FJavascriptDomPaste := STATE_DEFAULT; - FPlugins := STATE_DEFAULT; FImageLoading := STATE_DEFAULT; FImageShrinkStandaloneToFit := STATE_DEFAULT; FTextAreaResize := STATE_DEFAULT; diff --git a/source/uCEFInterfaces.pas b/source/uCEFInterfaces.pas index 61759336..2a7a7de9 100644 --- a/source/uCEFInterfaces.pas +++ b/source/uCEFInterfaces.pas @@ -126,7 +126,6 @@ type ICefDragHandler = interface; ICefFindHandler = interface; ICefCookieManager = interface; - ICefWebPluginInfo = interface; ICefDisplay = interface; ICefLayout = interface; ICefBoxLayout = interface; @@ -229,7 +228,6 @@ type TCefEndTracingCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const tracingFile: ustring); TCefFastTaskProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(); TCefv8ArrayBufferReleaseCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(buffer : Pointer); - TCefWebPluginInfoVisitorProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} function(const info: ICefWebPluginInfo; count, total: Integer): Boolean; TCefWebPluginIsUnstableProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const path: ustring; unstable: Boolean); TCefV8AccessorGetterProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} function(const name: ustring; const object_: ICefv8Value; var value: ICefv8Value; var exception: ustring): Boolean; TCefV8AccessorSetterProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} function(const name: ustring; const object_, value: ICefv8Value; var exception: ustring): Boolean; @@ -371,7 +369,6 @@ type function doOnQuotaRequest(const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefCallback): Boolean; function doOnCertificateError(const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefCallback): Boolean; function doOnSelectClientCertificate(const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback): boolean; - procedure doOnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); procedure doOnRenderViewReady(const browser: ICefBrowser); procedure doOnRenderProcessTerminated(const browser: ICefBrowser; status: TCefTerminationStatus); procedure doOnDocumentAvailableInMainFrame(const browser: ICefBrowser); @@ -1532,21 +1529,6 @@ type function FlushStoreProc(const proc: TCefCompletionCallbackProc): Boolean; end; - // TCefWebPluginInfo - // /include/capi/cef_web_plugin_capi.h (cef_web_plugin_info_t) - ICefWebPluginInfo = interface(ICefBaseRefCounted) - ['{AA879E58-F649-44B1-AF9C-655FF5B79A02}'] - function GetName: ustring; - function GetPath: ustring; - function GetVersion: ustring; - function GetDescription: ustring; - - property Name : ustring read GetName; - property Path : ustring read GetPath; - property Version : ustring read GetVersion; - property Description : ustring read GetDescription; - end; - // TCefCallback // /include/capi/cef_callback_capi.h (cef_callback_t) ICefCallback = interface(ICefBaseRefCounted) @@ -1922,7 +1904,6 @@ type function OnQuotaRequest(const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefCallback): Boolean; function OnCertificateError(const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefCallback): Boolean; function OnSelectClientCertificate(const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback): boolean; - procedure OnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); procedure OnRenderViewReady(const browser: ICefBrowser); procedure OnRenderProcessTerminated(const browser: ICefBrowser; status: TCefTerminationStatus); procedure OnDocumentAvailableInMainFrame(const browser: ICefBrowser); @@ -2137,20 +2118,6 @@ type procedure RemoveReferences; // custom procedure to clear all references end; - // TCefWebPluginInfoVisitor - // /include/capi/cef_web_plugin_capi.h (cef_web_plugin_info_visitor_t) - ICefWebPluginInfoVisitor = interface(ICefBaseRefCounted) - ['{7523D432-4424-4804-ACAD-E67D2313436E}'] - function Visit(const info: ICefWebPluginInfo; count, total: Integer): Boolean; - end; - - // TCefWebPluginUnstableCallback - // /include/capi/cef_web_plugin_capi.h (cef_web_plugin_unstable_callback_t) - ICefWebPluginUnstableCallback = interface(ICefBaseRefCounted) - ['{67459829-EB47-4B7E-9D69-2EE77DF0E71E}'] - procedure IsUnstable(const path: ustring; unstable: Boolean); - end; - // TCefEndTracingCallback // /include/capi/cef_trace_capi.h (cef_end_tracing_callback_t) ICefEndTracingCallback = interface(ICefBaseRefCounted) diff --git a/source/uCEFLibFunctions.pas b/source/uCEFLibFunctions.pas index 4c5c08ba..0e9a86f6 100644 --- a/source/uCEFLibFunctions.pas +++ b/source/uCEFLibFunctions.pas @@ -234,13 +234,6 @@ var // /include/capi/cef_waitable_event_capi.h cef_waitable_event_create : function(automatic_reset, initially_signaled : integer): PCefWaitableEvent; cdecl; - // /include/capi/cef_web_plugin_capi.h - cef_visit_web_plugin_info : procedure(visitor: PCefWebPluginInfoVisitor); cdecl; - cef_refresh_web_plugins : procedure; cdecl; - cef_unregister_internal_web_plugin : procedure(const path: PCefString); cdecl; - cef_register_web_plugin_crash : procedure(const path: PCefString); cdecl; - cef_is_web_plugin_unstable : procedure(const path: PCefString; callback: PCefWebPluginUnstableCallback); cdecl; - // /include/capi/cef_xml_reader_capi.h cef_xml_reader_create : function(stream: PCefStreamReader; encodingType: TCefXmlEncodingType; const URI: PCefString): PCefXmlReader; cdecl; diff --git a/source/uCEFMiscFunctions.pas b/source/uCEFMiscFunctions.pas index 676472a4..b5faf249 100644 --- a/source/uCEFMiscFunctions.pas +++ b/source/uCEFMiscFunctions.pas @@ -962,7 +962,7 @@ begin {$ENDIF} {$IFDEF MACOSX} {$IFDEF FPC} - // TO-DO: Find a way to write in the error console using Lazarus in MacOS + // TO-DO: Find a way to write in the error console using Lazarus in MacOS {$ELSE} FMX.Types.Log.d(aMessage); {$ENDIF} diff --git a/source/uCEFRequestContextHandler.pas b/source/uCEFRequestContextHandler.pas index 2f5d0a28..f829128d 100644 --- a/source/uCEFRequestContextHandler.pas +++ b/source/uCEFRequestContextHandler.pas @@ -96,7 +96,7 @@ implementation uses uCEFMiscFunctions, uCEFLibFunctions, uCEFBrowser, uCEFFrame, uCEFRequest, - uCEFWebPluginInfo, uCEFRequestContext, uCEFResourceRequestHandler; + uCEFRequestContext, uCEFResourceRequestHandler; // TCefRequestContextHandlerOwn diff --git a/source/uCEFRequestHandler.pas b/source/uCEFRequestHandler.pas index a32914f6..94fa4466 100644 --- a/source/uCEFRequestHandler.pas +++ b/source/uCEFRequestHandler.pas @@ -61,7 +61,6 @@ type function OnQuotaRequest(const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefCallback): Boolean; virtual; function OnCertificateError(const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefCallback): Boolean; virtual; function OnSelectClientCertificate(const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback): boolean; virtual; - procedure OnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); virtual; procedure OnRenderViewReady(const browser: ICefBrowser); virtual; procedure OnRenderProcessTerminated(const browser: ICefBrowser; status: TCefTerminationStatus); virtual; procedure OnDocumentAvailableInMainFrame(const browser: ICefBrowser); virtual; @@ -83,7 +82,6 @@ type function OnQuotaRequest(const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefCallback): Boolean; override; function OnCertificateError(const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefCallback): Boolean; override; function OnSelectClientCertificate(const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback): boolean; override; - procedure OnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); override; procedure OnRenderViewReady(const browser: ICefBrowser); override; procedure OnRenderProcessTerminated(const browser: ICefBrowser; status: TCefTerminationStatus); override; procedure OnDocumentAvailableInMainFrame(const browser: ICefBrowser); override; @@ -246,19 +244,6 @@ begin TCefCallbackRef.UnWrap(callback))); end; -procedure cef_request_handler_on_plugin_crashed( self : PCefRequestHandler; - browser : PCefBrowser; - const plugin_path : PCefString); stdcall; -var - TempObject : TObject; -begin - TempObject := CefGetObject(self); - - if (TempObject <> nil) and (TempObject is TCefRequestHandlerOwn) then - TCefRequestHandlerOwn(TempObject).OnPluginCrashed(TCefBrowserRef.UnWrap(browser), - CefString(plugin_path)); -end; - procedure cef_request_handler_on_render_view_ready(self : PCefRequestHandler; browser : PCefBrowser); stdcall; var @@ -367,7 +352,6 @@ begin on_quota_request := {$IFDEF FPC}@{$ENDIF}cef_request_handler_on_quota_request; on_certificate_error := {$IFDEF FPC}@{$ENDIF}cef_request_handler_on_certificate_error; on_select_client_certificate := {$IFDEF FPC}@{$ENDIF}cef_request_handler_on_select_client_certificate; - on_plugin_crashed := {$IFDEF FPC}@{$ENDIF}cef_request_handler_on_plugin_crashed; on_render_view_ready := {$IFDEF FPC}@{$ENDIF}cef_request_handler_on_render_view_ready; on_render_process_terminated := {$IFDEF FPC}@{$ENDIF}cef_request_handler_on_render_process_terminated; on_document_available_in_main_frame := {$IFDEF FPC}@{$ENDIF}cef_request_handler_on_document_available_in_main_frame; @@ -436,12 +420,6 @@ begin aResourceRequestHandler := nil; end; -procedure TCefRequestHandlerOwn.OnPluginCrashed(const browser : ICefBrowser; - const pluginPath : ustring); -begin - // -end; - function TCefRequestHandlerOwn.OnQuotaRequest(const browser : ICefBrowser; const originUrl : ustring; newSize : Int64; @@ -586,11 +564,6 @@ begin Result := inherited OnSelectClientCertificate(browser, isProxy, host, port, certificatesCount, certificates, callback); end; -procedure TCustomRequestHandler.OnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); -begin - if (FEvents <> nil) then IChromiumEvents(FEvents).doOnPluginCrashed(browser, pluginPath); -end; - function TCustomRequestHandler.OnQuotaRequest(const browser : ICefBrowser; const originUrl : ustring; newSize : Int64; diff --git a/source/uCEFTypes.pas b/source/uCEFTypes.pas index bf74862f..f5cecc7e 100644 --- a/source/uCEFTypes.pas +++ b/source/uCEFTypes.pas @@ -174,8 +174,6 @@ type PCefCookieManager = ^TCefCookieManager; PCefSchemeHandlerFactory = ^TCefSchemeHandlerFactory; PCefResolveCallback = ^TCefResolveCallback; - PCefWebPluginInfo = ^TCefWebPluginInfo; - PCefPluginPolicy = ^TCefPluginPolicy; PCefCookieVisitor = ^TCefCookieVisitor; PCefSetCookieCallback = ^TCefSetCookieCallback; PCefDeleteCookiesCallback = ^TCefDeleteCookiesCallback; @@ -200,8 +198,6 @@ type PCefZipReader = ^TCefZipReader; PCefUrlRequestClient = ^TCefUrlRequestClient; PCefUrlRequest = ^TCefUrlRequest; - PCefWebPluginInfoVisitor = ^TCefWebPluginInfoVisitor; - PCefWebPluginUnstableCallback = ^TCefWebPluginUnstableCallback; PCefTaskRunner = ^TCefTaskRunner; PCefEndTracingCallback = ^TCefEndTracingCallback; PCefRequestContextSettings = ^TCefRequestContextSettings; @@ -999,21 +995,6 @@ type RESPONSE_FILTER_ERROR ); - // /include/internal/cef_types.h (cef_plugin_policy_t) - TCefPluginPolicy = ( - PLUGIN_POLICY_ALLOW, - PLUGIN_POLICY_DETECT_IMPORTANT, - PLUGIN_POLICY_BLOCK, - PLUGIN_POLICY_DISABLE - ); - - // cef/libcef/common/cef_switches.cc (values for the --plugin-policy switch) - TCefPluginPolicySwitch = ( - PLUGIN_POLICY_SWITCH_ALLOW, // Default value - PLUGIN_POLICY_SWITCH_DETECT, - PLUGIN_POLICY_SWITCH_BLOCK - ); - // /include/internal/cef_types.h (cef_color_type_t) TCefColorType = ( CEF_COLOR_TYPE_RGBA_8888, @@ -1333,7 +1314,6 @@ type javascript_close_windows : TCefState; javascript_access_clipboard : TCefState; javascript_dom_paste : TCefState; - plugins : TCefState; image_loading : TCefState; image_shrink_standalone_to_fit : TCefState; text_area_resize : TCefState; @@ -1895,18 +1875,6 @@ type cancel : procedure(self: PCefUrlRequest); stdcall; end; - // /include/capi/cef_web_plugin_capi.h (cef_web_plugin_info_visitor_t) - TCefWebPluginInfoVisitor = record - base : TCefBaseRefCounted; - visit : function(self: PCefWebPluginInfoVisitor; info: PCefWebPluginInfo; count, total: Integer): Integer; stdcall; - end; - - // /include/capi/cef_web_plugin_capi.h (cef_web_plugin_unstable_callback_t) - TCefWebPluginUnstableCallback = record - base : TCefBaseRefCounted; - is_unstable : procedure(self: PCefWebPluginUnstableCallback; const path: PCefString; unstable: Integer); stdcall; - end; - // /include/capi/cef_thread_capi.h (cef_thread_t) TCefThread = record base : TCefBaseRefCounted; @@ -1996,7 +1964,6 @@ type on_quota_request : function(self: PCefRequestHandler; browser: PCefBrowser; const origin_url: PCefString; new_size: Int64; callback: PCefCallback): Integer; stdcall; on_certificate_error : function(self: PCefRequestHandler; browser: PCefBrowser; cert_error: TCefErrorcode; const request_url: PCefString; ssl_info: PCefSslInfo; callback: PCefCallback): Integer; stdcall; on_select_client_certificate : function(self: PCefRequestHandler; browser: PCefBrowser; isProxy: integer; const host: PCefString; port: integer; certificatesCount: NativeUInt; const certificates: PPCefX509Certificate; callback: PCefSelectClientCertificateCallback): integer; stdcall; - on_plugin_crashed : procedure(self: PCefRequestHandler; browser: PCefBrowser; const plugin_path: PCefString); stdcall; on_render_view_ready : procedure(self: PCefRequestHandler; browser: PCefBrowser); stdcall; on_render_process_terminated : procedure(self: PCefRequestHandler; browser: PCefBrowser; status: TCefTerminationStatus); stdcall; on_document_available_in_main_frame : procedure(self: PCefRequestHandler; browser: PCefBrowser); stdcall; @@ -2152,15 +2119,6 @@ type on_resolve_completed : procedure(self: PCefResolveCallback; result: TCefErrorCode; resolved_ips: TCefStringList); stdcall; end; - // /include/capi/cef_web_plugin_capi.h (cef_web_plugin_info_t) - TCefWebPluginInfo = record - base : TCefBaseRefCounted; - get_name : function(self: PCefWebPluginInfo): PCefStringUserFree; stdcall; - get_path : function(self: PCefWebPluginInfo): PCefStringUserFree; stdcall; - get_version : function(self: PCefWebPluginInfo): PCefStringUserFree; stdcall; - get_description : function(self: PCefWebPluginInfo): PCefStringUserFree; stdcall; - end; - // /include/capi/cef_cookie_capi.h (cef_cookie_visitor_t) TCefCookieVisitor = record base : TCefBaseRefCounted; diff --git a/source/uCEFWebPluginInfo.pas b/source/uCEFWebPluginInfo.pas deleted file mode 100644 index cd6d5296..00000000 --- a/source/uCEFWebPluginInfo.pas +++ /dev/null @@ -1,99 +0,0 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2022 Salvador Diaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFWebPluginInfo; - -{$IFDEF FPC} - {$MODE OBJFPC}{$H+} -{$ENDIF} - -{$I cef.inc} - -{$IFNDEF TARGET_64BITS}{$ALIGN ON}{$ENDIF} -{$MINENUMSIZE 4} - -interface - -uses - uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes; - -type - TCefWebPluginInfoRef = class(TCefBaseRefCountedRef, ICefWebPluginInfo) - protected - function GetName: ustring; - function GetPath: ustring; - function GetVersion: ustring; - function GetDescription: ustring; - - public - class function UnWrap(data: Pointer): ICefWebPluginInfo; - end; - -implementation - -uses - uCEFMiscFunctions; - -function TCefWebPluginInfoRef.GetDescription: ustring; -begin - Result := CefStringFreeAndGet(PCefWebPluginInfo(FData)^.get_description(PCefWebPluginInfo(FData))); -end; - -function TCefWebPluginInfoRef.GetName: ustring; -begin - Result := CefStringFreeAndGet(PCefWebPluginInfo(FData)^.get_name(PCefWebPluginInfo(FData))); -end; - -function TCefWebPluginInfoRef.GetPath: ustring; -begin - Result := CefStringFreeAndGet(PCefWebPluginInfo(FData)^.get_path(PCefWebPluginInfo(FData))); -end; - -function TCefWebPluginInfoRef.GetVersion: ustring; -begin - Result := CefStringFreeAndGet(PCefWebPluginInfo(FData)^.get_version(PCefWebPluginInfo(FData))); -end; - -class function TCefWebPluginInfoRef.UnWrap(data: Pointer): ICefWebPluginInfo; -begin - if (data <> nil) then - Result := Create(data) as ICefWebPluginInfo - else - Result := nil; -end; - -end. diff --git a/source/uCEFWebPluginInfoVisitor.pas b/source/uCEFWebPluginInfoVisitor.pas deleted file mode 100644 index 8aaa9df2..00000000 --- a/source/uCEFWebPluginInfoVisitor.pas +++ /dev/null @@ -1,119 +0,0 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2022 Salvador Diaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFWebPluginInfoVisitor; - -{$IFDEF FPC} - {$MODE OBJFPC}{$H+} -{$ENDIF} - -{$I cef.inc} - -{$IFNDEF TARGET_64BITS}{$ALIGN ON}{$ENDIF} -{$MINENUMSIZE 4} - -interface - -uses - uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes; - -type - TCefWebPluginInfoVisitorOwn = class(TCefBaseRefCountedOwn, ICefWebPluginInfoVisitor) - protected - function Visit(const info: ICefWebPluginInfo; count, total: Integer): Boolean; virtual; - - public - constructor Create; virtual; - end; - - TCefFastWebPluginInfoVisitor = class(TCefWebPluginInfoVisitorOwn) - protected - FProc: TCefWebPluginInfoVisitorProc; - - function Visit(const info: ICefWebPluginInfo; count, total: Integer): Boolean; override; - - public - constructor Create(const proc: TCefWebPluginInfoVisitorProc); reintroduce; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions, uCEFWebPluginInfo; - -function cef_web_plugin_info_visitor_visit(self: PCefWebPluginInfoVisitor; - info: PCefWebPluginInfo; - count, total: Integer): Integer; stdcall; -var - TempObject : TObject; -begin - Result := Ord(False); - TempObject := CefGetObject(self); - - if (TempObject <> nil) and (TempObject is TCefWebPluginInfoVisitorOwn) then - Result := Ord(TCefWebPluginInfoVisitorOwn(TempObject).Visit(TCefWebPluginInfoRef.UnWrap(info), - count, - total)); -end; - -constructor TCefWebPluginInfoVisitorOwn.Create; -begin - inherited CreateData(SizeOf(TCefWebPluginInfoVisitor)); - - PCefWebPluginInfoVisitor(FData)^.visit := {$IFDEF FPC}@{$ENDIF}cef_web_plugin_info_visitor_visit; -end; - -function TCefWebPluginInfoVisitorOwn.Visit(const info: ICefWebPluginInfo; count, total: Integer): Boolean; -begin - Result := False; -end; - -// TCefFastWebPluginInfoVisitor - -constructor TCefFastWebPluginInfoVisitor.Create(const proc: TCefWebPluginInfoVisitorProc); -begin - inherited Create; - - FProc := proc; -end; - -function TCefFastWebPluginInfoVisitor.Visit(const info: ICefWebPluginInfo; count, total: Integer): Boolean; -begin - Result := FProc(info, count, total); -end; - -end. diff --git a/source/uCEFWebPluginUnstableCallback.pas b/source/uCEFWebPluginUnstableCallback.pas deleted file mode 100644 index 7139ae45..00000000 --- a/source/uCEFWebPluginUnstableCallback.pas +++ /dev/null @@ -1,119 +0,0 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2022 Salvador Diaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFWebPluginUnstableCallback; - -{$IFDEF FPC} - {$MODE OBJFPC}{$H+} -{$ENDIF} - -{$I cef.inc} - -{$IFNDEF TARGET_64BITS}{$ALIGN ON}{$ENDIF} -{$MINENUMSIZE 4} - -interface - -uses - uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes; - -type - TCefWebPluginUnstableCallbackOwn = class(TCefBaseRefCountedOwn, ICefWebPluginUnstableCallback) - protected - procedure IsUnstable(const path: ustring; unstable: Boolean); virtual; - - public - constructor Create; virtual; - end; - - TCefFastWebPluginUnstableCallback = class(TCefWebPluginUnstableCallbackOwn) - protected - FCallback: TCefWebPluginIsUnstableProc; - procedure IsUnstable(const path: ustring; unstable: Boolean); override; - - public - constructor Create(const callback: TCefWebPluginIsUnstableProc); reintroduce; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions; - -procedure cef_web_plugin_unstable_callback_is_unstable(self: PCefWebPluginUnstableCallback; - const path: PCefString; - unstable: Integer); stdcall; -var - TempObject : TObject; -begin - TempObject := CefGetObject(self); - - if (TempObject <> nil) and (TempObject is TCefWebPluginUnstableCallbackOwn) then - TCefWebPluginUnstableCallbackOwn(TempObject).IsUnstable(CefString(path), - unstable <> 0); -end; - -// TCefWebPluginUnstableCallbackOwn - -constructor TCefWebPluginUnstableCallbackOwn.Create; -begin - inherited CreateData(SizeOf(TCefWebPluginUnstableCallback)); - - PCefWebPluginUnstableCallback(FData)^.is_unstable := {$IFDEF FPC}@{$ENDIF}cef_web_plugin_unstable_callback_is_unstable; -end; - -procedure TCefWebPluginUnstableCallbackOwn.IsUnstable(const path: ustring; unstable: Boolean); -begin - // -end; - -// TCefFastWebPluginUnstableCallback - -constructor TCefFastWebPluginUnstableCallback.Create(const callback: TCefWebPluginIsUnstableProc); -begin - inherited Create; - - FCallback := callback; -end; - -procedure TCefFastWebPluginUnstableCallback.IsUnstable(const path: ustring; unstable: Boolean); -begin - FCallback(path, unstable); -end; - - -end. diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index b4952e50..8ade7641 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,9 +2,9 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 377, + "InternalVersion" : 378, "Name" : "cef4delphi_lazarus.lpk", - "Version" : "99.2.15.0" + "Version" : "100.0.14.0" } ], "UpdatePackageData" : {