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
|
||||
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
|
||||
begin
|
||||
NavControlPnl.Visible := False;
|
||||
@ -553,6 +561,14 @@ procedure TMiniBrowserFrm.Chromium1LoadingStateChange(Sender: TObject;
|
||||
begin
|
||||
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;
|
||||
ForwardBtn.Enabled := canGoForward;
|
||||
|
||||
|
@ -57,7 +57,7 @@ uses
|
||||
const
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 3325;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1746;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1749;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 65;
|
||||
@ -167,6 +167,7 @@ type
|
||||
procedure DestroyBrowserProcessHandler;
|
||||
procedure DestroyRenderProcessHandler;
|
||||
|
||||
procedure SetCache(const aValue : ustring);
|
||||
procedure SetFrameworkDirPath(const aValue : ustring);
|
||||
procedure SetResourcesDirPath(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);
|
||||
|
||||
|
||||
property Cache : ustring read FCache write FCache;
|
||||
property Cache : ustring read FCache write SetCache;
|
||||
property Cookies : ustring read FCookies write FCookies;
|
||||
property UserDataPath : ustring read FUserDataPath write FUserDataPath;
|
||||
property UserAgent : ustring read FUserAgent write FUserAgent;
|
||||
@ -336,7 +337,6 @@ type
|
||||
property ReRaiseExceptions : boolean read FReRaiseExceptions write FReRaiseExceptions;
|
||||
property DeviceScaleFactor : single read FDeviceScaleFactor;
|
||||
property CheckDevToolsResources : boolean read FCheckDevToolsResources write FCheckDevToolsResources;
|
||||
property DisableGPUCache : boolean read FDisableGPUCache write FDisableGPUCache;
|
||||
property LocalesRequired : ustring read FLocalesRequired write FLocalesRequired;
|
||||
property CustomFlashPath : ustring read FCustomFlashPath write FCustomFlashPath;
|
||||
property ProcessType : TCefProcessType read FProcessType;
|
||||
@ -459,7 +459,7 @@ begin
|
||||
FSetCurrentDir := False;
|
||||
FGlobalContextInitialized := False;
|
||||
FCheckDevToolsResources := True;
|
||||
FDisableGPUCache := False;
|
||||
FDisableGPUCache := True;
|
||||
FLocalesRequired := '';
|
||||
FProcessType := ParseProcessType;
|
||||
FResourceBundleHandler := nil;
|
||||
@ -670,6 +670,12 @@ begin
|
||||
Result := CHROMEELF_DLL;
|
||||
end;
|
||||
|
||||
procedure TCefApplication.SetCache(const aValue : ustring);
|
||||
begin
|
||||
FCache := trim(aValue);
|
||||
FDisableGPUCache := (length(FCache) = 0);
|
||||
end;
|
||||
|
||||
procedure TCefApplication.SetFrameworkDirPath(const aValue : ustring);
|
||||
begin
|
||||
if (length(aValue) > 0) and DirectoryExists(aValue) then
|
||||
@ -1489,10 +1495,12 @@ end;
|
||||
|
||||
function TCefApplication.Load_cef_cookie_capi_h : boolean;
|
||||
begin
|
||||
cef_cookie_manager_get_global_manager := GetProcAddress(FLibHandle, 'cef_cookie_manager_get_global_manager');
|
||||
cef_cookie_manager_create_manager := GetProcAddress(FLibHandle, 'cef_cookie_manager_create_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');
|
||||
|
||||
Result := assigned(cef_cookie_manager_get_global_manager) and
|
||||
assigned(cef_cookie_manager_get_blocking_manager) and
|
||||
assigned(cef_cookie_manager_create_manager);
|
||||
end;
|
||||
|
||||
|
@ -153,13 +153,17 @@ destructor TCefBaseRefCountedOwn.Destroy;
|
||||
var
|
||||
TempPointer : pointer;
|
||||
begin
|
||||
TempPointer := FData;
|
||||
FData := nil;
|
||||
|
||||
Dec(PByte(TempPointer), SizeOf(Pointer));
|
||||
FreeMem(TempPointer);
|
||||
|
||||
inherited Destroy;
|
||||
try
|
||||
if (FData <> nil) then
|
||||
begin
|
||||
TempPointer := FData;
|
||||
Dec(PByte(TempPointer), SizeOf(Pointer));
|
||||
FreeMem(TempPointer);
|
||||
end;
|
||||
finally
|
||||
FData := nil;
|
||||
inherited Destroy;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCefBaseRefCountedOwn.Wrap: Pointer;
|
||||
@ -180,15 +184,13 @@ end;
|
||||
|
||||
destructor TCefBaseRefCountedRef.Destroy;
|
||||
begin
|
||||
if (FData <> nil) then
|
||||
begin
|
||||
if assigned(PCefBaseRefCounted(FData)^.release) then
|
||||
PCefBaseRefCounted(FData)^.release(PCefBaseRefCounted(FData));
|
||||
|
||||
FData := nil;
|
||||
end;
|
||||
|
||||
inherited Destroy;
|
||||
try
|
||||
if (FData <> nil) and assigned(PCefBaseRefCounted(FData)^.release) then
|
||||
PCefBaseRefCounted(FData)^.release(PCefBaseRefCounted(FData));
|
||||
finally
|
||||
FData := nil;
|
||||
inherited Destroy;
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TCefBaseRefCountedRef.UnWrap(data: Pointer): ICefBaseRefCounted;
|
||||
|
@ -76,6 +76,7 @@ type
|
||||
class function UnWrap(data: Pointer): ICefCookieManager;
|
||||
class function Global(const callback: ICefCompletionCallback): 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 NewProc(const path: ustring; persistSessionCookies: Boolean; const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
||||
end;
|
||||
@ -136,6 +137,11 @@ begin
|
||||
Result := UnWrap(cef_cookie_manager_get_global_manager(CefGetData(callback)));
|
||||
end;
|
||||
|
||||
class function TCefCookieManagerRef.Blocking : ICefCookieManager;
|
||||
begin
|
||||
Result := UnWrap(cef_cookie_manager_get_blocking_manager);
|
||||
end;
|
||||
|
||||
class function TCefCookieManagerRef.GlobalProc(const callback: TCefCompletionCallbackProc): ICefCookieManager;
|
||||
begin
|
||||
Result := Global(TCefFastCompletionCallback.Create(callback));
|
||||
|
@ -74,8 +74,9 @@ var
|
||||
cef_command_line_get_global : function : PCefCommandLine; {$IFDEF CPUX64}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
||||
// /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_create_manager : function(const path: PCefString; persist_session_cookies: Integer; 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};
|
||||
|
||||
// /include/capi/cef_crash_util.h
|
||||
cef_crash_reporting_enabled : function : integer; {$IFDEF CPUX64}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
|
Loading…
Reference in New Issue
Block a user