You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
Fixes in string handling and CEF types
- Modified Cefv8Accessor and Cefv8Interceptor helper function declarations. - Fixed and renamed ICefV8Interceptor parameters. - Fixed and renamed ICefV8Accessor parameters. - Modified ICefValue.SetBool parameter. - Fixed ICefMenuModelDelegate.FormatLabel "label" parameter. - Modified CefStringClearAndGet parameter. - Added CefStringInitialize function. - Fixed string handling in TCefRequestContextRef.SetPreference. - Fixed string handling in TCefCustomResourceBundleHandler.GetLocalizedString. - Fixed string handling in TCefResourceHandlerOwn.GetResponseHeaders. - Fixed string handling in TCefResourceRequestHandlerOwn.OnResourceRedirect. - Fixed string handling in TCefStringMapOwn. - Fixed string handling in TCefStringMultimapOwn. - Fixed and renamed ICefv8Handler.Execute parameters. - Adapted JSWindowBindingWithObject demo to new Cefv8Accessor declaration.
This commit is contained in:
@ -134,8 +134,15 @@ begin
|
||||
end;
|
||||
|
||||
function TCefRequestContextRef.GetHandler: ICefRequestContextHandler;
|
||||
var
|
||||
TempHandler : PCefRequestContextHandler;
|
||||
begin
|
||||
Result := TCefRequestContextHandlerRef.UnWrap(PCefRequestContext(FData)^.get_handler(PCefRequestContext(FData)));
|
||||
TempHandler := PCefRequestContext(FData)^.get_handler(PCefRequestContext(FData));
|
||||
|
||||
if (TempHandler <> nil) then
|
||||
Result := TCefRequestContextHandlerRef.UnWrap(TempHandler)
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
class function TCefRequestContextRef.Global: ICefRequestContext;
|
||||
@ -223,10 +230,11 @@ function TCefRequestContextRef.SetPreference(const name : ustring;
|
||||
var
|
||||
TempName, TempError : TCefString;
|
||||
begin
|
||||
CefStringInitialize(@TempError);
|
||||
|
||||
TempName := CefString(name);
|
||||
FillChar(TempError, SizeOf(TempError), 0);
|
||||
Result := PCefRequestContext(FData)^.set_preference(PCefRequestContext(FData), @TempName, CefGetData(value), @TempError) <> 0;
|
||||
error := CefString(@TempError);
|
||||
error := CefStringClearAndGet(@TempError);
|
||||
end;
|
||||
|
||||
procedure TCefRequestContextRef.ClearCertificateExceptions(const callback: ICefCompletionCallback);
|
||||
|
Reference in New Issue
Block a user