1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Added GlobalCEFApp.SupportedSchemes

- Added TChromium.UpdateSupportedSchemes
- Added local image selection to the EditorBrowser demo
This commit is contained in:
Salvador Díaz Fau
2019-12-21 12:30:16 +01:00
parent b57ba15ff6
commit 4b585809ed
12 changed files with 831 additions and 101 deletions

View File

@@ -166,16 +166,25 @@ begin
TCefFastSetCookieCallback.Create(callback));
end;
procedure TCefCookieManagerRef.SetSupportedSchemes(const schemes: TStrings; include_defaults: boolean; const callback: ICefCompletionCallback);
procedure TCefCookieManagerRef.SetSupportedSchemes(const schemes : TStrings;
include_defaults : boolean;
const callback : ICefCompletionCallback);
var
TempSL : ICefStringList;
TempSL : ICefStringList;
TempHandle : TCefStringList;
begin
try
TempSL := TCefStringListOwn.Create;
TempSL.AddStrings(schemes);
if (schemes <> nil) and (schemes.count > 0) then
begin
TempSL := TCefStringListOwn.Create;
TempSL.AddStrings(schemes);
TempHandle := TempSL.Handle;
end
else
TempHandle := nil;
PCefCookieManager(FData)^.set_supported_schemes(PCefCookieManager(FData),
TempSL.Handle,
TempHandle,
ord(include_defaults),
CefGetData(callback));
finally
@@ -183,7 +192,9 @@ begin
end;
end;
procedure TCefCookieManagerRef.SetSupportedSchemesProc(const schemes: TStrings; include_defaults: boolean; const callback: TCefCompletionCallbackProc);
procedure TCefCookieManagerRef.SetSupportedSchemesProc(const schemes : TStrings;
include_defaults : boolean;
const callback : TCefCompletionCallbackProc);
begin
SetSupportedSchemes(schemes, include_defaults, TCefFastCompletionCallback.Create(callback));
end;