2021-08-18 15:55:54 +02:00
|
|
|
program SchemeRegistrationBrowser_sp;
|
|
|
|
|
|
|
|
{$MODE Delphi}
|
|
|
|
|
2023-11-27 18:21:07 +01:00
|
|
|
{$I ..\..\..\source\cef.inc}
|
2021-08-18 15:55:54 +02:00
|
|
|
|
|
|
|
uses
|
|
|
|
LCLIntf, LCLType, LMessages, Forms, Interfaces,
|
|
|
|
uCEFApplicationCore, uCEFConstants, uCEFSchemeRegistrar;
|
|
|
|
|
|
|
|
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes
|
|
|
|
// to use up to 3GB of RAM.
|
|
|
|
{$SetPEFlags $20}
|
|
|
|
|
|
|
|
// It's necessary to register the custom scheme in all CEF subprocesses
|
|
|
|
procedure GlobalCEFApp_OnRegCustomSchemes(const registrar: TCefSchemeRegistrarRef);
|
|
|
|
begin
|
|
|
|
registrar.AddCustomScheme('hello', CEF_SCHEME_OPTION_STANDARD or CEF_SCHEME_OPTION_LOCAL);
|
|
|
|
end;
|
|
|
|
|
2024-05-02 12:31:19 +02:00
|
|
|
{$R *.res}
|
|
|
|
|
2021-08-18 15:55:54 +02:00
|
|
|
begin
|
|
|
|
GlobalCEFApp := TCefApplicationCore.Create;
|
|
|
|
GlobalCEFApp.OnRegCustomSchemes := GlobalCEFApp_OnRegCustomSchemes;
|
|
|
|
GlobalCEFApp.LogFile := 'debug.log';
|
2023-12-23 18:58:40 +01:00
|
|
|
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
|
|
|
GlobalCEFApp.SetCurrentDir := True;
|
2021-08-18 15:55:54 +02:00
|
|
|
GlobalCEFApp.StartSubProcess;
|
|
|
|
GlobalCEFApp.Free;
|
|
|
|
GlobalCEFApp := nil;
|
|
|
|
end.
|
|
|
|
|