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

@ -20,9 +20,8 @@
<ComponentName Value="JSWindowBindingWithObjectFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="102"/>
<TopLine Value="120"/>
<CursorPos X="82" Y="126"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
@ -32,8 +31,12 @@
<Unit2>
<Filename Value="uMyV8Accessor.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="2"/>
<TopLine Value="34"/>
<CursorPos X="5" Y="90"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
</Units>

View File

@ -51,15 +51,15 @@ type
protected
FMyVal : ustring;
function Get(const name: ustring; const obj: ICefv8Value; out retval : ICefv8Value; var exception: ustring): Boolean; override;
function Put(const name: ustring; const obj, value: ICefv8Value; var exception: ustring): Boolean; override;
function Get(const name: ustring; const object_: ICefv8Value; var retval : ICefv8Value; var exception: ustring): Boolean; override;
function Set_(const name: ustring; const object_, value: ICefv8Value; var exception: ustring): Boolean; override;
end;
implementation
function TMyV8Accessor.Get(const name : ustring;
const obj : ICefv8Value;
out retval : ICefv8Value;
const object_ : ICefv8Value;
var retval : ICefv8Value;
var exception : ustring): Boolean;
begin
if (name = 'myval') then
@ -71,10 +71,10 @@ begin
Result := False;
end;
function TMyV8Accessor.Put(const name : ustring;
const obj : ICefv8Value;
const value : ICefv8Value;
var exception : ustring): Boolean;
function TMyV8Accessor.Set_(const name : ustring;
const object_ : ICefv8Value;
const value : ICefv8Value;
var exception : ustring): Boolean;
begin
if (name = 'myval') then
begin