mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Update to CEF 3.3538.1848.g1d1fe01
This commit is contained in:
parent
87e0dcbd84
commit
627a77e8d2
@ -60,14 +60,14 @@ uses
|
||||
|
||||
const
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 3497;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1841;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 3538;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1848;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 69;
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 70;
|
||||
CEF_CHROMEELF_VERSION_MINOR = 0;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 3497;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 100;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 3538;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 77;
|
||||
|
||||
LIBCEF_DLL = 'libcef.dll';
|
||||
CHROMEELF_DLL = 'chrome_elf.dll';
|
||||
|
@ -72,6 +72,9 @@ type
|
||||
protected
|
||||
FData: Pointer;
|
||||
|
||||
function HasOneRef : boolean;
|
||||
function HasAtLeastOneRef : boolean;
|
||||
|
||||
public
|
||||
constructor CreateData(size: Cardinal; owned : boolean = False); virtual;
|
||||
destructor Destroy; override;
|
||||
@ -83,6 +86,9 @@ type
|
||||
protected
|
||||
FData: Pointer;
|
||||
|
||||
function HasOneRef : boolean;
|
||||
function HasAtLeastOneRef : boolean;
|
||||
|
||||
public
|
||||
constructor Create(data: Pointer); virtual;
|
||||
destructor Destroy; override;
|
||||
@ -138,6 +144,18 @@ begin
|
||||
Result := Ord(False);
|
||||
end;
|
||||
|
||||
function cef_base_has_at_least_one_ref(self: PCefBaseRefCounted): Integer; stdcall;
|
||||
var
|
||||
TempObject : TObject;
|
||||
begin
|
||||
TempObject := CefGetObject(self);
|
||||
|
||||
if (TempObject <> nil) and (TempObject is TCefBaseRefCountedOwn) then
|
||||
Result := Ord(TCefBaseRefCountedOwn(TempObject).FRefCount >= 1)
|
||||
else
|
||||
Result := Ord(False);
|
||||
end;
|
||||
|
||||
procedure cef_base_add_ref_owned(self: PCefBaseRefCounted); stdcall;
|
||||
begin
|
||||
//
|
||||
@ -153,6 +171,11 @@ begin
|
||||
Result := 1;
|
||||
end;
|
||||
|
||||
function cef_base_has_at_least_one_ref_owned(self: PCefBaseRefCounted): Integer; stdcall;
|
||||
begin
|
||||
Result := 1;
|
||||
end;
|
||||
|
||||
constructor TCefBaseRefCountedOwn.CreateData(size: Cardinal; owned : boolean);
|
||||
begin
|
||||
GetMem(FData, size + SizeOf(Pointer));
|
||||
@ -166,12 +189,14 @@ begin
|
||||
PCefBaseRefCounted(FData)^.add_ref := {$IFDEF FPC}@{$ENDIF}cef_base_add_ref_owned;
|
||||
PCefBaseRefCounted(FData)^.release := {$IFDEF FPC}@{$ENDIF}cef_base_release_owned;
|
||||
PCefBaseRefCounted(FData)^.has_one_ref := {$IFDEF FPC}@{$ENDIF}cef_base_has_one_ref_owned;
|
||||
PCefBaseRefCounted(FData)^.has_at_least_one_ref := {$IFDEF FPC}@{$ENDIF}cef_base_has_at_least_one_ref_owned;
|
||||
end
|
||||
else
|
||||
begin
|
||||
PCefBaseRefCounted(FData)^.add_ref := {$IFDEF FPC}@{$ENDIF}cef_base_add_ref;
|
||||
PCefBaseRefCounted(FData)^.release := {$IFDEF FPC}@{$ENDIF}cef_base_release_ref;
|
||||
PCefBaseRefCounted(FData)^.has_one_ref := {$IFDEF FPC}@{$ENDIF}cef_base_has_one_ref;
|
||||
PCefBaseRefCounted(FData)^.has_at_least_one_ref := {$IFDEF FPC}@{$ENDIF}cef_base_has_at_least_one_ref;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -206,6 +231,22 @@ begin
|
||||
PCefBaseRefCounted(FData)^.add_ref(PCefBaseRefCounted(FData));
|
||||
end;
|
||||
|
||||
function TCefBaseRefCountedOwn.HasOneRef : boolean;
|
||||
begin
|
||||
if (FData <> nil) and Assigned(PCefBaseRefCounted(FData)^.has_one_ref) then
|
||||
Result := PCefBaseRefCounted(FData)^.has_one_ref(PCefBaseRefCounted(FData)) <> 0
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function TCefBaseRefCountedOwn.HasAtLeastOneRef : boolean;
|
||||
begin
|
||||
if (FData <> nil) and Assigned(PCefBaseRefCounted(FData)^.has_at_least_one_ref) then
|
||||
Result := PCefBaseRefCounted(FData)^.has_at_least_one_ref(PCefBaseRefCounted(FData)) <> 0
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
|
||||
// ***********************************************
|
||||
// ************ TCefBaseRefCountedRef ************
|
||||
@ -262,6 +303,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCefBaseRefCountedRef.HasOneRef : boolean;
|
||||
begin
|
||||
Result := (PCefBaseRefCounted(FData)^.has_one_ref(PCefBaseRefCounted(FData)) <> 0);
|
||||
end;
|
||||
|
||||
function TCefBaseRefCountedRef.HasAtLeastOneRef : boolean;
|
||||
begin
|
||||
Result := (PCefBaseRefCounted(FData)^.has_at_least_one_ref(PCefBaseRefCounted(FData)) <> 0);
|
||||
end;
|
||||
|
||||
|
||||
// ************************************************
|
||||
// *********** TLoggingInterfacedObject ***********
|
||||
|
@ -339,6 +339,9 @@ type
|
||||
function SendCompMessage(aMsg : cardinal; wParam : cardinal = 0; lParam : integer = 0) : boolean;
|
||||
procedure ToMouseEvent(grfKeyState : Longint; pt : TPoint; var aMouseEvent : TCefMouseEvent);
|
||||
|
||||
procedure InitializeWindowInfo(aParentHandle : HWND; aParentRect : TRect; const aWindowName : ustring); virtual;
|
||||
procedure InitializeDevToolsWindowInfo(aDevTools : TWinControl); virtual;
|
||||
|
||||
procedure FreeAndNilStub(var aStub : pointer);
|
||||
procedure CreateStub(const aMethod : TWndMethod; var aStub : Pointer);
|
||||
procedure WndProc(var aMessage: TMessage);
|
||||
@ -1147,11 +1150,7 @@ begin
|
||||
CreateClientHandler(aParentHandle = 0) then
|
||||
begin
|
||||
GetSettings(FBrowserSettings);
|
||||
|
||||
if FIsOSR then
|
||||
WindowInfoAsWindowless(FWindowInfo, FCompHandle, aWindowName)
|
||||
else
|
||||
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName);
|
||||
InitializeWindowInfo(aParentHandle, aParentRect, aWindowName);
|
||||
|
||||
|
||||
if (aContext <> nil) and (length(aCookiesPath) > 0) then
|
||||
@ -1175,6 +1174,24 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TChromium.InitializeWindowInfo( aParentHandle : HWND;
|
||||
aParentRect : TRect;
|
||||
const aWindowName : ustring);
|
||||
begin
|
||||
if FIsOSR then
|
||||
WindowInfoAsWindowless(FWindowInfo, FCompHandle, aWindowName)
|
||||
else
|
||||
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName);
|
||||
end;
|
||||
|
||||
procedure TChromium.InitializeDevToolsWindowInfo(aDevTools : TWinControl);
|
||||
begin
|
||||
if (aDevTools <> nil) then
|
||||
WindowInfoAsChild(FDevWindowInfo, aDevTools.Handle, aDevTools.ClientRect, aDevTools.Name)
|
||||
else
|
||||
WindowInfoAsPopUp(FDevWindowInfo, WindowHandle, DEVTOOLS_WINDOWNAME);
|
||||
end;
|
||||
|
||||
procedure TChromium.InitializeDragAndDrop(const aDropTargetCtrl : TWinControl);
|
||||
var
|
||||
TempDropTarget : IDropTarget;
|
||||
@ -2980,11 +2997,7 @@ begin
|
||||
if Initialized then
|
||||
begin
|
||||
InitializeSettings(FDevBrowserSettings);
|
||||
|
||||
if (aDevTools <> nil) then
|
||||
WindowInfoAsChild(FDevWindowInfo, aDevTools.Handle, aDevTools.ClientRect, aDevTools.Name)
|
||||
else
|
||||
WindowInfoAsPopUp(FDevWindowInfo, WindowHandle, DEVTOOLS_WINDOWNAME);
|
||||
InitializeDevToolsWindowInfo(aDevTools);
|
||||
|
||||
TempClient := TCefClientOwn.Create;
|
||||
|
||||
|
@ -395,6 +395,8 @@ type
|
||||
['{1F9A7B44-DCDC-4477-9180-3ADD44BDEB7B}']
|
||||
function Wrap: Pointer;
|
||||
function SameAs(aData : Pointer) : boolean;
|
||||
function HasOneRef : boolean;
|
||||
function HasAtLeastOneRef : boolean;
|
||||
end;
|
||||
|
||||
// TCefRunFileDialogCallback
|
||||
|
@ -103,9 +103,9 @@ function cef_string_utf16_copy(const src: PChar16; src_len: NativeUInt; output:
|
||||
function cef_string_copy(const src: PCefChar; src_len: NativeUInt; output: PCefString): Integer;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : THandle; aRect : TRect; const aWindowName : ustring = '');
|
||||
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring = '');
|
||||
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring = '');
|
||||
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : THandle; aRect : TRect; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
|
||||
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
|
||||
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF MACOS}
|
||||
@ -483,9 +483,9 @@ begin
|
||||
end;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : THandle; aRect : TRect; const aWindowName : ustring);
|
||||
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : THandle; aRect : TRect; const aWindowName : ustring; aExStyle : cardinal);
|
||||
begin
|
||||
aWindowInfo.ex_style := 0;
|
||||
aWindowInfo.ex_style := aExStyle;
|
||||
aWindowInfo.window_name := CefString(aWindowName);
|
||||
aWindowInfo.style := WS_CHILD or WS_VISIBLE or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or WS_TABSTOP;
|
||||
aWindowInfo.x := aRect.left;
|
||||
@ -498,9 +498,9 @@ begin
|
||||
aWindowInfo.window := 0;
|
||||
end;
|
||||
|
||||
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring);
|
||||
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring; aExStyle : cardinal);
|
||||
begin
|
||||
aWindowInfo.ex_style := 0;
|
||||
aWindowInfo.ex_style := aExStyle;
|
||||
aWindowInfo.window_name := CefString(aWindowName);
|
||||
aWindowInfo.style := WS_OVERLAPPEDWINDOW or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or WS_VISIBLE;
|
||||
aWindowInfo.x := integer(CW_USEDEFAULT);
|
||||
@ -513,9 +513,9 @@ begin
|
||||
aWindowInfo.window := 0;
|
||||
end;
|
||||
|
||||
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring);
|
||||
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring; aExStyle : cardinal);
|
||||
begin
|
||||
aWindowInfo.ex_style := 0;
|
||||
aWindowInfo.ex_style := aExStyle;
|
||||
aWindowInfo.window_name := CefString(aWindowName);
|
||||
aWindowInfo.style := 0;
|
||||
aWindowInfo.x := 0;
|
||||
|
@ -751,7 +751,8 @@ type
|
||||
TCefTerminationStatus = (
|
||||
TS_ABNORMAL_TERMINATION,
|
||||
TS_PROCESS_WAS_KILLED,
|
||||
TS_PROCESS_CRASHED
|
||||
TS_PROCESS_CRASHED,
|
||||
TS_PROCESS_OOM
|
||||
);
|
||||
|
||||
// /include/internal/cef_types.h (cef_path_key_t)
|
||||
@ -1189,6 +1190,7 @@ type
|
||||
add_ref : procedure(self: PCefBaseRefCounted); stdcall;
|
||||
release : function(self: PCefBaseRefCounted): Integer; stdcall;
|
||||
has_one_ref : function(self: PCefBaseRefCounted): Integer; stdcall;
|
||||
has_at_least_one_ref : function(self: PCefBaseRefCounted): Integer; stdcall;
|
||||
end;
|
||||
|
||||
// /include/capi/cef_base_capi.h (cef_base_scoped_t)
|
||||
|
@ -319,6 +319,7 @@ type
|
||||
function GetParentForm : TCustomForm;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
procedure InitializeWindowInfo(aParentHandle : HWND; aParentRect : TRect; const aWindowName : ustring); virtual;
|
||||
procedure FreeAndNilStub(var aStub : pointer);
|
||||
procedure CreateStub(const aMethod : TWndMethod; var aStub : Pointer);
|
||||
procedure BrowserCompWndProc(var aMessage: TMessage);
|
||||
@ -1085,11 +1086,7 @@ begin
|
||||
CreateClientHandler(aParentHandle = 0) then
|
||||
begin
|
||||
GetSettings(FBrowserSettings);
|
||||
|
||||
if FIsOSR then
|
||||
WindowInfoAsWindowless(FWindowInfo, 0, aWindowName)
|
||||
else
|
||||
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName);
|
||||
InitializeWindowInfo(aParentHandle, aParentRect, aWindowName);
|
||||
|
||||
|
||||
if (aContext <> nil) and (length(aCookiesPath) > 0) then
|
||||
@ -1112,6 +1109,16 @@ begin
|
||||
if CustomExceptionHandler('TFMXChromium.CreateBrowser', e) then raise;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFMXChromium.InitializeWindowInfo( aParentHandle : HWND;
|
||||
aParentRect : TRect;
|
||||
const aWindowName : ustring);
|
||||
begin
|
||||
if FIsOSR then
|
||||
WindowInfoAsWindowless(FWindowInfo, 0, aWindowName)
|
||||
else
|
||||
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function TFMXChromium.ShareRequestContext(var aContext : ICefRequestContext;
|
||||
|
Loading…
Reference in New Issue
Block a user