mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-15 15:55:56 +01:00
Update to CEF 3.3325.1749.ga42963a
This commit is contained in:
parent
fd7ff7f70a
commit
15581a9c06
@ -455,6 +455,14 @@ procedure TMiniBrowserFrm.Chromium1FullScreenModeChange(Sender: TObject;
|
|||||||
begin
|
begin
|
||||||
if not(Chromium1.IsSameBrowser(browser)) then exit;
|
if not(Chromium1.IsSameBrowser(browser)) then exit;
|
||||||
|
|
||||||
|
// This event is executed in a CEF thread and this can cause problems when
|
||||||
|
// you change the 'Enabled' and 'Visible' properties from VCL components.
|
||||||
|
// It's recommended to change the 'Enabled' and 'Visible' properties
|
||||||
|
// in the main application thread and not in a CEF thread.
|
||||||
|
// It's much safer to use PostMessage to send a message to the main form with
|
||||||
|
// all this information and update those properties in the procedure handling
|
||||||
|
// that message.
|
||||||
|
|
||||||
if fullscreen then
|
if fullscreen then
|
||||||
begin
|
begin
|
||||||
NavControlPnl.Visible := False;
|
NavControlPnl.Visible := False;
|
||||||
@ -553,6 +561,14 @@ procedure TMiniBrowserFrm.Chromium1LoadingStateChange(Sender: TObject;
|
|||||||
begin
|
begin
|
||||||
if not(Chromium1.IsSameBrowser(browser)) then exit;
|
if not(Chromium1.IsSameBrowser(browser)) then exit;
|
||||||
|
|
||||||
|
// This event is executed in a CEF thread and this can cause problems when
|
||||||
|
// you change the 'Enabled' and 'Visible' properties from VCL components.
|
||||||
|
// It's recommended to change the 'Enabled' and 'Visible' properties
|
||||||
|
// in the main application thread and not in a CEF thread.
|
||||||
|
// It's much safer to use PostMessage to send a message to the main form with
|
||||||
|
// all this information and update those properties in the procedure handling
|
||||||
|
// that message.
|
||||||
|
|
||||||
BackBtn.Enabled := canGoBack;
|
BackBtn.Enabled := canGoBack;
|
||||||
ForwardBtn.Enabled := canGoForward;
|
ForwardBtn.Enabled := canGoForward;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ uses
|
|||||||
const
|
const
|
||||||
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
||||||
CEF_SUPPORTED_VERSION_MINOR = 3325;
|
CEF_SUPPORTED_VERSION_MINOR = 3325;
|
||||||
CEF_SUPPORTED_VERSION_RELEASE = 1746;
|
CEF_SUPPORTED_VERSION_RELEASE = 1749;
|
||||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||||
|
|
||||||
CEF_CHROMEELF_VERSION_MAJOR = 65;
|
CEF_CHROMEELF_VERSION_MAJOR = 65;
|
||||||
@ -167,6 +167,7 @@ type
|
|||||||
procedure DestroyBrowserProcessHandler;
|
procedure DestroyBrowserProcessHandler;
|
||||||
procedure DestroyRenderProcessHandler;
|
procedure DestroyRenderProcessHandler;
|
||||||
|
|
||||||
|
procedure SetCache(const aValue : ustring);
|
||||||
procedure SetFrameworkDirPath(const aValue : ustring);
|
procedure SetFrameworkDirPath(const aValue : ustring);
|
||||||
procedure SetResourcesDirPath(const aValue : ustring);
|
procedure SetResourcesDirPath(const aValue : ustring);
|
||||||
procedure SetLocalesDirPath(const aValue : ustring);
|
procedure SetLocalesDirPath(const aValue : ustring);
|
||||||
@ -278,7 +279,7 @@ type
|
|||||||
procedure Internal_OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const aMessage: ICefProcessMessage; var aHandled : boolean);
|
procedure Internal_OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const aMessage: ICefProcessMessage; var aHandled : boolean);
|
||||||
|
|
||||||
|
|
||||||
property Cache : ustring read FCache write FCache;
|
property Cache : ustring read FCache write SetCache;
|
||||||
property Cookies : ustring read FCookies write FCookies;
|
property Cookies : ustring read FCookies write FCookies;
|
||||||
property UserDataPath : ustring read FUserDataPath write FUserDataPath;
|
property UserDataPath : ustring read FUserDataPath write FUserDataPath;
|
||||||
property UserAgent : ustring read FUserAgent write FUserAgent;
|
property UserAgent : ustring read FUserAgent write FUserAgent;
|
||||||
@ -336,7 +337,6 @@ type
|
|||||||
property ReRaiseExceptions : boolean read FReRaiseExceptions write FReRaiseExceptions;
|
property ReRaiseExceptions : boolean read FReRaiseExceptions write FReRaiseExceptions;
|
||||||
property DeviceScaleFactor : single read FDeviceScaleFactor;
|
property DeviceScaleFactor : single read FDeviceScaleFactor;
|
||||||
property CheckDevToolsResources : boolean read FCheckDevToolsResources write FCheckDevToolsResources;
|
property CheckDevToolsResources : boolean read FCheckDevToolsResources write FCheckDevToolsResources;
|
||||||
property DisableGPUCache : boolean read FDisableGPUCache write FDisableGPUCache;
|
|
||||||
property LocalesRequired : ustring read FLocalesRequired write FLocalesRequired;
|
property LocalesRequired : ustring read FLocalesRequired write FLocalesRequired;
|
||||||
property CustomFlashPath : ustring read FCustomFlashPath write FCustomFlashPath;
|
property CustomFlashPath : ustring read FCustomFlashPath write FCustomFlashPath;
|
||||||
property ProcessType : TCefProcessType read FProcessType;
|
property ProcessType : TCefProcessType read FProcessType;
|
||||||
@ -459,7 +459,7 @@ begin
|
|||||||
FSetCurrentDir := False;
|
FSetCurrentDir := False;
|
||||||
FGlobalContextInitialized := False;
|
FGlobalContextInitialized := False;
|
||||||
FCheckDevToolsResources := True;
|
FCheckDevToolsResources := True;
|
||||||
FDisableGPUCache := False;
|
FDisableGPUCache := True;
|
||||||
FLocalesRequired := '';
|
FLocalesRequired := '';
|
||||||
FProcessType := ParseProcessType;
|
FProcessType := ParseProcessType;
|
||||||
FResourceBundleHandler := nil;
|
FResourceBundleHandler := nil;
|
||||||
@ -670,6 +670,12 @@ begin
|
|||||||
Result := CHROMEELF_DLL;
|
Result := CHROMEELF_DLL;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCefApplication.SetCache(const aValue : ustring);
|
||||||
|
begin
|
||||||
|
FCache := trim(aValue);
|
||||||
|
FDisableGPUCache := (length(FCache) = 0);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCefApplication.SetFrameworkDirPath(const aValue : ustring);
|
procedure TCefApplication.SetFrameworkDirPath(const aValue : ustring);
|
||||||
begin
|
begin
|
||||||
if (length(aValue) > 0) and DirectoryExists(aValue) then
|
if (length(aValue) > 0) and DirectoryExists(aValue) then
|
||||||
@ -1490,9 +1496,11 @@ end;
|
|||||||
function TCefApplication.Load_cef_cookie_capi_h : boolean;
|
function TCefApplication.Load_cef_cookie_capi_h : boolean;
|
||||||
begin
|
begin
|
||||||
cef_cookie_manager_get_global_manager := GetProcAddress(FLibHandle, 'cef_cookie_manager_get_global_manager');
|
cef_cookie_manager_get_global_manager := GetProcAddress(FLibHandle, 'cef_cookie_manager_get_global_manager');
|
||||||
|
cef_cookie_manager_get_blocking_manager := GetProcAddress(FLibHandle, 'cef_cookie_manager_get_blocking_manager');
|
||||||
cef_cookie_manager_create_manager := GetProcAddress(FLibHandle, 'cef_cookie_manager_create_manager');
|
cef_cookie_manager_create_manager := GetProcAddress(FLibHandle, 'cef_cookie_manager_create_manager');
|
||||||
|
|
||||||
Result := assigned(cef_cookie_manager_get_global_manager) and
|
Result := assigned(cef_cookie_manager_get_global_manager) and
|
||||||
|
assigned(cef_cookie_manager_get_blocking_manager) and
|
||||||
assigned(cef_cookie_manager_create_manager);
|
assigned(cef_cookie_manager_create_manager);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -153,13 +153,17 @@ destructor TCefBaseRefCountedOwn.Destroy;
|
|||||||
var
|
var
|
||||||
TempPointer : pointer;
|
TempPointer : pointer;
|
||||||
begin
|
begin
|
||||||
|
try
|
||||||
|
if (FData <> nil) then
|
||||||
|
begin
|
||||||
TempPointer := FData;
|
TempPointer := FData;
|
||||||
FData := nil;
|
|
||||||
|
|
||||||
Dec(PByte(TempPointer), SizeOf(Pointer));
|
Dec(PByte(TempPointer), SizeOf(Pointer));
|
||||||
FreeMem(TempPointer);
|
FreeMem(TempPointer);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FData := nil;
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCefBaseRefCountedOwn.Wrap: Pointer;
|
function TCefBaseRefCountedOwn.Wrap: Pointer;
|
||||||
@ -180,15 +184,13 @@ end;
|
|||||||
|
|
||||||
destructor TCefBaseRefCountedRef.Destroy;
|
destructor TCefBaseRefCountedRef.Destroy;
|
||||||
begin
|
begin
|
||||||
if (FData <> nil) then
|
try
|
||||||
begin
|
if (FData <> nil) and assigned(PCefBaseRefCounted(FData)^.release) then
|
||||||
if assigned(PCefBaseRefCounted(FData)^.release) then
|
|
||||||
PCefBaseRefCounted(FData)^.release(PCefBaseRefCounted(FData));
|
PCefBaseRefCounted(FData)^.release(PCefBaseRefCounted(FData));
|
||||||
|
finally
|
||||||
FData := nil;
|
FData := nil;
|
||||||
end;
|
|
||||||
|
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TCefBaseRefCountedRef.UnWrap(data: Pointer): ICefBaseRefCounted;
|
class function TCefBaseRefCountedRef.UnWrap(data: Pointer): ICefBaseRefCounted;
|
||||||
|
@ -76,6 +76,7 @@ type
|
|||||||
class function UnWrap(data: Pointer): ICefCookieManager;
|
class function UnWrap(data: Pointer): ICefCookieManager;
|
||||||
class function Global(const callback: ICefCompletionCallback): ICefCookieManager;
|
class function Global(const callback: ICefCompletionCallback): ICefCookieManager;
|
||||||
class function GlobalProc(const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
class function GlobalProc(const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
||||||
|
class function Blocking : ICefCookieManager;
|
||||||
class function New(const path: ustring; persistSessionCookies: Boolean; const callback: ICefCompletionCallback): ICefCookieManager;
|
class function New(const path: ustring; persistSessionCookies: Boolean; const callback: ICefCompletionCallback): ICefCookieManager;
|
||||||
class function NewProc(const path: ustring; persistSessionCookies: Boolean; const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
class function NewProc(const path: ustring; persistSessionCookies: Boolean; const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
||||||
end;
|
end;
|
||||||
@ -136,6 +137,11 @@ begin
|
|||||||
Result := UnWrap(cef_cookie_manager_get_global_manager(CefGetData(callback)));
|
Result := UnWrap(cef_cookie_manager_get_global_manager(CefGetData(callback)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class function TCefCookieManagerRef.Blocking : ICefCookieManager;
|
||||||
|
begin
|
||||||
|
Result := UnWrap(cef_cookie_manager_get_blocking_manager);
|
||||||
|
end;
|
||||||
|
|
||||||
class function TCefCookieManagerRef.GlobalProc(const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
class function TCefCookieManagerRef.GlobalProc(const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
||||||
begin
|
begin
|
||||||
Result := Global(TCefFastCompletionCallback.Create(callback));
|
Result := Global(TCefFastCompletionCallback.Create(callback));
|
||||||
|
@ -75,6 +75,7 @@ var
|
|||||||
|
|
||||||
// /include/capi/cef_cookie_capi.h
|
// /include/capi/cef_cookie_capi.h
|
||||||
cef_cookie_manager_get_global_manager : function(callback: PCefCompletionCallback): PCefCookieManager; {$IFDEF CPUX64}stdcall{$ELSE}cdecl{$ENDIF};
|
cef_cookie_manager_get_global_manager : function(callback: PCefCompletionCallback): PCefCookieManager; {$IFDEF CPUX64}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
|
cef_cookie_manager_get_blocking_manager : function : PCefCookieManager; {$IFDEF CPUX64}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
cef_cookie_manager_create_manager : function(const path: PCefString; persist_session_cookies: Integer; callback: PCefCompletionCallback): PCefCookieManager; {$IFDEF CPUX64}stdcall{$ELSE}cdecl{$ENDIF};
|
cef_cookie_manager_create_manager : function(const path: PCefString; persist_session_cookies: Integer; callback: PCefCompletionCallback): PCefCookieManager; {$IFDEF CPUX64}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
|
|
||||||
// /include/capi/cef_crash_util.h
|
// /include/capi/cef_crash_util.h
|
||||||
|
Loading…
Reference in New Issue
Block a user