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

Update to CEF 76.1.10

- Added GlobalCEFApp.UseFakeUIForMediaStream
- Added overloaded TCefBaseRefCountedOwn.SameAs
This commit is contained in:
Salvador Díaz Fau
2019-08-27 09:52:33 +02:00
parent 6663682880
commit 0acd59b3d2
20 changed files with 130 additions and 28 deletions

View File

@@ -76,7 +76,8 @@ type
public
constructor CreateData(size: Cardinal; owned : boolean = False); virtual;
destructor Destroy; override;
function SameAs(aData : Pointer) : boolean;
function SameAs(aData : Pointer) : boolean; overload;
function SameAs(const aBaseRefCounted : ICefBaseRefCounted) : boolean; overload;
function Wrap: Pointer;
end;
@@ -90,7 +91,8 @@ type
public
constructor Create(data: Pointer); virtual;
destructor Destroy; override;
function SameAs(aData : Pointer) : boolean;
function SameAs(aData : Pointer) : boolean; overload;
function SameAs(const aBaseRefCounted : ICefBaseRefCounted) : boolean; overload;
function Wrap: Pointer;
class function UnWrap(data: Pointer): ICefBaseRefCounted;
end;
@@ -221,6 +223,26 @@ begin
Result := (FData = aData);
end;
function TCefBaseRefCountedOwn.SameAs(const aBaseRefCounted : ICefBaseRefCounted) : boolean;
var
TempData : Pointer;
begin
Result := False;
if (aBaseRefCounted <> nil) then
begin
TempData := aBaseRefCounted.Wrap;
if (TempData <> nil) then
begin
Result := SameAs(TempData);
if assigned(PCefBaseRefCounted(TempData)^.release) then
PCefBaseRefCounted(TempData)^.release(PCefBaseRefCounted(TempData));
end;
end;
end;
function TCefBaseRefCountedOwn.Wrap: Pointer;
begin
Result := FData;
@@ -280,6 +302,26 @@ begin
Result := (FData = aData);
end;
function TCefBaseRefCountedRef.SameAs(const aBaseRefCounted : ICefBaseRefCounted) : boolean;
var
TempData : Pointer;
begin
Result := False;
if (aBaseRefCounted <> nil) then
begin
TempData := aBaseRefCounted.Wrap;
if (TempData <> nil) then
begin
Result := SameAs(TempData);
if assigned(PCefBaseRefCounted(TempData)^.release) then
PCefBaseRefCounted(TempData)^.release(PCefBaseRefCounted(TempData));
end;
end;
end;
class function TCefBaseRefCountedRef.UnWrap(data: Pointer): ICefBaseRefCounted;
begin
if (data <> nil) then