1
0
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:
Salvador Díaz Fau
2019-11-24 18:19:49 +01:00
parent e5c2d4cc99
commit c455886d29
33 changed files with 439 additions and 265 deletions

View File

@ -124,11 +124,12 @@ begin
if (FHandle <> nil) then
begin
FillChar(TempValue, SizeOf(TempValue), 0);
CefStringInitialize(@TempValue);
TempKey := CefString(key);
if (cef_string_map_find(FHandle, @TempKey, TempValue) <> 0) then
Result := CefString(@TempValue);
if (cef_string_map_find(FHandle, @TempKey, @TempValue) <> 0) then
Result := CefStringClearAndGet(@TempValue);
end;
end;
@ -145,10 +146,10 @@ begin
if (FHandle <> nil) then
begin
FillChar(TempKey, SizeOf(TempKey), 0);
CefStringInitialize(@TempKey);
if (cef_string_map_key(FHandle, index, TempKey) <> 0) then
Result := CefString(@TempKey);
if (cef_string_map_key(FHandle, index, @TempKey) <> 0) then
Result := CefStringClearAndGet(@TempKey);
end;
end;
@ -168,10 +169,10 @@ begin
if (FHandle <> nil) then
begin
FillChar(TempValue, SizeOf(TempValue), 0);
CefStringInitialize(@TempValue);
if (cef_string_map_value(FHandle, index, TempValue) <> 0) then
Result := CefString(@TempValue);
if (cef_string_map_value(FHandle, index, @TempValue) <> 0) then
Result := CefStringClearAndGet(@TempValue);
end;
end;