1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-22 22:17:48 +02:00

Fixed issue #382 : scheme registration leak

Added a link to test Widevine in the MiniBrowser demo
This commit is contained in:
Salvador Díaz Fau
2021-09-10 18:30:54 +02:00
parent 83a75c985a
commit 0683539655
11 changed files with 53 additions and 36 deletions

View File

@ -79,6 +79,7 @@ type
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; commandId: Integer;
eventFlags: Cardinal; out Result: Boolean);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure GoBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
@ -140,7 +141,7 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnRegCustomSchemes := GlobalCEFApp_OnRegCustomSchemes;
GlobalCEFApp.BrowserSubprocessPath := 'SchemeRegistrationBrowser_sp.exe';
GlobalCEFApp.BrowserSubprocessPath := 'SchemeRegistrationBrowser_sp.exe';
GlobalCEFApp.LogFile := 'debug.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
end;
@ -217,6 +218,12 @@ begin
end;
end;
procedure TSchemeRegistrationBrowserFrm.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CefClearSchemeHandlerFactories;
end;
procedure TSchemeRegistrationBrowserFrm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose := FCanClose;